Ascon-XOF128 and Ascon-CXOF128
Generate digest bytes with the Ascon XOFs from NIST SP 800-232.
from oxcrypto.xof.ascon_xof128 import ASCON_CXOF128, ASCON_XOF128
output = ASCON_XOF128.ASCON_XOF128.digest(b"message", 32)
custom = ASCON_CXOF128.ASCON_CXOF128.digest(b"message", 32, customization=b"app v1")Ascon-CXOF128 binds the output to a customization string of at most 256
bytes (2048 bits); a longer string raises ValueError. Different strings give
unrelated outputs, and an empty string is still separated from Ascon-XOF128.
Both functions are standardized in NIST SP 800-232 (final, August 2025). They
come from the RustCrypto ascon-xof128 crate 0.2.1, a stable release with
no published audit. The Ascon-CXOF128 tests use the official ascon-c
LWC_CXOF_KAT_128_512.txt known-answer vectors.