Table of Contents

Interface IKeyConfirmation

Namespace
Kdf108
Assembly
Kdf108.dll

SP 800-56A key confirmation as an injectable service. Mirrors KeyConfirmation; inject it, or construct KeyConfirmationService directly.

public interface IKeyConfirmation

Methods

GenerateTag(ReadOnlySpan<byte>, KeyConfirmationContext, KeyConfirmationMac, BitLength, SecurityStrength)

Computes the tag for context.

byte[] GenerateTag(ReadOnlySpan<byte> macKey, KeyConfirmationContext context, KeyConfirmationMac mac, BitLength tagLength, SecurityStrength strength)

Parameters

macKey ReadOnlySpan<byte>

MacKey, taken from the start of the derived keying material.

context KeyConfirmationContext

The MacData inputs.

mac KeyConfirmationMac

The MAC function.

tagLength BitLength

MacTagLen: at least 64 bits and at most the MAC output length.

strength SecurityStrength

The target security strength; MacKey must be at least this long (Table 5).

Returns

byte[]

VerifyTag(ReadOnlySpan<byte>, ReadOnlySpan<byte>, KeyConfirmationContext, KeyConfirmationMac, BitLength, SecurityStrength)

Recomputes the tag and compares it with receivedTag in constant time.

bool VerifyTag(ReadOnlySpan<byte> receivedTag, ReadOnlySpan<byte> macKey, KeyConfirmationContext context, KeyConfirmationMac mac, BitLength tagLength, SecurityStrength strength)

Parameters

receivedTag ReadOnlySpan<byte>
macKey ReadOnlySpan<byte>
context KeyConfirmationContext
mac KeyConfirmationMac
tagLength BitLength
strength SecurityStrength

Returns

bool