George Kadianakis
b31601975b
Move DH_GENERATOR to crypto.c.
2011-11-25 17:44:11 +01:00
George Kadianakis
4938bcc06a
Do dynamic DH modulus storing in crypto.c.
2011-11-25 17:39:28 +01:00
George Kadianakis
1d1d5ae7f8
Finishing touches.
...
- Make check-spaces happy.
- Remove a stray header from crypto.h
2011-11-25 01:08:31 +01:00
George Kadianakis
7c37a664c1
Rename 'dynamic prime' to 'dynamic DH modulus'.
2011-11-25 01:00:58 +01:00
George Kadianakis
94076d9e3b
Move crypto_get_stored_dynamic_prime() to crypto.c
2011-11-24 22:59:01 +01:00
George Kadianakis
2ef68980a7
Move store_dynamic_prime() to crypto.c.
2011-11-24 22:32:10 +01:00
George Kadianakis
8a726dd0dd
Implement dynamic prime reading and storing to disk.
2011-11-24 22:13:44 +01:00
George Kadianakis
42bda231ee
Make DynamicPrimes SIGHUP-able.
...
Instead of passing the DynamicPrimes configuration option to
crypto_global_init(), generate and set a new TLS DH prime when we read
the torrc.
2011-11-24 22:13:38 +01:00
George Kadianakis
375e55eaa2
Rename "Rakshasa" to "Dynamic Prime".
2011-11-24 22:09:15 +01:00
George Kadianakis
659381e00d
Introduce the DynamicPrimes configuration option.
2011-11-24 22:09:06 +01:00
George Kadianakis
edec9409e8
Copy/Paste Jake's stuff.
...
This commit copies parts of Jake's
f3bb6846975193d9a6649c31f94bda47e4014070 commit verbatim to the
current master.
2011-11-24 22:06:50 +01:00
Nick Mathewson
fdbb9cdf74
Add a sha256 hmac function, with tests
2011-10-10 23:14:09 -04:00
Nick Mathewson
dcf69a9e12
New function to get all digests of a public key
2011-10-10 23:14:02 -04:00
Nick Mathewson
12f9c91c06
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-06-03 11:36:21 -04:00
Nick Mathewson
bbf2fee8ff
Reject 128-byte keys that are not 1024-bit
...
When we added the check for key size, we required that the keys be
128 bytes. But RSA_size (which defers to BN_num_bytes) will return
128 for keys of length 1017..1024. This patch adds a new
crypto_pk_num_bits() that returns the actual number of significant
bits in the modulus, and uses that to enforce key sizes.
Also, credit the original bug3318 in the changes file.
2011-06-03 11:31:19 -04:00
Nick Mathewson
03ccce6d77
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-05-16 14:50:53 -04:00
Nick Mathewson
e908e3a332
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
...
Fixed trivial conflict due to headers moving into their own .h files
from or.h.
Conflicts:
src/or/or.h
2011-05-16 14:49:55 -04:00
Nick Mathewson
4a22046c86
squash! Add crypto_pk_check_key_public_exponent function
...
Rename crypto_pk_check_key_public_exponent to crypto_pk_public_exponent_ok:
it's nice to name predicates s.t. you can tell how to interpret true
and false.
2011-05-16 14:45:06 -04:00
Robert Ransom
d2629f78a0
Add crypto_pk_check_key_public_exponent function
2011-05-16 14:07:34 -04:00
Nick Mathewson
50c259d763
Make the DH parameter we use for TLS match the one from Apache's mod_ssl
...
Our regular DH parameters that we use for circuit and rendezvous
crypto are unchanged. This is yet another small step on the path of
protocol fingerprinting resistance.
(Backport from 0.2.2's 5ed73e3807
)
2011-02-10 15:55:06 -05:00
Nick Mathewson
912b76a1bf
Merge remote branch 'origin/maint-0.2.2'
2011-02-03 13:56:37 -05:00
Nick Mathewson
c939c953ae
Remove an unused function in crypto.c
2011-01-25 18:07:02 -05:00
Nick Mathewson
aaa5737a2e
Merge remote branch 'origin/maint-0.2.2'
2011-01-24 17:51:52 -05:00
Nick Mathewson
5ed73e3807
Make the DH parameter we use for TLS match the one from Apache's mod_ssl
...
Our regular DH parameters that we use for circuit and rendezvous
crypto are unchanged. This is yet another small step on the path of
protocol fingerprinting resistance.
2011-01-24 16:50:11 -05:00
Nick Mathewson
1758ef51de
Merge remote branch 'origin/maint-0.2.2'
2011-01-15 13:26:02 -05:00
Nick Mathewson
1393985768
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
...
Conflicts:
src/or/routerparse.c
src/or/test.c
2011-01-15 13:25:13 -05:00
Nick Mathewson
b97b0efec8
Merge branch 'bug2352_obsize' into maint-0.2.1
2011-01-15 13:15:06 -05:00
Nick Mathewson
1b8f2ef550
Merge remote branch 'origin/maint-0.2.2'
2011-01-15 12:03:44 -05:00
Nick Mathewson
ed87738ede
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
...
Conflicts:
src/or/config.c
src/or/networkstatus.c
src/or/rendcommon.c
src/or/routerparse.c
src/or/test.c
2011-01-15 12:02:55 -05:00
Nick Mathewson
115782bdbe
Fix a heap overflow found by debuger, and make it harder to make that mistake again
...
Our public key functions assumed that they were always writing into a
large enough buffer. In one case, they weren't.
(Incorporates fixes from sebastian)
2011-01-15 11:49:25 -05:00
Nick Mathewson
729f404efe
Add logic in routerparse to not read overlong private keys
...
I am not at all sure that it is possible to trigger a bug here,
but better safe than sorry.
2011-01-10 12:07:34 -05:00
Nick Mathewson
8730884ebe
Merge remote branch 'origin/maint-0.2.2'
2011-01-03 11:53:28 -05:00
Nick Mathewson
f1de329e78
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
...
Conflicts:
src/common/test.h
src/or/test.c
2011-01-03 11:51:17 -05:00
Nick Mathewson
1a07348a50
Bump copyright statements to 2011
2011-01-03 11:50:39 -05:00
Nick Mathewson
a16ed90ec8
Document and/or fix stuff found by Sebastian in code review
...
Thanks to Sebastian for his code-review of the bufferevents patch series.x
2010-09-27 14:22:18 -04:00
Nick Mathewson
006e2e8620
Add a function to return a double in range [0,1).
2010-06-22 21:30:26 -04:00
Nick Mathewson
b006e3279f
Merge remote branch 'origin/maint-0.2.1'
...
Conflicts:
src/common/test.h
src/or/test.c
2010-02-27 17:16:31 -05:00
Nick Mathewson
c3e63483b2
Update Tor Project copyright years
2010-02-27 17:14:21 -05:00
Sebastian Hahn
70abd843fd
crypto_cipher_set_key cannot fail
...
In 5e4d53d535
we made it so that
crypto_cipher_set_key cannot fail. The call will now
always succeed, to returning a boolean for success/failure makes
no sense.
2009-10-27 04:31:23 +01:00
Karsten Loesing
d2b4b49ff0
Reduce log level for someone else sending us weak DH keys.
...
See task 1114. The most plausible explanation for someone sending us weak
DH keys is that they experiment with their Tor code or implement a new Tor
client. Usually, we don't care about such events, especially not on warn
level. If we really care about someone not following the Tor protocol, we
can set ProtocolWarnings to 1.
2009-10-25 23:47:05 -07:00
Nick Mathewson
5576a3a094
Parse detached signature documents with multiple flavors and algorithms.
2009-10-15 15:17:13 -04:00
Nick Mathewson
3b2fc659a8
Refactor consensus signature storage for multiple digests and flavors.
...
This patch introduces a new type called document_signature_t to represent the
signature of a consensus document. Now, each consensus document can have up
to one document signature per voter per digest algorithm. Also, each
detached-signatures document can have up to one signature per <voter,
algorithm, flavor>.
2009-10-15 15:17:13 -04:00
Nick Mathewson
8d41e6c471
Support for encoding and decoding 256-bit digests in base64
2009-10-15 15:17:12 -04:00
Nick Mathewson
cfba9c01bf
Alter keygen function to generate keys of different lengths.
2009-09-29 00:53:25 -04:00
Nick Mathewson
f57883a39e
Add basic support for SHA256.
...
This adds an openssl 0.9.8 dependency. Let's see if anybody cares.
2009-08-19 19:43:54 -04:00
Martin Peck
7703b887f5
Add support for dynamic OpenSSL hardware crypto acceleration engines.
2009-05-23 16:42:44 -07:00
Karsten Loesing
9b32e8c141
Update copyright to 2009.
2009-05-04 11:28:27 -04:00
Karsten Loesing
4ebcc4da34
Update copyright to 2009.
2009-05-02 22:00:54 +02:00
Nick Mathewson
c4b8fef362
Remove svn $Id$s from our source, and remove tor --version --version.
...
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed. They were not actually useful for
telling the version of Tor files in the wild.
svn:r17867
2009-01-04 00:35:51 +00:00
Nick Mathewson
e8a3fa91a6
Use a consistent naming standard for header file guard macros, taking care not to collide with any system headers. This tripped us up on Android.
...
svn:r17805
2008-12-29 02:21:02 +00:00