Table of Contents

Interface ISp80056CKdf

Namespace
Kdf108
Assembly
Kdf108.dll

SP 800-56C key derivation as an injectable service. Mirrors Sp80056C; inject it, or construct Sp80056CKdf directly.

public interface ISp80056CKdf

Methods

Extract(ReadOnlySpan<byte>, Extraction, SecurityStrength)

The extraction step (§5.1): K_DK = MAC(salt, Z). Expand the result with Sp800108 using ExpansionPrf.

byte[] Extract(ReadOnlySpan<byte> sharedSecret, Extraction extraction, SecurityStrength strength)

Parameters

sharedSecret ReadOnlySpan<byte>

Z.

extraction Extraction

HMAC or AES-CMAC extraction and its salt.

strength SecurityStrength

The target security strength, at least 112 bits.

Returns

byte[]

OneStep(ReadOnlySpan<byte>, OneStepFunction, ReadOnlySpan<byte>, BitLength, SecurityStrength)

One-step key derivation (§4): K(i) = H(counter || Z || FixedInfo).

byte[] OneStep(ReadOnlySpan<byte> sharedSecret, OneStepFunction function, ReadOnlySpan<byte> fixedInfo, BitLength length, SecurityStrength strength)

Parameters

sharedSecret ReadOnlySpan<byte>

Z.

function OneStepFunction

The auxiliary function H.

fixedInfo ReadOnlySpan<byte>

FixedInfo, for example AlgorithmID || PartyUInfo || PartyVInfo.

length BitLength

The output length L.

strength SecurityStrength

The target security strength, at least 112 bits.

Returns

byte[]

TwoStep(ReadOnlySpan<byte>, Extraction, KeyExpansion, BitLength, SecurityStrength)

Two-step key derivation (§5): extracts a key-derivation key from Z, then expands it with SP 800-108 using the PRF the extraction requires. To derive several keys from one Z, call Extract(ReadOnlySpan<byte>, Extraction, SecurityStrength) once and Derive(ReadOnlySpan<byte>, Prf, KeyExpansion, BitLength) once per key with distinct fixed input.

byte[] TwoStep(ReadOnlySpan<byte> sharedSecret, Extraction extraction, KeyExpansion expansion, BitLength length, SecurityStrength strength)

Parameters

sharedSecret ReadOnlySpan<byte>
extraction Extraction
expansion KeyExpansion
length BitLength
strength SecurityStrength

Returns

byte[]