PUT ASYMMETRIC KEY Command
Import an Asymmetric Key.
Description
Import an Asymmetric Key into the device.
Shell Example
Store an RSA key from key.pem
into the device:
yubihsm> put asymmetric 0 0 rsakey 1 sign-pkcs key.pem
Stored Asymmetric key 0x1e15
Protocol Details
Command
Tc = 0x45 |
Lc = 2 + 40 + 2 + 8 + 1 + LP1 { + LP2 } |
Vc = I || L || D || C || A || P1 { || P2 } |
The key parameters vary according to the chosen algorithm. Each parameter has a fixed length and the order is compulsory.
Parameters:
I
:= Object ID of the Asymmetric Key (2 bytes)
L
:= Label (40 bytes)
D
:= Domains (2 bytes)
C
:= Capabilities (8 bytes)
A
:= Algorithm (1 byte)
P1
:=For RSA: secret prime p (128, 192 or 256 bytes)
For ECC: private key integer d (32, 48, 64 or 66 bytes)
For EDC: private key integer k (32 bytes)
P2
:=For RSA: secret prime q (128, 192 or 256 bytes)
For ECC: NOT DEFINED
For EDC: NOT DEFINED