aboutsummaryrefslogtreecommitdiff
path: root/src/common/aes.c
Commit message (Collapse)AuthorAge
* Downgrade "EVP ctr128 is ok" message to infoNick Mathewson2012-09-10
| | | | Part of 6736 effort to try to make startup quieter.
* Don't log about Libevent/OpenSSL initialization when all's wellNick Mathewson2012-09-06
| | | | | OTOH, log the Libevent and OpenSSL versions on the first line when we're starting Tor.
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Bump _WIN32_WINNT to 0x0501 throughout the codeNick Mathewson2012-05-14
| | | | | | | | | This tells the windows headers to give us definitions that didn't exist before XP -- like the ones that we need for IPv6 support. See bug #5861. We didn't run into this issue with mingw, since mingw doesn't respect _WIN32_WINNT as well as it should for some of its definitions.
* Remove all instances of WIN32_WINNT (without leading _)Nick Mathewson2012-05-14
| | | | | We started adding it in 59e2c77824840f back in 2004, 8 years and 3 days ago. It's time to deprogram ourselves from this cargo cult.
* MSVC build issue: add magic to make openssl headers in aes.c workNick Mathewson2012-05-14
|
* Use OpenSSL 1.0.1's EVP aes_ctr implementation when availableNick Mathewson2012-03-27
| | | | This should be really fast on Intel chips.
* 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 missing documentation for counter-mode checksNick Mathewson2012-01-10
|
* Clean up indentation in aes.cNick Mathewson2012-01-10
|
* Test for broken counter-mode at runtimeNick Mathewson2012-01-10
| | | | | | | | | | | To solve bug 4779, we want to avoid OpenSSL 1.0.0's counter mode. But Fedora (and maybe others) lie about the actual OpenSSL version, so we can't trust the header to tell us if it's safe. Instead, let's do a run-time test to see whether it's safe, and if not, use our built-in version. fermenthor contributed a pretty essential fixup to this patch. Thanks!
* 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.
* Require openssl 1.0.0a for using openssl's ctr-mode implementationNick Mathewson2011-12-27
| | | | | | | | Previously we required 1.0.0, but there was a bug in the 1.0.0 counter mode. Found by Pascal. Fixes bug 4779. A more elegant solution would be good here if somebody has time to code one.
* Use openssl's counter mode implementation when we have 1.0.0 or laterNick Mathewson2011-11-25
| | | | | | | | | | | | | This shaves about 7% off our per-cell AES crypto time for me; the effect for accelerated AES crypto should be even more, since the AES calculation itself will make an even smaller portion of the counter-mode performance. (We don't want to do this for pre-1.0.0 OpenSSL, since our AES_CTR implementation was actually faster than OpenSSL's there, by about 10%.) Fixes issue #4526.
* Use EVP for AES only when hardware accel is presentNick Mathewson2011-11-25
| | | | Fixes bug 4525, fix on 0.2.3.8-alpha.
* Remove vestiges of RIJNDAEL_COUNTER_OPTIMIZATIONNick Mathewson2011-11-11
|
* Stop using "u32" and "u8" in aes.cNick Mathewson2011-11-11
|
* Dump our internal AES implementationNick Mathewson2011-11-11
| | | | | | | | This thing was pretty pointless on versions of OpenSSL 0.9.8 and later, and almost totally pointless on OpenSSL 1.0.0. Also, favor EVP by default, since it lets us get hardware acceleration where present. (See issue 4442)
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-03-16
|\ | | | | | | | | | | | | Trivial Conflicts in src/common/crypto.c src/or/main.h src/or/or.h
| * Doxygen documentation for about 100 things that didn't have anyNick Mathewson2011-03-16
| | | | | | | | About 860 doxygen-less things remain in 0.2.2
* | 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
| | |
* | | Improve accuracy of comment about aes_crypt performanceNick Mathewson2010-10-15
|/ / | | | | | | | | | | | | The old comment was from before I tried a huge pile of crazy stuff to make the inner loop faster. Short answer: GCC already knows how to unroll loops pretty well. Other short answer: we should have made the relay payload size an even multiple of 4, 8, or ideally 16.
* | 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 '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
| |
| * Zero a cipher completely before freeing itSebastian Hahn2010-02-26
| | | | | | | | | | | | We used to only zero the first ptrsize bytes of the cipher. Since cipher is large enough, we didn't zero too many bytes. Discovered and fixed by ekir. Fixes bug 1254.
* | Zero a cipher completely before freeing itSebastian Hahn2010-02-22
| | | | | | | | | | | | We used to only zero the first ptrsize bytes of the cipher. Since cipher is large enough, we didn't zero too many bytes. Discovered and fixed by ekir. Fixes bug 1254.
* | *_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.
* Spell-check Tor.Nick Mathewson2009-05-27
|
* Update copyright to 2009.Karsten Loesing2009-05-04
|
* 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
* r18753@catbus: nickm | 2008-03-11 14:56:39 -0400Nick Mathewson2008-03-11
| | | | | | | Make some assert()s into tor_assert()s. Make some tor_assert()s called from logging into assert()s, and document why. svn:r13977
* other cleanups that have been sitting in my sandboxRoger Dingledine2008-02-21
| | | | svn:r13649
* r18051@catbus: nickm | 2008-02-12 15:20:43 -0500Nick Mathewson2008-02-12
| | | | | | | Re-tune mempool parametes based on testing on peacetime: use smaller chuncks, free them a little more aggressively, and try very hard to concentrate allocations on fuller chunks. Also, lots of new documentation. svn:r13484
* doxygen and other cleanupsRoger Dingledine2008-02-09
| | | | svn:r13440
* r17963@catbus: nickm | 2008-02-07 10:14:25 -0500Nick Mathewson2008-02-07
| | | | | | | Be more thorough about memory poisoning and clearing. Add an in-place version of aes_crypt in order to remove a memcpy from relay_crypt_one_payload. svn:r13414
* Update some copyright notices: it is now 2008.Nick Mathewson2008-02-07
| | | | svn:r13412
* clean up copyrights, and assign 2007 copyrights to The Tor Project, IncRoger Dingledine2007-12-12
| | | | svn:r12786
* r15530@catbus: nickm | 2007-10-04 12:16:27 -0400Nick Mathewson2007-10-04
| | | | | | | Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke. svn:r11761
* r15512@catbus: nickm | 2007-10-02 16:27:43 -0400Nick Mathewson2007-10-02
| | | | | | | Make some functions static; remove some dead code. svn:r11750
* r14532@Kushana: nickm | 2007-09-20 13:25:38 -0400Nick Mathewson2007-09-20
| | | | | | | Clean up some macros in aes.c svn:r11537
* r15210@catbus: nickm | 2007-09-20 13:04:05 -0400Nick Mathewson2007-09-20
| | | | | | | Re-optimize counter-mode: save about 15% on my core2 by (1) not regenerating the entire counter buffer every time we encrypt a block of keystream (2) using the platform-optimized htonl to convert to big-endian (It's a single instruction on 486 and later ) and (3) not even keeping a separate "counter" and "buffer" when the platform is big-endian. The third still needs testing. svn:r11536
* poke at svn until it compiles. nick, you should decide if thisRoger Dingledine2007-09-20
| | | | | | | is what you meant to do. svn:r11529
* r15171@catbus: nickm | 2007-09-19 11:44:54 -0400Nick Mathewson2007-09-19
| | | | | | | Switch our AES implementation from "128 bit counter with to 64 bits set to 0" to a proper implementation of counter mode. Also, add an aes_set_iv function to initialize the counter to a nonzero value. svn:r11518
* r12011@catbus: nickm | 2007-02-28 18:13:32 -0500Nick Mathewson2007-03-01
| | | | | | | Back out insufficiently evidenced FULL_UNROLL in aes.c svn:r9693
* r11976@catbus: nickm | 2007-02-27 19:35:59 -0500Nick Mathewson2007-02-28
| | | | | | | Add some missing (redundant but helpful in most cases) static declarations, and remove a function nobody was calling. svn:r9672
* Add a missing paren, and the results of an experiment.Nick Mathewson2007-02-27
| | | | svn:r9664