Skip to content

v0.18.0: Add (X)ChaCha20 structs and (X)ChaCha20Poly1305 structs#618

Merged
brycx merged 14 commits intov0.18.0from
stateful-sc
May 8, 2026
Merged

v0.18.0: Add (X)ChaCha20 structs and (X)ChaCha20Poly1305 structs#618
brycx merged 14 commits intov0.18.0from
stateful-sc

Conversation

@brycx
Copy link
Copy Markdown
Member

@brycx brycx commented May 4, 2026

The following lists the motivations/justifications for the breaking changes of the APIs (which are listed in the CHANGELOG):

orion::hazardous::stream
While 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 with set_position().

orion::hazardous::aead
Again, 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.

@brycx brycx added the breaking change A breaking change label May 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 94.61235% with 82 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (v0.18.0@69ff31b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/test_framework/streamcipher_interface.rs 88.73% 32 Missing ⚠️
src/test_framework/aead_interface.rs 91.64% 31 Missing ⚠️
src/hazardous/aead/chacha20poly1305.rs 94.69% 13 Missing ⚠️
tests/stream/mod.rs 90.90% 2 Missing ⚠️
src/hazardous/cae/chacha20poly1305blake2b.rs 90.90% 1 Missing ⚠️
src/hazardous/cae/xchacha20poly1305blake2b.rs 92.30% 1 Missing ⚠️
src/hazardous/stream/chacha20.rs 99.67% 1 Missing ⚠️
tests/aead/mod.rs 97.14% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brycx brycx force-pushed the stateful-sc branch 2 times, most recently from fc0a8ba to 8eb2c5e Compare May 8, 2026 20:53
@brycx brycx merged commit 73e4b80 into v0.18.0 May 8, 2026
57 checks passed
@brycx brycx deleted the stateful-sc branch May 8, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change A breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant