CMAC

AES Cipher-based Message Authentication Code (CMAC) as defined in NIST SP 800-38B.

Computes and verifies authentication tags using AES as the underlying block cipher.

val key = provider.get(AES.CMAC).keyGenerator().generateKey()
val tag = key.signatureGenerator().generateSignature(data)
key.signatureVerifier().verifySignature(data, tag)

Types

Link copied to clipboard
Link copied to clipboard

An AES-CMAC key that provides MAC computation via signatureGenerator and verification via signatureVerifier.

Properties

Link copied to clipboard
open override val id: CryptographyAlgorithmId<AES.CMAC>

The typed identifier that uniquely distinguishes this algorithm and is used to look it up from a CryptographyProvider.

Functions

Link copied to clipboard

Returns a Decoder that decodes AES keys from the specified Key.Format.

Link copied to clipboard
abstract fun keyGenerator(keySize: BinarySize = Key.Size.B256): KeyGenerator<AES.CMAC.Key>

Returns a KeyGenerator that generates AES keys of the given keySize.