Table of Contents

Class Prf

Namespace
Kdf108
Assembly
Kdf108.dll

A pseudorandom function for SP 800-108 iterative key derivation: HMAC with an approved hash, or AES-CMAC.

public sealed record Prf : IEquatable<Prf>
Inheritance
Prf
Implements
Inherited Members

Properties

AesKeyBits

The AES key size for AES-CMAC, or 0 for HMAC.

public int AesKeyBits { get; }

Property Value

int

Hash

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

public NistHashAlgorithm? Hash { get; }

Property Value

NistHashAlgorithm?

IsCmac

true for AES-CMAC.

public bool IsCmac { get; }

Property Value

bool

OutputBits

The PRF output length h, in bits.

public int OutputBits { get; }

Property Value

int

Methods

AesCmac(int)

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

public static Prf AesCmac(int keyBits)

Parameters

keyBits int

Returns

Prf

Hmac(NistHashAlgorithm)

HMAC with the given hash function.

public static Prf Hmac(NistHashAlgorithm hash)

Parameters

hash NistHashAlgorithm

Returns

Prf

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.