ECDiffieHellman.DeriveKeyFromHash 메서드

정의

지정된 해시 알고리즘을 사용하여 키 파생을 수행합니다.

오버로드

DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName)

지정된 해시 알고리즘을 사용하여 키 파생을 수행합니다.

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

파생 클래스에서 구현될 경우 앞에 추가되거나 뒤에 추가된 선택적 데이터와 함께 지정된 해시 알고리즘을 사용하여 키 파생을 수행합니다.

DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName)

지정된 해시 알고리즘을 사용하여 키 파생을 수행합니다.

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

otherPartyPublicKey이(가) null인 경우

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

또는

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

설명

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

적용 대상

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

파생 클래스에서 구현될 경우 앞에 추가되거나 뒤에 추가된 선택적 데이터와 함께 지정된 해시 알고리즘을 사용하여 키 파생을 수행합니다.

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

otherPartyPublicKey이(가) null인 경우

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

또는

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

설명

이 메서드는 내부적으로 줄임표 곡선 Diffie-Hellman 키 규약을 수행하여 공유 비밀(z)을 생성합니다. 이 메서드의 HASH(secretPrepend || z || secretAppend) 반환 값은 연결을 나타내는 지정된 해시 알고리즘 || 을 사용한 결과입니다.

secretPrepend 이거나 secretAppend 값이 null면 빈 배열로 처리됩니다.

적용 대상