aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.h
Commit message (Collapse)AuthorAge
* Add and use and unlikely-to-be-eliminated memwipe()Nick Mathewson2012-11-08
| | | | | | | | | | Apparently some compilers like to eliminate memset() operations on data that's about to go out-of-scope. I've gone with the safest possible replacement, which might be a bit slow. I don't think this is critical path in any way that will affect performance, but if it is, we can work on that in 0.2.4. Fixes bug 7352.
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Excise PK_NO_PADDING entirely: Unpadded RSA is silly.Nick Mathewson2012-03-27
| | | | | | We never use it, so having it around is pointless. Suggested by Sebastian
* Refactor the API for setting up a block cipher.Nick Mathewson2012-03-27
| | | | | It allows us more flexibility on the backend if the user needs to specify the key and IV at setup time.
* Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
* Add macros to construct openssl version numbersNick Mathewson2012-01-10
| | | | | It's a pain to convert 0x0090813f to and from 0.9.8s-release on the fly, so these macros should help.
* Move DH_GENERATOR to crypto.c.George Kadianakis2011-11-25
|
* Do dynamic DH modulus storing in crypto.c.George Kadianakis2011-11-25
|
* Finishing touches.George Kadianakis2011-11-25
| | | | | - Make check-spaces happy. - Remove a stray header from crypto.h
* Rename 'dynamic prime' to 'dynamic DH modulus'.George Kadianakis2011-11-25
|
* Move crypto_get_stored_dynamic_prime() to crypto.cGeorge Kadianakis2011-11-24
|
* Move store_dynamic_prime() to crypto.c.George Kadianakis2011-11-24
|
* Implement dynamic prime reading and storing to disk.George Kadianakis2011-11-24
|
* Make DynamicPrimes SIGHUP-able.George Kadianakis2011-11-24
| | | | | | Instead of passing the DynamicPrimes configuration option to crypto_global_init(), generate and set a new TLS DH prime when we read the torrc.
* Rename "Rakshasa" to "Dynamic Prime".George Kadianakis2011-11-24
|
* Introduce the DynamicPrimes configuration option.George Kadianakis2011-11-24
|
* Copy/Paste Jake's stuff.George Kadianakis2011-11-24
| | | | | | This commit copies parts of Jake's f3bb6846975193d9a6649c31f94bda47e4014070 commit verbatim to the current master.
* Add a sha256 hmac function, with testsNick Mathewson2011-10-10
|
* New function to get all digests of a public keyNick Mathewson2011-10-10
|
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-03
|\
| * Reject 128-byte keys that are not 1024-bitNick Mathewson2011-06-03
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-16
|\|
| * Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-05-16
| |\ | | | | | | | | | | | | | | | | | | | | | Fixed trivial conflict due to headers moving into their own .h files from or.h. Conflicts: src/or/or.h
| | * squash! Add crypto_pk_check_key_public_exponent functionNick Mathewson2011-05-16
| | | | | | | | | | | | | | | | | | 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.
| | * Add crypto_pk_check_key_public_exponent functionRobert Ransom2011-05-16
| | |
| | * Make the DH parameter we use for TLS match the one from Apache's mod_sslNick Mathewson2011-02-10
| | | | | | | | | | | | | | | | | | | | | | | | 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 5ed73e3807d90dd0a3)
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-02-03
|\| |
| * | Remove an unused function in crypto.cNick Mathewson2011-01-25
| | |
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-24
|\| |
| * | Make the DH parameter we use for TLS match the one from Apache's mod_sslNick Mathewson2011-01-24
| | | | | | | | | | | | | | | | | | 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.
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-15
|\| |
| * | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-15
| |\| | | | | | | | | | | | | | | | Conflicts: src/or/routerparse.c src/or/test.c
| | * Merge branch 'bug2352_obsize' into maint-0.2.1Nick Mathewson2011-01-15
| | |\
| | | * Add logic in routerparse to not read overlong private keysNick Mathewson2011-01-10
| | | | | | | | | | | | | | | | | | | | I am not at all sure that it is possible to trigger a bug here, but better safe than sorry.
* | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-15
|\| | |
| * | | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-15
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/or/config.c src/or/networkstatus.c src/or/rendcommon.c src/or/routerparse.c src/or/test.c
| | * | Fix a heap overflow found by debuger, and make it harder to make that ↵Nick Mathewson2011-01-15
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\| |
| * | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
| |\| | | | | | | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| | * Bump copyright statements to 2011Nick Mathewson2011-01-03
| | |
* | | Document and/or fix stuff found by Sebastian in code reviewNick Mathewson2010-09-27
|/ / | | | | | | Thanks to Sebastian for his code-review of the bufferevents patch series.x
* | Add a function to return a double in range [0,1).Nick Mathewson2010-06-22
| |
* | Merge remote branch 'origin/maint-0.2.1'Nick Mathewson2010-02-27
|\| | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| * Update Tor Project copyright yearsNick Mathewson2010-02-27
| |
| * Update copyright to 2009.Karsten Loesing2009-05-04
| |
* | crypto_cipher_set_key cannot failSebastian Hahn2009-10-27
| | | | | | | | | | | | | | In 5e4d53d535a3cc9903250b3df0caa829f1c5e4bf 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.
* | Reduce log level for someone else sending us weak DH keys.Karsten Loesing2009-10-25
| | | | | | | | | | | | | | | | 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.
* | Parse detached signature documents with multiple flavors and algorithms.Nick Mathewson2009-10-15
| |
* | Refactor consensus signature storage for multiple digests and flavors.Nick Mathewson2009-10-15
| | | | | | | | | | | | | | | | 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>.
* | Support for encoding and decoding 256-bit digests in base64Nick Mathewson2009-10-15
| |