-
Notifications
You must be signed in to change notification settings - Fork 915
Rust wrapper: add one-shot XChaCha20-Poly1305 encrypt/decrypt functions #9624
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
base: master
Are you sure you want to change the base?
Rust wrapper: add one-shot XChaCha20-Poly1305 encrypt/decrypt functions #9624
Conversation
| const byte *inKey, word32 inKeySz, | ||
| const byte *inIV, word32 inIVSz, | ||
| const byte *nonce, word32 nonce_len, | ||
| const byte *key, word32 key_len, |
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.
The parameter order was incorrect for this function. I talked with @douzzer about it and updating the prototype to match the implementation made the most sense.
I originally was planning to wrap this function with a chunking API for XChaCha20-Poly1305 but ended up not needing that right now and there are not corresponding encrypt/decrypt functions for XChaCha20-Poly1305 like there are for ChaCha20-Poly1305 so I am omitting a Rust wrapper for that at the moment.
5a57fcd to
a9b2e83
Compare
|
retest this please (org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 6493d207-3f8e-4bc5-8da5-109f99226a50 |
|
🛟 Devin Lifeguard found 1 likely issues in this PR
@holtrop-wolfssl |
|
|
||
| #[cfg(xchacha20_poly1305)] | ||
| pub struct XChaCha20Poly1305 { | ||
| } |
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.
Although this struct is empty right now, if we do go back and add the streaming/chunking API for XChaCha20Poly1305, a field will be added here. I set it up to use a struct to future-proof for this and to maintain symmetry with the ChaCha20Poly1305 interface above.
Description
Rust wrapper: add one-shot XChaCha20-Poly1305 encrypt/decrypt functions
Testing
CI / unit tests
Checklist