ECDiffieHellman.DeriveKeyFromHmac メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定された HMAC (ハッシュベースのメッセージ認証コード) アルゴリズムを使用してキーの派生を実行します。
オーバーロード
| 名前 | 説明 |
|---|---|
| DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[]) |
指定された HMAC (ハッシュベースのメッセージ認証コード) アルゴリズムを使用してキーの派生を実行します。 |
| DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[], Byte[]) |
派生クラスで実装されている場合は、指定した HMAC (ハッシュベースのメッセージ認証コード) アルゴリズムを使用してキーの派生を実行し、省略可能な先頭または追加されたデータを使用します。 |
DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])
指定された HMAC (ハッシュベースのメッセージ認証コード) アルゴリズムを使用してキーの派生を実行します。
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);
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 のキー。
返品
共有シークレットの HMAC。
例外
otherPartyPublicKeyで使用される曲線のサイズは、このキーの曲線とは異なります。
-または-
hashAlgorithm パラメーターはハッシュを指定しません。
otherPartyPublicKey は nullです。
注釈
このオーバーロードは、nullを先頭と追加の値として渡すDeriveKeyFromHmac メソッドを呼び出します。
適用対象
DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[], Byte[])
派生クラスで実装されている場合は、指定した HMAC (ハッシュベースのメッセージ認証コード) アルゴリズムを使用してキーの派生を実行し、省略可能な先頭または追加されたデータを使用します。
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);
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[]
ハッシュする前に派生シークレットに追加する値。
返品
要求に応じてデータをプリペンドまたは追加した後の共有シークレットの HMAC。
例外
派生クラスは、このメソッドをオーバーライドする必要があります。
otherPartyPublicKeyで使用される曲線のサイズは、このキーの曲線とは異なります。
-または-
hashAlgorithm パラメーターはハッシュを指定しません。
otherPartyPublicKey は nullです。
注釈
このメソッドは、内部的に、共有シークレット (z) を生成するために、キー アグリーメント Diffie-Hellman 楕円曲線を実行します。
hmacKeyがnull場合、このメソッドからの戻り値は、指定された HMAC アルゴリズムを使用したHMAC-HASH(z, secretPrepend || z || secretAppend)の結果です。ここで、||は連結を示します。 それ以外の場合、このメソッドからの戻り値は HMAC-HASH(hmacKey, secretPrepend || z || secretAppend)の結果です。
secretPrependまたはsecretAppendの値がnullされている場合は、空の配列として扱われます。