[tor-bugs] #4442 [Tor Relay]: The crypto in aes.c should use openssl's EVP_ functions.

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Nov 9 01:31:23 UTC 2011


#4442: The crypto in aes.c should use openssl's EVP_ functions.
-------------------------+--------------------------------------------------
 Reporter:  nickm        |          Owner:                    
     Type:  enhancement  |         Status:  new               
 Priority:  major        |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay    |        Version:                    
 Keywords:               |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------
 It looks like we're not getting the full benefits of OpenSSL's hardware
 acceleration support, since the AES_encrypt function does the crypto
 directly in C or asm (typically asm), rather than redirecting to an engine
 if one is present.

 Whoops!

 So, let's fix that.


 I believe that it's sufficient to just define USE_OPENSSL_EVP in aes.c.
 Also, we should really rip out the bits of that file which we don't use --
 we're no longer in a position where our fallback implementation is ever a
 better idea to openssl's.

 We should benchmark this change to make sure that it's not a step
 backwards -- I doubt it is.

 Also, we should consider using EVP_ functions for SHA1 and SHA256 when
 present.  For RSA and DH, however, the OpenSSL RSA_ and DH_ functions
 already know about engines.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4442>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list