Class FfcSchemes
- Namespace
- Kdf108
- Assembly
- Kdf108.dll
The SP 800-56A Rev. 3 FFC key-agreement schemes, with the same methods as EcSchemes. Each returns the shared secret Z, which you must pass through an SP 800-56C KDF before use, then clear. For dependency injection and logging, use IFfcKeyAgreement.
public static class FfcSchemes
- Inheritance
-
FfcSchemes
- Inherited Members
Remarks
Ephemeral is dhEphem, Static is dhStatic, OneFlow is dhOneFlow, Hybrid is
dhHybrid1, HybridOneFlow is dhHybridOneFlow, Mqv2 is MQV2, and Mqv1 is MQV1.
Methods
Ephemeral(FfcEphemeralKeyPair, FfcEphemeralPublicKey)
dhEphem, C(2e, 0s): Z = FFC DH(local ephemeral, remote ephemeral).
public static byte[] Ephemeral(FfcEphemeralKeyPair localEphemeral, FfcEphemeralPublicKey remoteEphemeral)
Parameters
localEphemeralFfcEphemeralKeyPairremoteEphemeralFfcEphemeralPublicKey
Returns
- byte[]
Hybrid(FfcStaticKeyPair, FfcEphemeralKeyPair, FfcStaticPublicKey, FfcEphemeralPublicKey)
dhHybrid1, C(2e, 2s): Z = Ze || Zs.
public static byte[] Hybrid(FfcStaticKeyPair localStatic, FfcEphemeralKeyPair localEphemeral, FfcStaticPublicKey remoteStatic, FfcEphemeralPublicKey remoteEphemeral)
Parameters
localStaticFfcStaticKeyPairlocalEphemeralFfcEphemeralKeyPairremoteStaticFfcStaticPublicKeyremoteEphemeralFfcEphemeralPublicKey
Returns
- byte[]
HybridOneFlowAsPartyU(FfcStaticKeyPair, FfcEphemeralKeyPair, FfcStaticPublicKey)
dhHybridOneFlow, C(1e, 2s), as party U: Z = DH(U's ephemeral, V's static) || DH(U's static, V's static).
public static byte[] HybridOneFlowAsPartyU(FfcStaticKeyPair localStatic, FfcEphemeralKeyPair localEphemeral, FfcStaticPublicKey remoteStatic)
Parameters
localStaticFfcStaticKeyPairlocalEphemeralFfcEphemeralKeyPairremoteStaticFfcStaticPublicKey
Returns
- byte[]
HybridOneFlowAsPartyV(FfcStaticKeyPair, FfcStaticPublicKey, FfcEphemeralPublicKey)
dhHybridOneFlow, C(1e, 2s), as party V: Z = DH(V's static, U's ephemeral) || DH(V's static, U's static).
public static byte[] HybridOneFlowAsPartyV(FfcStaticKeyPair localStatic, FfcStaticPublicKey remoteStatic, FfcEphemeralPublicKey remoteEphemeral)
Parameters
localStaticFfcStaticKeyPairremoteStaticFfcStaticPublicKeyremoteEphemeralFfcEphemeralPublicKey
Returns
- byte[]
Mqv1AsPartyU(FfcStaticKeyPair, FfcEphemeralKeyPair, FfcStaticPublicKey)
MQV1, C(1e, 2s), as party U: V's static key stands in for V's ephemeral key.
public static byte[] Mqv1AsPartyU(FfcStaticKeyPair localStatic, FfcEphemeralKeyPair localEphemeral, FfcStaticPublicKey remoteStatic)
Parameters
localStaticFfcStaticKeyPairlocalEphemeralFfcEphemeralKeyPairremoteStaticFfcStaticPublicKey
Returns
- byte[]
Mqv1AsPartyV(FfcStaticKeyPair, FfcStaticPublicKey, FfcEphemeralPublicKey)
MQV1, C(1e, 2s), as party V: V's static key stands in for its own ephemeral key.
public static byte[] Mqv1AsPartyV(FfcStaticKeyPair localStatic, FfcStaticPublicKey remoteStatic, FfcEphemeralPublicKey remoteEphemeral)
Parameters
localStaticFfcStaticKeyPairremoteStaticFfcStaticPublicKeyremoteEphemeralFfcEphemeralPublicKey
Returns
- byte[]
Mqv2(FfcStaticKeyPair, FfcEphemeralKeyPair, FfcStaticPublicKey, FfcEphemeralPublicKey)
MQV2, C(2e, 2s).
public static byte[] Mqv2(FfcStaticKeyPair localStatic, FfcEphemeralKeyPair localEphemeral, FfcStaticPublicKey remoteStatic, FfcEphemeralPublicKey remoteEphemeral)
Parameters
localStaticFfcStaticKeyPairlocalEphemeralFfcEphemeralKeyPairremoteStaticFfcStaticPublicKeyremoteEphemeralFfcEphemeralPublicKey
Returns
- byte[]
OneFlowAsPartyU(FfcEphemeralKeyPair, FfcStaticPublicKey)
dhOneFlow, C(1e, 1s), as party U: Z = FFC DH(U's ephemeral, V's static).
public static byte[] OneFlowAsPartyU(FfcEphemeralKeyPair localEphemeral, FfcStaticPublicKey remoteStatic)
Parameters
localEphemeralFfcEphemeralKeyPairremoteStaticFfcStaticPublicKey
Returns
- byte[]
OneFlowAsPartyV(FfcStaticKeyPair, FfcEphemeralPublicKey)
dhOneFlow, C(1e, 1s), as party V: Z = FFC DH(V's static, U's ephemeral).
public static byte[] OneFlowAsPartyV(FfcStaticKeyPair localStatic, FfcEphemeralPublicKey remoteEphemeral)
Parameters
localStaticFfcStaticKeyPairremoteEphemeralFfcEphemeralPublicKey
Returns
- byte[]
Static(FfcStaticKeyPair, FfcStaticPublicKey)
dhStatic, C(0e, 2s): Z = FFC DH(local static, remote static).
public static byte[] Static(FfcStaticKeyPair localStatic, FfcStaticPublicKey remoteStatic)
Parameters
localStaticFfcStaticKeyPairremoteStaticFfcStaticPublicKey
Returns
- byte[]