From 230032f5a10b7a287ed08c8f815a52008353c44f Mon Sep 17 00:00:00 2001 From: Michael Rosenberg Date: Wed, 25 Feb 2026 12:35:41 -0500 Subject: [PATCH 1/2] Some assorted docs fixes --- README.md | 2 +- src/kem/xwing.rs | 4 ++-- src/single_shot.rs | 14 ++++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4bae59f..4e4d628 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ To run all tests, execute `cargo test --all-features`. This includes known-answe Classical (i.e., non-post-quantum) ciphersuites test against `test-vector-COMMIT_ID.json`,where `COMMIT_ID` is the short commit of the version of the [spec](https://github.com/cfrg/draft-irtf-cfrg-hpke) that the test vectors came from. The finalized spec uses commit `5f503c5`. See the [reference implementation](https://github.com/cisco/go-hpke) for information on how to generate a test vector. -Post-quantum ciphersuites (including hybrid), test against `test-vector-go-COMMIT_ID.json` in the same way. The commit ID corresponds to Filippo's [Go HPKE](https://github.com/FiloSottile/hpke) repo. The latest commit fetched was `8aa8a04`. The vectors in turn come from the [reference implementation](https://github.com/hpkewg/hpke-pq) repo of the PQ extension standard, at commit `c523f03`. The JSON file was trimmed to only include test vectors from ciphersuites implemented in this crate. +Post-quantum ciphersuites (including hybrid), test against `test-vectors-go-COMMIT_ID.json` in the same way. The commit ID corresponds to Filippo's [Go HPKE](https://github.com/FiloSottile/hpke) repo. The latest commit fetched was `8aa8a04`. The vectors in turn come from the [reference implementation](https://github.com/hpkewg/hpke-pq) repo of the PQ extension standard, at commit `c523f03`. The JSON file was trimmed to only include test vectors from ciphersuites implemented in this crate. Benchmarks ---------- diff --git a/src/kem/xwing.rs b/src/kem/xwing.rs index 68b2d2c..af7f6dd 100644 --- a/src/kem/xwing.rs +++ b/src/kem/xwing.rs @@ -1,5 +1,5 @@ -//! Implemented as per https://filippo.io/hpke-pq, which itself derives from -//! https://datatracker.ietf.org/doc/html/draft-ietf-hpke-pq-03 +//! The X-Wing hybrid PQ KEM, aka MLKEM768-X25519. Implemented as per , +//! which itself derives from use crate::{ kdf::one_stage_kdf::labeled_derive, diff --git a/src/single_shot.rs b/src/single_shot.rs index 5c59606..2c65bb3 100644 --- a/src/single_shot.rs +++ b/src/single_shot.rs @@ -20,7 +20,7 @@ use rand_core::UnwrapErr; // ct = ctx.Seal(aad, pt) // return enc, ct -/// Does a [`setup_sender`] and +/// Does a [`crate::setup_sender`] and /// [`AeadCtxS::seal_inout_detached`](crate::aead::AeadCtxS::seal_inout_detached) in one shot. That /// is, it does a key encapsulation to the specified recipient and encrypts the provided plaintext /// in place. @@ -57,7 +57,7 @@ where ) } -/// Does a [`setup_sender`] and +/// Does a [`setup_sender_with_rng`] and /// [`AeadCtxS::seal_inout_detached`](crate::aead::AeadCtxS::seal_inout_detached) in one shot. That /// is, it does a key encapsulation to the specified recipient and encrypts the provided plaintext /// in place. @@ -89,8 +89,9 @@ where Ok((encapped_key, tag)) } -/// Does a [`setup_sender`] and [`AeadCtxS::seal`](crate::aead::AeadCtxS::seal) in one shot. That -/// is, it does a key encapsulation to the specified recipient and encrypts the provided plaintext. +/// Does a [`crate::setup_sender`] and [`AeadCtxS::seal`](crate::aead::AeadCtxS::seal) in one shot. +/// That is, it does a key encapsulation to the specified recipient and encrypts the provided +/// plaintext. /// /// Return Value /// ============ @@ -124,8 +125,9 @@ where ) } -/// Does a [`setup_sender`] and [`AeadCtxS::seal`](crate::aead::AeadCtxS::seal) in one shot. That -/// is, it does a key encapsulation to the specified recipient and encrypts the provided plaintext. +/// Does a [`crate::setup_sender`] and [`AeadCtxS::seal`](crate::aead::AeadCtxS::seal) in one shot. +/// That is, it does a key encapsulation to the specified recipient and encrypts the provided +/// plaintext. /// /// Return Value /// ============ From b8280467f637bfbe100102d5df8f5594b7cf4c7a Mon Sep 17 00:00:00 2001 From: Michael Rosenberg Date: Wed, 25 Feb 2026 12:39:26 -0500 Subject: [PATCH 2/2] Make CI catch future docs errors --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 568bf05..0dddd7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,7 +106,7 @@ jobs: - uses: dtolnay/rust-toolchain@nightly - run: cargo doc --all-features --no-deps env: - RUSTDOCFLAGS: "--cfg docsrs" + RUSTDOCFLAGS: "--cfg docsrs -D warnings" msrv: name: rust-version is MSRV