-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
core/crypto: More improvements #4124
base: master
Are you sure you want to change the base?
Conversation
Yawning
commented
Aug 23, 2024
•
edited
Loading
edited
- Cleanups/improvements
- Refactor the blake2 code to use SIMD?
- (AMD64) Support hardware accelerated SHA-224/SHA-256.
- Switch to using context-less panic
- Improve/add benchmarks
- More algorithms?
- Add X448
- AEGIS
- Deoxys-II
- Argon2
- ChaCha8Rng
8450ddd
to
26fb0a1
Compare
b6f512d
to
363df33
Compare
4198575
to
f69bb60
Compare
7d37012
to
00e013b
Compare
6f62ca6
to
e8dc9bc
Compare
e8dc9bc
to
0dedf4a
Compare
6c91c67
to
78d9d75
Compare
cadf7c9
to
d77b40d
Compare
d77b40d
to
a50bac3
Compare
- Detect the RISC-V `v` profile - Don't bother trying to process 4 blocks at a time if emulated
- Use text/table for results - Add more benchmarks
a50bac3
to
384c6c2
Compare
st.rate = _RATE_128L | ||
|
||
for _ in 0 ..< 10 { | ||
update_hw_128l(st, iv, key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a bit of performance improvement: since the input is constant, and we don't need to compute a key stream here, the state can be kept in bitsliced form during the initialization rounds. Same for finalization.
In bitsliced form, the rotation of the AES blocks is just a one-bit shift of the bytes.
During AD absorption, you can also keep the state in bitsliced form, and only bitslice the input blocks.
Also for the sbox, there are faster circuits than the Boyar-Peralta: https://eprint.iacr.org/2019/802.pdf