Table of Contents

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

KmacVariant?

Prf

The HMAC or AES-CMAC function, or null for KMAC.

public Prf? Prf { get; }

Property Value

Prf

Methods

AesCmac(int)

AES-CMAC with a 128-, 192-, or 256-bit key.

public static KeyConfirmationMac AesCmac(int keyBits)

Parameters

keyBits int

Returns

KeyConfirmationMac

Hmac(NistHashAlgorithm)

HMAC with an approved hash.

public static KeyConfirmationMac Hmac(NistHashAlgorithm hash)

Parameters

hash NistHashAlgorithm

Returns

KeyConfirmationMac

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

variant KmacVariant

Returns

KeyConfirmationMac

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.