Contents
Encrypt data.
Encrypt (wrap) data using a Wrap Key.
Using Wrap Key 0x5b3a encrypt the string “Hello world!”:
0x5b3a
yubihsm> encrypt aesccm 0 0x5b3a "Hello world!" MRkj6B0AAAAAAAAAAoO4dkIeAYoPvwTV/M/JX1dwKnLqnERO1hSW4wPS
Tc = 0x68
Lc = 2 + LD
Vc = I || D
Parameters:
I := Object ID of the Wrap Key (2 bytes) D := Data to be wrapped
I := Object ID of the Wrap Key (2 bytes)
I
D := Data to be wrapped
D
Tr = 0xe8
Lr = 13 + LD + 16
Vr = N || D || M
N := Nonce (13 bytes) D := Wrapped data M := Mac (16 bytes)
N := Nonce (13 bytes)
N
D := Wrapped data
M := Mac (16 bytes)
M