Share via


ECDiffieHellmanCng.DeriveKeyMaterial 메서드

정의

두 당사자 간의 비밀 계약을 통해 생성되는 키 자료를 파생합니다.

오버로드

DeriveKeyMaterial(CngKey)

두 번째 당사자의 공개 키가 들어 있는 CngKey 개체를 사용하여 두 당사자 간의 비밀 계약을 통해 생성되는 키 자료를 파생합니다.

DeriveKeyMaterial(ECDiffieHellmanPublicKey)

두 번째 당사자의 공개 키가 들어 있는 ECDiffieHellmanPublicKey 개체를 사용하여 두 당사자 간의 비밀 계약을 통해 생성되는 키 자료를 파생합니다.

설명

ECDH(타원 곡선 Diffie-Hellman) 알고리즘은 프라이빗 키와 상대방의 공개 키를 입력으로 수락하고 비밀 규약을 출력으로 생성합니다. 그런 다음 KDF(키 파생 함수)는 비밀 규약을 사용하여 키 자료를 출력으로 생성합니다.

DeriveKeyMaterial(CngKey)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

두 번째 당사자의 공개 키가 들어 있는 CngKey 개체를 사용하여 두 당사자 간의 비밀 계약을 통해 생성되는 키 자료를 파생합니다.

public:
 cli::array <System::Byte> ^ DeriveKeyMaterial(System::Security::Cryptography::CngKey ^ otherPartyPublicKey);
public byte[] DeriveKeyMaterial (System.Security.Cryptography.CngKey otherPartyPublicKey);
[System.Security.SecurityCritical]
public byte[] DeriveKeyMaterial (System.Security.Cryptography.CngKey otherPartyPublicKey);
override this.DeriveKeyMaterial : System.Security.Cryptography.CngKey -> byte[]
[<System.Security.SecurityCritical>]
override this.DeriveKeyMaterial : System.Security.Cryptography.CngKey -> byte[]
Public Function DeriveKeyMaterial (otherPartyPublicKey As CngKey) As Byte()

매개 변수

otherPartyPublicKey
CngKey

키 교환의 다른 당사자가 제공한 ECDH(Elliptic Curve Diffie-Hellman) 키의 공개 부분이 들어 있는 개체입니다.

반환

Byte[]

키 자료가 들어 있는 바이트 배열입니다. 이 정보는 현재 개체의 프라이빗 키와 지정된 퍼블릭 키에 따라 계산되는 비밀 계약을 통해 생성됩니다.

특성

예외

otherPartyPublicKeynull입니다.

otherPartyPublicKey이 잘못되었습니다. AlgorithmGroup 속성이 ECDiffieHellman을 지정하지 않거나 키 크기가 이 인스턴스의 키 크기와 일치하지 않습니다.

이 개체의 KeyDerivationFunction 속성이 Tls 키 파생 함수를 지정하지만 Label 또는 Seednull인 경우

다른 모든 오류입니다.

적용 대상

DeriveKeyMaterial(ECDiffieHellmanPublicKey)

두 번째 당사자의 공개 키가 들어 있는 ECDiffieHellmanPublicKey 개체를 사용하여 두 당사자 간의 비밀 계약을 통해 생성되는 키 자료를 파생합니다.

public:
 override cli::array <System::Byte> ^ DeriveKeyMaterial(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey);
public override byte[] DeriveKeyMaterial (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey);
override this.DeriveKeyMaterial : System.Security.Cryptography.ECDiffieHellmanPublicKey -> byte[]
Public Overrides Function DeriveKeyMaterial (otherPartyPublicKey As ECDiffieHellmanPublicKey) As Byte()

매개 변수

otherPartyPublicKey
ECDiffieHellmanPublicKey

키 교환의 다른 당사자가 제공한 공개 키입니다.

반환

Byte[]

키 자료가 들어 있는 바이트 배열입니다. 이 정보는 현재 개체의 프라이빗 키와 지정된 퍼블릭 키에 따라 계산되는 비밀 계약을 통해 생성됩니다.

예외

otherPartyPublicKey이(가) null인 경우

otherPartyPublicKeyECDiffieHellmanCngPublicKey 키가 아닌 경우

적용 대상