Table of Contents

Class EcKeyAgreement

Namespace
Kdf108
Assembly
Kdf108.dll

The logging implementation of IEcKeyAgreement. Stateless and thread-safe.

public sealed class EcKeyAgreement : IEcKeyAgreement
Inheritance
EcKeyAgreement
Implements
Inherited Members

Constructors

EcKeyAgreement(ILogger<EcKeyAgreement>?)

The logging implementation of IEcKeyAgreement. Stateless and thread-safe.

public EcKeyAgreement(ILogger<EcKeyAgreement>? logger = null)

Parameters

logger ILogger<EcKeyAgreement>

Methods

Ephemeral(EcEphemeralKeyPair, EcEphemeralPublicKey)

Ephemeral Unified, C(2e, 0s): Z = ECC CDH(local ephemeral, remote ephemeral).

public byte[] Ephemeral(EcEphemeralKeyPair localEphemeral, EcEphemeralPublicKey remoteEphemeral)

Parameters

localEphemeral EcEphemeralKeyPair
remoteEphemeral EcEphemeralPublicKey

Returns

byte[]

Hybrid(EcStaticKeyPair, EcEphemeralKeyPair, EcStaticPublicKey, EcEphemeralPublicKey)

Full Unified, C(2e, 2s): Z = Ze || Zs.

public byte[] Hybrid(EcStaticKeyPair localStatic, EcEphemeralKeyPair localEphemeral, EcStaticPublicKey remoteStatic, EcEphemeralPublicKey remoteEphemeral)

Parameters

localStatic EcStaticKeyPair
localEphemeral EcEphemeralKeyPair
remoteStatic EcStaticPublicKey
remoteEphemeral EcEphemeralPublicKey

Returns

byte[]

HybridOneFlowAsPartyU(EcStaticKeyPair, EcEphemeralKeyPair, EcStaticPublicKey)

One-Pass Unified, C(1e, 2s), as party U: Z = CDH(U's ephemeral, V's static) || CDH(U's static, V's static).

public byte[] HybridOneFlowAsPartyU(EcStaticKeyPair localStatic, EcEphemeralKeyPair localEphemeral, EcStaticPublicKey remoteStatic)

Parameters

localStatic EcStaticKeyPair
localEphemeral EcEphemeralKeyPair
remoteStatic EcStaticPublicKey

Returns

byte[]

HybridOneFlowAsPartyV(EcStaticKeyPair, EcStaticPublicKey, EcEphemeralPublicKey)

One-Pass Unified, C(1e, 2s), as party V: Z = CDH(V's static, U's ephemeral) || CDH(V's static, U's static).

public byte[] HybridOneFlowAsPartyV(EcStaticKeyPair localStatic, EcStaticPublicKey remoteStatic, EcEphemeralPublicKey remoteEphemeral)

Parameters

localStatic EcStaticKeyPair
remoteStatic EcStaticPublicKey
remoteEphemeral EcEphemeralPublicKey

Returns

byte[]

Mqv1AsPartyU(EcStaticKeyPair, EcEphemeralKeyPair, EcStaticPublicKey)

One-Pass MQV, C(1e, 2s), as party U: V's static key stands in for V's ephemeral key.

public byte[] Mqv1AsPartyU(EcStaticKeyPair localStatic, EcEphemeralKeyPair localEphemeral, EcStaticPublicKey remoteStatic)

Parameters

localStatic EcStaticKeyPair
localEphemeral EcEphemeralKeyPair
remoteStatic EcStaticPublicKey

Returns

byte[]

Mqv1AsPartyV(EcStaticKeyPair, EcStaticPublicKey, EcEphemeralPublicKey)

One-Pass MQV, C(1e, 2s), as party V: V's static key stands in for its own ephemeral key.

public byte[] Mqv1AsPartyV(EcStaticKeyPair localStatic, EcStaticPublicKey remoteStatic, EcEphemeralPublicKey remoteEphemeral)

Parameters

localStatic EcStaticKeyPair
remoteStatic EcStaticPublicKey
remoteEphemeral EcEphemeralPublicKey

Returns

byte[]

Mqv2(EcStaticKeyPair, EcEphemeralKeyPair, EcStaticPublicKey, EcEphemeralPublicKey)

Full MQV, C(2e, 2s).

public byte[] Mqv2(EcStaticKeyPair localStatic, EcEphemeralKeyPair localEphemeral, EcStaticPublicKey remoteStatic, EcEphemeralPublicKey remoteEphemeral)

Parameters

localStatic EcStaticKeyPair
localEphemeral EcEphemeralKeyPair
remoteStatic EcStaticPublicKey
remoteEphemeral EcEphemeralPublicKey

Returns

byte[]

OneFlowAsPartyU(EcEphemeralKeyPair, EcStaticPublicKey)

One-Pass Diffie-Hellman, C(1e, 1s), as party U: Z = ECC CDH(U's ephemeral, V's static).

public byte[] OneFlowAsPartyU(EcEphemeralKeyPair localEphemeral, EcStaticPublicKey remoteStatic)

Parameters

localEphemeral EcEphemeralKeyPair
remoteStatic EcStaticPublicKey

Returns

byte[]

OneFlowAsPartyV(EcStaticKeyPair, EcEphemeralPublicKey)

One-Pass Diffie-Hellman, C(1e, 1s), as party V: Z = ECC CDH(V's static, U's ephemeral).

public byte[] OneFlowAsPartyV(EcStaticKeyPair localStatic, EcEphemeralPublicKey remoteEphemeral)

Parameters

localStatic EcStaticKeyPair
remoteEphemeral EcEphemeralPublicKey

Returns

byte[]

Static(EcStaticKeyPair, EcStaticPublicKey)

Static Unified, C(0e, 2s): Z = ECC CDH(local static, remote static).

public byte[] Static(EcStaticKeyPair localStatic, EcStaticPublicKey remoteStatic)

Parameters

localStatic EcStaticKeyPair
remoteStatic EcStaticPublicKey

Returns

byte[]