aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.c
Commit message (Expand)AuthorAge
* Use EVP for AES only when hardware accel is present•••Fixes bug 4525, fix on 0.2.3.8-alpha. Nick Mathewson2011-11-25
* Remove some duplicate includesAndrea Gelmini2011-11-03
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-10-26
|\
| * Make internal error check for unrecognized digest algorithm more robust•••Fixes Coverity CID 479. Nick Mathewson2011-10-06
* | Remove a no-longer-relevant commentNick Mathewson2011-10-10
* | Add a sha256 hmac function, with testsNick Mathewson2011-10-10
* | New function to get all digests of a public keyNick Mathewson2011-10-10
* | Make WIN32_WINNT defines conditional•••Requested by Gisle Vanem on tor-dev. I'm not quite sure this is the right solution, but it's probably harmless. Nick Mathewson2011-07-15
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-06
|\|
| * Check maximum properly in crypto_rand_int()•••George Kadianakis notes that if you give crypto_rand_int() a value above INT_MAX, it can return a negative number, which is not what the documentation would imply. The simple solution is to assert that the input is in [1,INT_MAX+1]. If in the future we need a random-value function that can return values up to UINT_MAX, we can add one. Fixes bug 3306; bugfix on 0.2.2pre14. Nick Mathewson2011-06-06
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-03
|\|
| * 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. Nick Mathewson2011-06-03
* | 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.2•••Fixed trivial conflict due to headers moving into their own .h files from or.h. Conflicts: src/or/or.h Nick Mathewson2011-05-16
| |\
| | * 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. Nick Mathewson2011-05-16
| | * Add crypto_pk_check_key_public_exponent functionRobert Ransom2011-05-16
* | | Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023•••Conflicts in various places, mainly node-related. Resolved them in favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022. src/common/Makefile.am src/or/circuitlist.c src/or/connection_edge.c src/or/directory.c src/or/microdesc.c src/or/networkstatus.c src/or/router.c src/or/routerlist.c src/test/test_util.c Nick Mathewson2011-05-11
|\| |
| * | Merge remote-tracking branch 'public/3122_memcmp_squashed' into bug3122_memcm...•••Conflicts throughout. All resolved in favor of taking HEAD and adding tor_mem* or fast_mem* ops as appropriate. src/common/Makefile.am src/or/circuitbuild.c src/or/directory.c src/or/dirserv.c src/or/dirvote.c src/or/networkstatus.c src/or/rendclient.c src/or/rendservice.c src/or/router.c src/or/routerlist.c src/or/routerparse.c src/or/test.c Nick Mathewson2011-05-11
| |\|
| | * Hand-conversion and audit phase of memcmp transition•••Here I looked at the results of the automated conversion and cleaned them up as follows: If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I changed it to a fast_memcmp or fast_memeq. Otherwise if there was a tor_memcmp that could turn into a tor_memneq or tor_memeq, I converted it. This wants close attention. [*] I'm erring on the side of caution here, and leaving some things as tor_memcmp that could in my opinion use the data-dependent fast_memcmp variant. Nick Mathewson2011-05-11
| | * Automated conversion of memcmp to tor_memcmp/tor_mem[n]eq•••This commit is _exactly_ the result of perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch] perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch] git checkout src/common/di_ops.[ch] git checkout src/or/test.c git checkout src/common/test.h Nick Mathewson2011-05-11
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-27
|\| |
| * | Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2•••Conflicts: src/common/torint.h Nick Mathewson2011-04-27
| |\|
| | * Make SIZE_T_CEILING unsigned; add a signed SSIZE_T_CEILING•••None of the comparisons were _broken_ previously, but avoiding signed/unsigned comparisons makes everybody happier. Fixes bug2475. Nick Mathewson2011-04-26
| | * 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 5ed73e3807d90dd0a3) Nick Mathewson2011-02-10
* | | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/common/crypto.c Nick Mathewson2011-03-16
|\| |
| * | Clean up whitespaceNick Mathewson2011-03-16
* | | Merge remote-tracking branch 'origin/maint-0.2.2'•••Trivial Conflicts in src/common/crypto.c src/or/main.h src/or/or.h Nick Mathewson2011-03-16
|\| |
| * | Doxygen documentation for about 100 things that didn't have any•••About 860 doxygen-less things remain in 0.2.2 Nick Mathewson2011-03-16
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-02-03
|\| |
| * | Correctly detect BIO_new failures•••This bug was noticed by cypherpunks; fixes bug 2378. Bugfix on svn commit r110. Nick Mathewson2011-01-25
| * | Always treat failure to allocate an RSA key as an unrecoverable allocation errorNick Mathewson2011-01-25
| * | 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_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. Nick Mathewson2011-01-24
* | | 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
| |\|
| | * Zero out some more key data before freeing it•••Found by cypherpunks; fixes bug 2384. Nick Mathewson2011-01-15
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-15
|\| |
| * | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2•••Conflicts: src/or/routerparse.c src/or/test.c Nick Mathewson2011-01-15
| |\|
| | * Merge branch 'bug2352_obsize' into maint-0.2.1Nick Mathewson2011-01-15
| | |\
| | | * 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. Nick Mathewson2011-01-10
* | | | Remove some unnecessary occurrences of +1.•••I dug through the OpenSSL source and verified that RSA_private_decrypt will not write more than RSA_size(key) bytes to its output buffer. Robert Ransom2011-01-15
|/ / /
* | | 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 Nick Mathewson2011-01-15
|\| |
| * | Fix a heap overflow found by debuger, and make it harder to make that mistake...•••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) Nick Mathewson2011-01-15
| |/
* | Fix size_t vs unsigned comparison tooNick Mathewson2011-01-05
* | Fix up size and sign issues in base32 code•••Fixes bug 2331. Nick Mathewson2011-01-03
* | Merge remote branch 'sebastian/bug2314' into maint-0.2.2Nick Mathewson2011-01-03
|\ \
| * | Fix compile wanrings revealed by gcc 4.5 on mingwSebastian Hahn2010-12-27
* | | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2•••Conflicts: src/common/test.h src/or/test.c Nick Mathewson2011-01-03
|\ \ \ | |/ / |/| / | |/
| * Bump copyright statements to 2011Nick Mathewson2011-01-03