-
Notifications
You must be signed in to change notification settings - Fork 130
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
threefish: add method to update tweak between encrypt/decrypt calls #459
Comments
We probably should first add a trait for tweakable block ciphers, see: RustCrypto/traits#177 |
That would be great. What's the timeline for feature development in RustCrypto like that? Weeks, months, years? |
Weeks (or less) if you want to get it into an unstable release, depending on the quality of the PR |
(I would personally love to see traits for tweakable block ciphers land finally) |
I guess the main question is what API style should we use: one where we pass tweak during en/decryption of each block, or one where we modify block cipher state with a |
Personally, I think encapsulating cipher state from the users is a better approach, but I don't have much context on the RustCrypto project and I'm not a cryptographer. I'm just a dude on the internet who wants a feature. Although, as you said adding |
Maybe RustCrypto/traits#177 is a better place for these discussions? |
Currently, there is no way to update the tweak value between successive encrypt/decrypt calls without creating a new cipher instance. This is inefficient and it would be appreciated if you added a way to update the tweak without creating a new cipher instance. I'm not sure it would be possible to add given that your current implementation stores all of the cipher state in a giant array
sk
, but in the original C implementationkeyCtx
is passed into every encrypt/decrypt call, which allowed the tweak to be changed between cipher calls without mucking with the rest of the cipher state.The text was updated successfully, but these errors were encountered: