Repository navigation
Fix counter and nonce handling in DTLS 1.3 ChaCha20 - #250
Merged
Merged
Conversation
Correct the reversed size constants to use a 4-byte counter and a 12-byte nonce. This follows RFC 9147, Section 4.2.3. > the first 4 bytes of the ciphertext as the block counter and the > next 12 bytes as the nonce
Decode the sampled block counter as a little-endian 32-bit integer instead of using BigInteger's big-endian interpretation. This follows RFC 8439, Section 2.3. > A 32-bit block count parameter, treated as a 32-bit little-endian > integer.
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, while we're adding TLS-Anvil to pion/dtls' interop we found two issues in the chacha20 implementation.
let me know if I should split the fixes into separate PRs or squash them into a single commit. I can also add a regression test if needed (my Java isn't the best though).