-
Notifications
You must be signed in to change notification settings - Fork 193
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
Add Nonce, Tag sizes to Aead Traits #489
Comments
We have a similar method in the It's also may be worth to consider addition of an object-safe trait similar to |
Is there a design document for const generics? Curious what that looks like. |
I was planning a refactor of the Right now several of the traits ( I'd like to extract the sizes onto a new trait (I was thinking That's all perhaps orthogonal to things like helper methods for computing a Edit: opened #508 |
Refactoring to allow Nonce and Tag to work across all the traits (without the need for special cases like XNonce) would be super handy. |
I've been experimenting with the AEAD implementations, such as chacha20poly1305, by creating a vector of the appropriate size and putting the nonce, ciphertext, and tag into it. However, it's tricky to do this if one does not know the nonce or tag size until runtime, for example when giving the user the choice of AEADs. Would the project be receptive to adding a trait such as this to the implemented AEADs?
That would enable one to create the appropriate-sized buffers in, say a blanket implementation such as:
The text was updated successfully, but these errors were encountered: