Class KeyConfirmationMac
- Namespace
- Kdf108
- Assembly
- Kdf108.dll
The MAC used for key confirmation (SP 800-56A Rev. 3 ยง5.9): HMAC, AES-CMAC, or KMAC.
public sealed record KeyConfirmationMac : IEquatable<KeyConfirmationMac>
- Inheritance
-
KeyConfirmationMac
- Implements
- Inherited Members
Properties
Kmac
The KMAC variant, or null for HMAC and AES-CMAC.
public KmacVariant? Kmac { get; }
Property Value
Prf
The HMAC or AES-CMAC function, or null for KMAC.
public Prf? Prf { get; }
Property Value
Methods
AesCmac(int)
AES-CMAC with a 128-, 192-, or 256-bit key.
public static KeyConfirmationMac AesCmac(int keyBits)
Parameters
keyBitsint
Returns
Hmac(NistHashAlgorithm)
HMAC with an approved hash.
public static KeyConfirmationMac Hmac(NistHashAlgorithm hash)
Parameters
hashNistHashAlgorithm
Returns
KmacFunction(KmacVariant)
KMAC128 or KMAC256 with customization string "KC". The tag length is KMAC's output length L.
public static KeyConfirmationMac KmacFunction(KmacVariant variant)
Parameters
variantKmacVariant
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.