Skip to Content
oxcrypto

Ascon

Apply the Ascon permutation from NIST SP 800-232.

from oxcrypto.hazmat.permutation.ascon import ASCON

state = ASCON.ASCON.permute(bytes(40))  # Ascon-p[12]
state = ASCON.ASCON.permute(state, rounds=8)  # Ascon-p[8]

The state is five 64-bit words, each little-endian, as in SP 800-232. rounds is 1 to 12 and applies the last rounds rounds.

StandardNIST SP 800-232 (Final)
Crateascon 0.5.0 (RustCrypto sponges), pre-1.0 release
AuditNo published audit
MSRV1.85, builds with the project MSRV 1.88
ExperimentalNo
Test vectorsascon crate tests for 6, 8 and 12 rounds