Skip to content
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

aes: enable ARMv8 backend by default; MSRV 1.72 #395

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Jan 6, 2024

Removes cfg(aes_armv8) and instead enables it by default. This means it "just works" without any additional configuration.

The backend is MSRV 1.72, so for consistency's sake bumps the crate's MSRV to 1.72, i.e. the MSRV where it will work consistently on all platforms. We've done varying MSRVs for specific features in the past, but that gets complicated and confusing (e.g. if we were to say the crate's MSRV varies by target).

Benchmarks

test aes128_decrypt_block  ... bench:         839 ns/iter (+/- 32) = 19528 MB/s
test aes128_decrypt_blocks ... bench:         858 ns/iter (+/- 58) = 19095 MB/s
test aes128_encrypt_block  ... bench:         839 ns/iter (+/- 34) = 19528 MB/s
test aes128_encrypt_blocks ... bench:         855 ns/iter (+/- 57) = 19162 MB/s
test aes128_new            ... bench:          72 ns/iter (+/- 2)
test aes192_decrypt_block  ... bench:         997 ns/iter (+/- 47) = 16433 MB/s
test aes192_decrypt_blocks ... bench:       1,002 ns/iter (+/- 56) = 16351 MB/s
test aes192_encrypt_block  ... bench:         990 ns/iter (+/- 31) = 16549 MB/s
test aes192_encrypt_blocks ... bench:       1,003 ns/iter (+/- 32) = 16334 MB/s
test aes192_new            ... bench:          68 ns/iter (+/- 2)
test aes256_decrypt_block  ... bench:       1,163 ns/iter (+/- 34) = 14087 MB/s
test aes256_decrypt_blocks ... bench:       1,151 ns/iter (+/- 65) = 14234 MB/s
test aes256_encrypt_block  ... bench:       1,166 ns/iter (+/- 38) = 14051 MB/s
test aes256_encrypt_blocks ... bench:       1,155 ns/iter (+/- 81) = 14185 MB/s
test aes256_new            ... bench:          91 ns/iter (+/- 4)

Removes `cfg(aes_armv8)` and instead enables it by default. This means
it "just works" without any additional configuration.

The backend is MSRV 1.72, so for consistency's sake bumps the crate's
MSRV to 1.72, i.e. the MSRV where it will work consistently on all
platforms. We've done varying MSRVs for specific features in the past,
but that gets complicated and confusing (e.g. if we were to say the
crate's MSRV varies by target).

Benchmarks:

test aes128_decrypt_block  ... bench:         839 ns/iter (+/- 32) = 19528 MB/s
test aes128_decrypt_blocks ... bench:         858 ns/iter (+/- 58) = 19095 MB/s
test aes128_encrypt_block  ... bench:         839 ns/iter (+/- 34) = 19528 MB/s
test aes128_encrypt_blocks ... bench:         855 ns/iter (+/- 57) = 19162 MB/s
test aes128_new            ... bench:          72 ns/iter (+/- 2)
test aes192_decrypt_block  ... bench:         997 ns/iter (+/- 47) = 16433 MB/s
test aes192_decrypt_blocks ... bench:       1,002 ns/iter (+/- 56) = 16351 MB/s
test aes192_encrypt_block  ... bench:         990 ns/iter (+/- 31) = 16549 MB/s
test aes192_encrypt_blocks ... bench:       1,003 ns/iter (+/- 32) = 16334 MB/s
test aes192_new            ... bench:          68 ns/iter (+/- 2)
test aes256_decrypt_block  ... bench:       1,163 ns/iter (+/- 34) = 14087 MB/s
test aes256_decrypt_blocks ... bench:       1,151 ns/iter (+/- 65) = 14234 MB/s
test aes256_encrypt_block  ... bench:       1,166 ns/iter (+/- 38) = 14051 MB/s
test aes256_encrypt_blocks ... bench:       1,155 ns/iter (+/- 81) = 14185 MB/s
test aes256_new            ... bench:          91 ns/iter (+/- 4)
@tarcieri tarcieri requested a review from newpavlov January 6, 2024 21:53
@tarcieri tarcieri merged commit d2756ce into master Jan 7, 2024
25 checks passed
@tarcieri tarcieri deleted the aes/armv8-backend-by-default branch January 7, 2024 15:14
@nazar-pc
Copy link

nazar-pc commented Feb 5, 2024

Would be great to see a new crate version published with this change 🚀

@tarcieri
Copy link
Member Author

tarcieri commented Feb 5, 2024

It's a breaking change per our MSRV policy. It won't be available until aes v0.9

@nazar-pc
Copy link

nazar-pc commented Feb 5, 2024

What prevents you from releasing 0.9.0 today?

@tarcieri
Copy link
Member Author

tarcieri commented Feb 5, 2024

A whole pile of prerelease crates it's built on

@nazar-pc
Copy link

nazar-pc commented Feb 5, 2024

I see, makes sense. Is there an ETA by any chance?
Looked for release schedule or tracking issue for upcoming release and didn't find any.

@tarcieri
Copy link
Member Author

tarcieri commented Feb 5, 2024

We're in a new release cycle that involves hundreds of crates. As a rough estimate I'd say "probably the first half of 2024", but keep in mind the work is being done by unpaid volunteers in their spare time so we don't exactly have a definitive schedule or estimates

@nazar-pc
Copy link

nazar-pc commented Feb 5, 2024

Totally understandable, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants