Table of Contents

Interface IEcKeyAgreement

Namespace
Kdf108
Assembly
Kdf108.dll

SP 800-56A ECC key agreement as an injectable service. Mirrors EcSchemes; inject it, or construct EcKeyAgreement directly.

public interface IEcKeyAgreement

Methods

Ephemeral(EcEphemeralKeyPair, EcEphemeralPublicKey)

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

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.

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).

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).

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.

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.

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).

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).

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).

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).

byte[] Static(EcStaticKeyPair localStatic, EcStaticPublicKey remoteStatic)

Parameters

localStatic EcStaticKeyPair
remoteStatic EcStaticPublicKey

Returns

byte[]