GENERATE HMAC KEY Command

Generate an HMAC Key.

Description

Generate an HMAC Key in the device.

Shell Example

Generate an HMAC-SHA512 key:

yubihsm> generate hmackey 0 0 hmackey 1 sign-hmac:verify-hmac hmac-sha512
Generated HMAC key 0xa9bf

Protocol Details

Command

Tc = 0x5a
Lc = 2 + 40 + 2 + 8 + 1
Vr = I || L || D || C || A

Parameters:

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)

Response

Tr = 0xda
Lr = 2
Vr = I

Parameters:

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