PUT HMAC KEY

Import an HMAC Key.

Description

Store an HMAC Key in the device.

Shell Example

Store an HMAC Key with the binary value 666f6f in the device:

yubihsm> put hmackey 0 0 hmackey 1 sign-hmac,verify-hmac hmac-sha256 666f6f
Stored HMAC key 0x7cf2

Protocol Details

Command

Tc = 0x52

Lc = 2 + 40 + 2 + 8 + 1 + LP

Vc = I || L || D || C || A || P

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

L := Label (40 bytes)

D := Domains (2 bytes)

C := Capabilities (8 bytes)

A := Algorithm (1 byte)

P := Key (Minimum 1 byte)

For HMAC-SHA1 and HMAC-SHA256: maximum 64 bytes

For HMAC-SHA384 and HMAC-SHA512: maximum 128 bytes

Response

Tr = 0xd2

Lr = 2

Vr = I

I := Object ID of created HMAC Key (2 bytes)