-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ThreadLocal for Cipher instances in AesSiv and PrfAesCmac.
We already do the same thing for other key type, such as AES-GCM. See also: #36, and #24. I run some benchmarks for this, where I encrypt some data using AES-SIV many times. - For 1kb data, it get 2.5x faster for a single thread, and 5.6x faster for 10 threads in parallel. - For 32 bytes data, it gets 15x faster for a single thread, and 41x faster for 10 threads in parallel. PiperOrigin-RevId: 629075782 Change-Id: I6735eafe4670213af15084343a7f269885d1101b
- Loading branch information
1 parent
96e8c0d
commit e3074ae
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters