ECDiffieHellman.DeriveKeyFromHmac 메서드

정의

지정된 HMAC(해시 기반 메시지 인증 코드) 알고리즘을 사용하여 키 파생을 수행합니다.

오버로드

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

파생 클래스에서 추가될 경우 앞에 추가되거나 뒤에 추가된 선택적 데이터와 함께 지정된 HMAC(해시 기반 메시지 인증 코드) 알고리즘을 사용하여 키 파생을 수행합니다.

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

지정된 HMAC(해시 기반 메시지 인증 코드) 알고리즘을 사용하여 키 파생을 수행합니다.

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

Source:
ECDiffieHellman.cs
Source:
ECDiffieHellman.cs
Source:
ECDiffieHellman.cs

파생 클래스에서 추가될 경우 앞에 추가되거나 뒤에 추가된 선택적 데이터와 함께 지정된 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);
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 매개 변수는 해시를 지정하지 않습니다.

otherPartyPublicKey이(가) null인 경우

otherPartyPublicKey에서 사용되는 곡선은 이 키의 곡선과 다릅니다.

또는

이 인스턴스는 퍼블릭 키만 나타냅니다.

설명

이 메서드는 내부적으로 줄임표 곡선 Diffie-Hellman 키 규약을 수행하여 공유 비밀(z)을 생성합니다.

가 인 null경우 hmacKey 이 메서드의 HMAC-HASH(z, secretPrepend || z || secretAppend) 반환 값은 지정된 HMAC 알고리즘을 사용한 결과입니다. 여기서 || 는 연결을 의미합니다. 그렇지 않으면 이 메서드의 반환 값은 의 HMAC-HASH(hmacKey, secretPrepend || z || secretAppend)결과입니다.

또는 secretAppendsecretPrepend 이 이null면 빈 배열로 처리됩니다.

적용 대상

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

Source:
ECDiffieHellman.cs
Source:
ECDiffieHellman.cs
Source:
ECDiffieHellman.cs

지정된 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);
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 매개 변수는 해시를 지정하지 않습니다.

otherPartyPublicKey이(가) null인 경우

otherPartyPublicKey에서 사용되는 곡선은 이 키의 곡선과 다릅니다.

또는

이 인스턴스는 퍼블릭 키만 나타냅니다.

설명

이 오버로드는 앞에 추가 및 추가 값으로 전달 null 되는 메서드를 호출 DeriveKeyFromHmac 합니다.

적용 대상