Encapsulate Method
Encapsulate(CoseKey)
Generates a new platform key pair and uses the private key along with the peerPublicKey to compute the shared value. It then derives the shared keys (encryption and authentication) from the shared value.
public virtual void Encapsulate(CoseKey authenticatorPublicKey)
Parameters
Type | Name | Description |
---|---|---|
CoseKey | authenticatorPublicKey |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
System.InvalidOperationException | The object is not available for |
Remarks
This will generate a new public and private key, compute the shared value, and discard the private key. The resulting public key will be found in the PlatformPublicKey property, and the derived keys will be found in the EncryptionKey and AuthenticationKey properties.
This method can be called only after instantiation or a call to Initialize(). Otherwise, this method will throw an exception.