-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance optimizations #15
Milestone
Comments
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We used to manually generate a keystream and XOR it with the plaintext.
While this implemenation was correct, easy to review (and actually reviewed in two independent audits), it is not necessary.
It got therefore replaced with an easy-to-use BouncyCastle high-level API in commit 620a9ad:
siv-mode/src/main/java/org/cryptomator/siv/CustomCtrComputer.java
Lines 24 to 35 in 90b8cb6
Furthermore we added a JCE-based implementation in 90b8cb6:
siv-mode/src/main/java/org/cryptomator/siv/JceAesCtrComputer.java
Lines 39 to 51 in 90b8cb6
The immediate effect is a significant 20% speedup on JDK 8:
More importantly, this directly benefits from further optimizations in the JRE. With JDK 14 I get even faster computation times:
Benchmark results on CI server:
old vs new.
The text was updated successfully, but these errors were encountered: