-
Notifications
You must be signed in to change notification settings - Fork 131
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
Unify the aes
, aesni
, aes-ctr
, and aes-soft
crates
#200
Conversation
2d71c31
to
4479823
Compare
e79b4b6
to
ec205ca
Compare
Combines all three crates into a single `aes` crate. The optional `ctr` feature exposes a consistent set of `Aes*Ctr` types as well.
ec205ca
to
fc0f22d
Compare
aes
, aesni
, and aes-soft
cratesaes
, aesni
, and aes-soft
crates
I was a bit torn on whether to call this a breaking change (i.e. bumping the version to It seems like the only breaking case would be treating the types exported from Given that, I think it's safe to call it backwards compatible. We could potentially release this as v0.6.1, and yank the previous v0.6.0 to prevent any shenanigans. |
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.
I thought that unification is worth only with added runtime detection. Otherwise AES-NI support will be hard to find for users who do not use the aes
crate directly. In other words most users will use the software implementation, while with the current implementation they may notice aes-soft
in their build log. I think I've seen projects which use aesni
directly to motivate users to enable the aes
target feature.
But I guess if we'll add the runtime detection before the next minor cipher
version, merging crate now should not be a problem.
We definitely need it for that. The current target-based gating of But also it's unclear how to add things like ARM acceleration (#10), which is especially important given the recent launch of the Apple M1. Would that otherwise go into |
Hardware accelerated backends will need unsafe code
AFAIK the ideal solution is blocked on rust-lang/rfcs#2725. Meanwhile we would have to either write platform-specific code to extract available features, continue to rely on |
Think I addressed all of the outstanding comments. Re: An additional remaining question is still whether if this is merged, whether it could be published as v0.6.1, or if we should hold off and do a |
I think we can merge but do not publish just yet. |
Bumps the `aes` crate version to indicate we'll be making breaking changes before the next release (i.e. `cipher` crate upgrade). Also removes the `aesni` and `aes-soft` crates from the README.md table now that they've been unified into the `aes` crate (#200)
Combines all four crates into a single
aes
crate.The optional
ctr
feature exposes a consistent set ofAes*Ctr
types.cc @peterdettman