ECDiffieHellman.DeriveKeyFromHmac メソッド

定義

指定された HMAC (Hash-based Message Authentication Code) アルゴリズムを使用して、キー派生を実行します。

オーバーロード

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

派生クラスに実装されている場合、指定された HMAC (Hash-based Message Authentication Code) アルゴリズムを省略可能な先頭または末尾に追加されたデータと共に使用して、キー派生を実行します。

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

指定された HMAC (Hash-based Message Authentication Code) アルゴリズムを使用して、キー派生を実行します。

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

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

派生クラスに実装されている場合、指定された HMAC (Hash-based Message Authentication Code) アルゴリズムを省略可能な先頭または末尾に追加されたデータと共に使用して、キー派生を実行します。

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

パラメーター

otherPartyPublicKey
ECDiffieHellmanPublicKey

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

hashAlgorithm
HashAlgorithmName

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

hmacKey
Byte[]

HMAC のキー。

secretPrepend
Byte[]

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

secretAppend
Byte[]

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

戻り値

Byte[]

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

例外

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

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

- または -

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

otherPartyPublicKeynullです。

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

- または -

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

注釈

このメソッドは、共有シークレットz () を生成するために、楕円曲線Diffie-Hellmanキー アグリーメントを内部的に実行します。

が のnull場合hmacKey、このメソッドからの戻り値は、指定された HMAC アルゴリズムを使用した結果HMAC-HASH(z, secretPrepend || z || secretAppend)です。ここで||、連結を示します。 それ以外の場合、このメソッドからの戻り値は の HMAC-HASH(hmacKey, secretPrepend || z || secretAppend)結果になります。

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

適用対象

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

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

指定された HMAC (Hash-based Message Authentication Code) アルゴリズムを使用して、キー派生を実行します。

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

パラメーター

otherPartyPublicKey
ECDiffieHellmanPublicKey

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

hashAlgorithm
HashAlgorithmName

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

hmacKey
Byte[]

HMAC のキー。

戻り値

Byte[]

共有シークレットの HMAC。

例外

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

- または -

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

otherPartyPublicKeynullです。

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

- または -

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

注釈

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

適用対象