Skip to content

Add accumulated randomized tests to xaes-256-gcm - #835

Open
eligrubb wants to merge 1 commit into
RustCrypto:masterfrom
eligrubb:xaes-accumulated-randomized-tests
Open

Add accumulated randomized tests to xaes-256-gcm#835
eligrubb wants to merge 1 commit into
RustCrypto:masterfrom
eligrubb:xaes-accumulated-randomized-tests

Conversation

@eligrubb

@eligrubb eligrubb commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #864.

The current tests for xaes-256-gcm include the C2SP test vectors but are missing the additional C2SP accumulated randomized tests.

This PR adds the missing tests, verifying the output against the C2SP expected hash for both 10,000 and 1,000,000 iterations. The shake crate is added as a dev-only dependency enabling Shake128 hashing.

NOTE

The accumulated_randomized_1_000_000_iterations takes a long time (~172s) when run using the default debug mode cargo test. However, the test is fast (~2s) when run with cargo test --release. I added an #[ignore] to the test so it doesn't punish casual cargo test runs and updated the xaes-256-gcm CI workflow to --include-ignored. Is this solution acceptable?

@eligrubb
eligrubb force-pushed the xaes-accumulated-randomized-tests branch from 7bd4e0b to 4cf89ca Compare July 22, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xaes-256-gcm: C2SP standard's accumulated randomized test vectors not in testing suite

1 participant