Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4525 closed defect (fixed)

Use AES_* when no AES engine is set; use EVP_* otherwise

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Benchmarking shows about 5% overhead for using the EVP_* aes functions over using the AES_* functions, when no accelerators are present. This holds true both on openssl 0.9.7 and 1.0.0, and on OSX 32-bit, atom 64-bit, and Core2 quad 8200 systems, so it's probably a fairly consistent finding.

With #4442, we made our aes code use EVP always, which is a big win with accelerated AES, but a small loss without. Let's fix that.

Child Tickets

Change History (5)

comment:1 Changed 8 years ago by nickm

Status: newneeds_review

See commit 4fd226b12dafad7494e5d941cda2ad9594e16014 in my branch "more_aes_hackery". The final branch will also have a fix for #4526

comment:2 Changed 8 years ago by nickm

Oops; make that commit a0f471b8fddbdac0651

comment:3 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Tested more, cleaned up, squashed some commeits. This (and #4526) are an even bigger win on less beefy platforms. On my cute little atom laptop, they make the cell_aes benchmark run 15-20% faster.

Merging as threatened.

comment:4 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:5 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.