[tor-bugs] #4443 [Tor Relay]: Implement counter mode faster on x86 and x86_64

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Nov 10 15:32:40 UTC 2011


#4443: Implement counter mode faster on x86 and x86_64
-------------------------+--------------------------------------------------
 Reporter:  nickm        |          Owner:                    
     Type:  enhancement  |         Status:  new               
 Priority:  normal       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay    |        Version:                    
 Keywords:               |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------

Comment(by nickm):

 Replying to [comment:1 tmpname0901]:
 > From a performance perspective, unaligned memory access are Bad;
 accesses straddling cache lines are Really Bad; accesses straddling pages
 are Horrifically Bad.  I think you get the idea :-)

 FWIW, doing byte-at-a-time xors ain't so hot either.   I'll need to
 benchmark here: If you're right, then the openssl crypto/modes/ctr128.c
 implementation is incredibly stupid.  (Look at its logic when the
 STRICT_ALIGNMENT macro is undefined.)

 (Note to self: never ever ever design another protocol where things get
 encrypted in chunks of bytes not a multiple of 8.)

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


More information about the tor-bugs mailing list