ECDiffieHellman.DeriveKeyFromHash メソッド

定義

指定されたハッシュ アルゴリズムを使用して、キー派生を実行します。

オーバーロード

DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName)

指定されたハッシュ アルゴリズムを使用して、キー派生を実行します。

DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[])

派生クラスに実装されている場合、指定されたハッシュ アルゴリズムを省略可能な先頭または末尾に追加されたデータと共に使用して、キー派生を実行します。

DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName)

ソース:
ECDiffieHellman.cs
ソース:
ECDiffieHellman.cs
ソース:
ECDiffieHellman.cs

指定されたハッシュ アルゴリズムを使用して、キー派生を実行します。

public:
 cli::array <System::Byte> ^ DeriveKeyFromHash(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public byte[] DeriveKeyFromHash (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
member this.DeriveKeyFromHash : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName -> byte[]
Public Function DeriveKeyFromHash (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName) As Byte()

パラメーター

otherPartyPublicKey
ECDiffieHellmanPublicKey

もう一方のパーティの公開キー。

hashAlgorithm
HashAlgorithmName

キー マテリアルを派生させるために使用するハッシュ アルゴリズム。

戻り値

Byte[]

共有シークレットのハッシュ。

例外

otherPartyPublicKey によって使用される曲線のサイズが、このキーの曲線のサイズと異なります。

- または -

hashAlgorithm パラメーターにハッシュが指定されていません。

otherPartyPublicKeynullです。

otherPartyPublicKey によって使用される曲線が、このキーの曲線と異なります。

- または -

このインスタンスでは公開キーのみ表されます。

注釈

このオーバーロードは、先頭と追加の DeriveKeyFromHash 値として を渡す null メソッドを呼び出します。

適用対象

DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[])

ソース:
ECDiffieHellman.cs
ソース:
ECDiffieHellman.cs
ソース:
ECDiffieHellman.cs

派生クラスに実装されている場合、指定されたハッシュ アルゴリズムを省略可能な先頭または末尾に追加されたデータと共に使用して、キー派生を実行します。

public:
 virtual cli::array <System::Byte> ^ DeriveKeyFromHash(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ secretPrepend, cli::array <System::Byte> ^ secretAppend);
public virtual byte[] DeriveKeyFromHash (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? secretPrepend, byte[]? secretAppend);
public virtual byte[] DeriveKeyFromHash (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] secretPrepend, byte[] secretAppend);
abstract member DeriveKeyFromHash : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] -> byte[]
override this.DeriveKeyFromHash : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] -> byte[]
Public Overridable Function DeriveKeyFromHash (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName, secretPrepend As Byte(), secretAppend As Byte()) As Byte()

パラメーター

otherPartyPublicKey
ECDiffieHellmanPublicKey

もう一方のパーティの公開キー。

hashAlgorithm
HashAlgorithmName

キー マテリアルを派生させるために使用するハッシュ アルゴリズム。

secretPrepend
Byte[]

ハッシュ前に派生の機密情報の先頭に追加する値。

secretAppend
Byte[]

ハッシュ前に派生の機密情報に追加する値。

戻り値

Byte[]

要求に応じてデータを先頭または末尾に追加した後の共有シークレットのハッシュ。

例外

派生クラスはこのメソッドをオーバーライドする必要があります。

otherPartyPublicKey によって使用される曲線のサイズが、このキーの曲線のサイズと異なります。

- または -

hashAlgorithm パラメーターにハッシュが指定されていません。

otherPartyPublicKeynullです。

otherPartyPublicKey によって使用される曲線が、このキーの曲線と異なります。

- または -

このインスタンスでは公開キーのみ表されます。

注釈

このメソッドは、共有シークレット (z) を生成するために、キー アグリーメントDiffie-Hellman楕円曲線を内部的に実行します。 このメソッドからの戻り値は、指定されたハッシュ アルゴリズムを使用した結果 HASH(secretPrepend || z || secretAppend) です。ここで、連結を || 示します。

または secretAppendsecretPrepend値が の場合はnull、空の配列として扱われます。

適用対象