v0.18.0: Add (X)ChaCha20 structs and (X)ChaCha20Poly1305 structs#618
Merged
v0.18.0: Add (X)ChaCha20 structs and (X)ChaCha20Poly1305 structs#618
v0.18.0: Add (X)ChaCha20 structs and (X)ChaCha20Poly1305 structs#618Conversation
…al inplace() API.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v0.18.0 #618 +/- ##
==========================================
Coverage ? 98.95%
==========================================
Files ? 113
Lines ? 21989
Branches ? 0
==========================================
Hits ? 21759
Misses ? 230
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…s before being able to process the last block, becuase keystream_block() bumped the streamposition.
…ere input is a single byte
… to detect non-block-aligned xor_keystream_into() calls we want to support
fc0a8ba to
8eb2c5e
Compare
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.
The following lists the motivations/justifications for the breaking changes of the APIs (which are listed in the CHANGELOG):
orion::hazardous::streamWhile the current
encrypt()/decrypt()functions can be used in theory for the same operations as what this new API offers, this approach is more ergonomic and aligns more with the actual design of a stream-cipher. This also makes it easier to use the instances for other purposes, such as RNG. It also provides more clear seeking/out-of-order API withset_position().orion::hazardous::aeadAgain, the same functionality and this time under the same name, but under a struct. The reason this has been moved to a type is that it makes it much more adaptable across the rest of the crate for future additions. One example is the work on providing additional HPKE ciphersuits, where this right now means hardcoded AEAD.
The
seal_inplace()/open_inplace()are offered to enable direct overwriting of plaintext data to avoid extra allocations and the need to handle zeroization of the original.