-
Notifications
You must be signed in to change notification settings - Fork 255
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
Upgrade dependencies #94
Conversation
.ok()?, | ||
CHACHA20_BLOCK_SIZE + COMPACT_NOTE_SIZE | ||
); | ||
// Start from block 1 to skip over Poly1305 keying output |
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.
Everything else LGTM but I'm curious what prompted this change?
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.
Also there is no longer an assert
, that's fine yes?
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.
See #69 (comment) for the context.
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.
And yes, there's no longer an assert because ChaCha20Ietf::xor
mutates in-place and doesn't return anything.
// Start from block 1 to skip over Poly1305 keying output | ||
let mut plaintext = [0; COMPACT_NOTE_SIZE]; | ||
plaintext.copy_from_slice(&enc_ciphertext); | ||
ChaCha20Ietf::xor(key.as_bytes(), &[0u8; 12], 1, &mut plaintext); |
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'm assuming the 3rd argument is the signifier of which block to start from instead of prefixing with a 'block' of zero bytes?
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.
Correct. See RFC 7539 section 2.8 for details.
LGTM, will re-review once #92 is merged. |
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.
LGTM!
Rebased on master to fix merge conflicts after #92 was merged. |
No description provided.