Skip to Content
oxcrypto

POLYVAL

Compute the AES-GCM-SIV universal hash.

from oxcrypto.universal_hash.polyval import POLYVAL

hash_key = POLYVAL.POLYVAL.generate_key()
output = POLYVAL.POLYVAL.mac(hash_key, b"sixteen byte blk")

POLYVAL (RFC 8452) takes a 16-byte key and returns 16 bytes. A trailing partial block is zero-padded. Like GHASH, it is not a MAC on its own.