aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.c
Commit message (Collapse)AuthorAge
* Rename log.h to torlog.hNick Mathewson2010-07-09
| | | | | | | | | | This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
* Merge remote branch 'public/rand_double2'Nick Mathewson2010-06-29
|\
| * Make cbt_generate_sample use crypto_rand_double()Nick Mathewson2010-06-25
| | | | | | | | Possible workaround for bug 1139, if anybody cares.
| * Add a function to return a double in range [0,1).Nick Mathewson2010-06-22
| |
* | Log an error if openssl fails to copy a key for usNick Mathewson2010-06-22
|/ | | | | | | This should never happen unless openssl is buggy or some of our assumptions are deeply wrong, but one of those might have been the cause of the not-yet-reproducible bug 1209. If it ever happens again, let's get some info we can use.
* 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
| |
* | Merge commit 'origin/maint-0.2.1'Nick Mathewson2009-12-15
|\|
| * Fix bug 1173: remove an assert(unsigned >= 0).Nick Mathewson2009-12-15
| |
* | Merge commit 'sebastian/coverity'Nick Mathewson2009-12-12
|\ \
| * | 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.
* | | *_free functions now accept NULLSebastian Hahn2009-12-12
|/ / | | | | | | | | | | | | | | Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary.
* | Remove checks for array existence. (CID 410..415)Nick Mathewson2009-10-26
| | | | | | | | | | | | | | | | | | | | | | | | In C, the code "char x[10]; if (x) {...}" always takes the true branch of the if statement. Coverity notices this now. In some cases, we were testing arrays to make sure that an operation we wanted to do would suceed. Those cases are now always-true. In some cases, we were testing arrays to see if something was _set_. Those caes are now tests for strlen(s), or tests for !tor_mem_is_zero(d,len).
* | 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.
* | Document the microdescriptor code better.Nick Mathewson2009-10-18
| |
* | 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
| |
* | Alter keygen function to generate keys of different lengths.Nick Mathewson2009-09-29
| |
* | Disable OpenSSL engines when building for Android.Nathan Freitas2009-09-29
| | | | | | | | | | | | | | | | Apparently the Android developers dumped OpenSSL's support for hardware acceleration in order to save some memory, so you can't build programs using engines on Android. [Patch revised by nickm]
* | Include util.h and log.h as relative paths.Nathan Freitas2009-09-29
| | | | | | | | | | | | | | This shouldn't be necessary, but apparently the Android cross-compiler doesn't respect -I as well as it should. (-I is supposed to add to the *front* of the search path. Android's gcc wrapper apparently likes to add to the end. This is broken, but we need to work around it.)
* | Make crypto_digest_get_digest nondestructive again.Nick Mathewson2009-08-20
| | | | | | | | Fixes bug in f57883a39.
* | Add a SHA256 implementation for platforms that lack it.Nick Mathewson2009-08-20
| | | | | | | | | | | | | | | | | | | | (This would be everywhere running OpenSSL 0.9.7x and earlier, including all current Macintosh users.) The code is based on Tom St Denis's LibTomCrypt implementation, modified to be way less general and use Tor's existing facilities. I picked this one because it was pretty fast and pretty free, and because Python uses it too.
* | Add basic support for SHA256.Nick Mathewson2009-08-19
| | | | | | | | This adds an openssl 0.9.8 dependency. Let's see if anybody cares.
* | Merge branch 'hardware_accel_improvements'Nick Mathewson2009-05-31
|\ \ | |/ |/|
| * Add support for dynamic OpenSSL hardware crypto acceleration engines.Martin Peck2009-05-23
| |
| * Update copyright to 2009.Karsten Loesing2009-05-02
| |
* | Fixes to spelling fixes. Thanks, Roger!Nick Mathewson2009-05-28
| |
* | Spell-check Tor.Nick Mathewson2009-05-27
| |
* | Update copyright to 2009.Karsten Loesing2009-05-04
|/
* Make sure that even in the weird fiddly paths that lead to init_keys,Nick Mathewson2009-01-21
| | | | | | | | | | crypto_global_init gets called. Also have it be crypto_global_init that calls crypto_seed_rng, so we are not dependent on OpenSSL's RAND_poll in these fiddly cases. Should fix bug 907. Bugfix on 0.0.9pre6. Backport candidate. svn:r18210
* Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson2009-01-04
| | | | | | | | 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
* Use RSA_generate_key_ex where available.Nick Mathewson2008-12-29
| | | | svn:r17804
* Make freelist_len in memarea.c static; document a few variables.Nick Mathewson2008-12-22
| | | | svn:r17741
* Fix most DOCDOCs remaining and/or added by redox.Nick Mathewson2008-12-22
| | | | svn:r17734
* Add DOCDOC comments for all undocumented functions. Add missing *s to other ↵Nick Mathewson2008-12-22
| | | | | | comments so that they will get recognized as doxygen. svn:r17729
* Ben confirms that the MUST in rfc2631 is only for compatibility with X9.42, ↵Nick Mathewson2008-12-18
| | | | | | and isn't actually a security thing. svn:r17685
* Fix bug 889: share deep-copied keys between threads to avoid races in ↵Nick Mathewson2008-12-18
| | | | | | reference counts. Bugfix on 0.1.0.1-rc. svn:r17672
* Use ctags and a python script to find identifiers that are never used ↵Nick Mathewson2008-12-17
| | | | | | anywhere, and remove the ones that we really want gone. svn:r17651
* Clean up some redundant stuff in crypto_dh_new().Nick Mathewson2008-09-05
| | | | svn:r16778
* The first of Karsten's proposal 121 patches: configure and maintain client ↵Nick Mathewson2008-08-08
| | | | | | authorization data. Tweaked a bit: see comments on or-dev. svn:r16475
* r16587@tombo: nickm | 2008-06-28 00:13:40 -0400Nick Mathewson2008-06-28
| | | | | | | fix for bug 704; found by sjmurdoch. Windows and recent openssl both want to define OCSP_RESPONSE; do not let them. svn:r15533
* Set dynamic-locking callbacks in openssl. These can be more efficient when ↵Nick Mathewson2008-06-13
| | | | | | openssl uses them. svn:r15222
* Remov unused macro in crypto.cNick Mathewson2008-06-04
| | | | svn:r14950
* r15558@tombo: nickm | 2008-05-09 04:35:12 -0400Nick Mathewson2008-05-09
| | | | | | | New (temporary) tool to dump the modulus of a key. May help with a project of weasel's. svn:r14580
* r19004@catbus: nickm | 2008-03-21 15:18:43 -0400Nick Mathewson2008-03-21
| | | | | | | Use RAND_poll() again: the bug that made us stop using it has been fixed. svn:r14150
* r14422@tombo: nickm | 2008-02-24 17:09:56 -0500Nick Mathewson2008-02-24
| | | | | | | Whitespace fixes svn:r13700
* r14399@tombo: nickm | 2008-02-22 14:09:38 -0500Nick Mathewson2008-02-22
| | | | | | | More 64-to-32 fixes. Partial backport candidate. still not done. svn:r13680
* r14374@tombo: nickm | 2008-02-21 16:57:39 -0500Nick Mathewson2008-02-21
| | | | | | | Fix all remaining shorten-64-to-32 errors in src/common. Some were genuine problems. Many were compatibility errors with libraries (openssl, zlib) that like predate size_t. Partial backport candidate. svn:r13665
* r14373@tombo: nickm | 2008-02-21 16:29:18 -0500Nick Mathewson2008-02-21
| | | | | | | Apply warnings about implicit 64-to-32 conversions; some from Sebastian Hahn; some not. svn:r13664