Skip to content

aead: implement nonce-based AES-SIV-CMAC-256 - #93

Merged
loadingalias merged 1 commit into
mainfrom
aead/aes-siv-cmac-256
Aug 26, 2026
Merged

aead: implement nonce-based AES-SIV-CMAC-256#93
loadingalias merged 1 commit into
mainfrom
aead/aes-siv-cmac-256

Conversation

@loadingalias

Copy link
Copy Markdown
Owner

Summary

  • implement the registered AES-SIV-CMAC-256 nonce-based AEAD profile from RFC 5297 with typed 32-byte keys and borrowed non-empty variable-length nonces
  • keep the public profile narrow: one RFC 5116 AAD string plus a distinct nonce, with no deterministic SIV, raw CMAC/S2V, raw AES, or protocol-specific API
  • reuse the existing portable and native AES-128 authorities, including batched AES-NI/VAES, AES-CE, POWER, s390x, and RISC-V paths, without adding a product dependency
  • return opaque authentication failures and clear the complete rejected plaintext; bind the new secret owners and operations into CT, zeroization, fuzz, WASI, benchmark, and release evidence

Security and performance boundaries

The implementation follows the RFC key split, S2V component ordering, synthetic-IV counter-bit clearing, full 128-bit counter increment, and synthetic_iv || ciphertext layout. Repeated complete key/nonce/AAD/plaintext tuples reveal equality, so nonce uniqueness remains the normal caller contract even though authenticity survives reuse.

Context construction precomputes the AES schedules and CMAC subkeys. CMAC selects the AES backend once per block stream, and CTR encrypts independent counter blocks in native batches. In-place seal/open operations allocate no memory; alloc-enabled RISC-V context construction retains the existing boxed fixslice schedule.

Focused validation

  • host and x86_64 Rust 1.98 Clippy across the combined and isolated owning feature sets
  • 218 focused library tests plus RFC 5297 vectors and 256 generated differential cases against RustCrypto
  • every tag-byte corruption and representative ciphertext/AAD/nonce corruption rejects opaquely and clears plaintext
  • allocation, redaction, Serde, doctest, and focused fuzz-corpus replay checks
  • just ct-validate --target aarch64-apple-darwin --manifest-only
  • just check-zeroize-evidence
  • env SSH_AUTH_SOCK=... just check-actions
  • scripts/ci/nostd-wasm-suite.sh wasm32-wasip1 shallow
  • combined AEAD benchmark target compilation

@loadingalias
loadingalias force-pushed the aead/aes-siv-cmac-256 branch from bad851f to 42a9748 Compare August 26, 2026 06:58
@loadingalias
loadingalias force-pushed the aead/aes-siv-cmac-256 branch from 42a9748 to f4e2481 Compare August 26, 2026 07:15
@loadingalias
loadingalias merged commit 1fff929 into main Aug 26, 2026
17 checks passed
@loadingalias
loadingalias deleted the aead/aes-siv-cmac-256 branch August 26, 2026 08:35
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.

1 participant