ECDiffieHellmanCng.DeriveKeyMaterial メソッド

定義

二者の間の秘密協定から生成されたキー マテリアルを派生させます。

オーバーロード

DeriveKeyMaterial(CngKey)

相手の公開キーを格納した CngKey オブジェクトを指定した場合に、二者の間の秘密協定から生成されたキー マテリアルを派生させます。

DeriveKeyMaterial(ECDiffieHellmanPublicKey)

相手の公開キーを格納した ECDiffieHellmanPublicKey オブジェクトを指定した場合に、二者の間の秘密協定から生成されたキー マテリアルを派生させます。

注釈

楕円曲線Diffie-Hellman (ECDH) アルゴリズムは、秘密キーと相手の公開キーを入力として受け入れ、シークレット アグリーメントを出力として生成します。 次に、キー派生関数 (KDF) は秘密契約を受け取り、キーマテリアルを出力として生成します。

DeriveKeyMaterial(CngKey)

ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs

相手の公開キーを格納した CngKey オブジェクトを指定した場合に、二者の間の秘密協定から生成されたキー マテリアルを派生させます。

public:
 cli::array <System::Byte> ^ DeriveKeyMaterial(System::Security::Cryptography::CngKey ^ otherPartyPublicKey);
public byte[] DeriveKeyMaterial (System.Security.Cryptography.CngKey otherPartyPublicKey);
[System.Security.SecurityCritical]
public byte[] DeriveKeyMaterial (System.Security.Cryptography.CngKey otherPartyPublicKey);
override this.DeriveKeyMaterial : System.Security.Cryptography.CngKey -> byte[]
[<System.Security.SecurityCritical>]
override this.DeriveKeyMaterial : System.Security.Cryptography.CngKey -> byte[]
Public Function DeriveKeyMaterial (otherPartyPublicKey As CngKey) As Byte()

パラメーター

otherPartyPublicKey
CngKey

キー交換で相手から取得した ECDH (Elliptic Curve Diffie-Hellman) キーの公開部分を格納したオブジェクト。

戻り値

Byte[]

キー マテリアルを格納したバイト配列。 現在のオブジェクトの秘密キーと指定した公開キーから計算された秘密協定から、この情報は生成されます。

属性

例外

otherPartyPublicKeynullです。

otherPartyPublicKey が無効です。 AlgorithmGroup プロパティで ECDiffieHellman が指定されていないか、キー サイズが現在のインスタンスのキー サイズと一致していません。

このオブジェクトの KeyDerivationFunction プロパティでは Tls キー派生関数を指定しますが、Label または Seed のどちらか一方は null にします。

上記以外のすべてのエラー。

適用対象

DeriveKeyMaterial(ECDiffieHellmanPublicKey)

相手の公開キーを格納した ECDiffieHellmanPublicKey オブジェクトを指定した場合に、二者の間の秘密協定から生成されたキー マテリアルを派生させます。

public:
 override cli::array <System::Byte> ^ DeriveKeyMaterial(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey);
public override byte[] DeriveKeyMaterial (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey);
override this.DeriveKeyMaterial : System.Security.Cryptography.ECDiffieHellmanPublicKey -> byte[]
Public Overrides Function DeriveKeyMaterial (otherPartyPublicKey As ECDiffieHellmanPublicKey) As Byte()

パラメーター

otherPartyPublicKey
ECDiffieHellmanPublicKey

キー交換で相手から取得した公開キー。

戻り値

Byte[]

キー マテリアルを格納したバイト配列。 現在のオブジェクトの秘密キーと指定した公開キーから計算された秘密協定から、この情報は生成されます。

例外

otherPartyPublicKeynullです。

otherPartyPublicKeyECDiffieHellmanCngPublicKey キーではありません。

適用対象