DERIVE ECDH Command

Perform an ECDH operation.

Description

Perform an ECDH key exchange with the private key in the device.

Shell Example

Perform an ECDH operation with key 0x52b6 and a public key in the file pubkey.pem:

yubihsm> derive ecdh 0 0x52b6 pubkey.pem
   5898516bcb0cb3db89d53471137c2d1c741b8ba6ebf2bb01f4a62d97342e97b2

Protocol Details

Command

Tc = 0x57
Lc = 2 + LD
Vc = K || D

Parameters:

I := Object ID of the Asymmetric Key (2 bytes)

D := Uncompressed public key to perform the exchange with (57, 65, 97, 129 or 133 bytes)

Response

Tc = 0xd7
Lc = LX
Vc = X

Parameters:

X := X coordinate of the completed key exchange