WRAP DATA

Encrypt data.

Description

Encrypt (wrap) data using a Wrap Key.

Shell Example

Using Wrap Key 0x5b3a encrypt the string "Hello world!":

yubihsm> encrypt aesccm 0 0x5b3a "Hello world!"
MRkj6B0AAAAAAAAAAoO4dkIeAYoPvwTV/M/JX1dwKnLqnERO1hSW4wPS

Protocol Details

Command

Tc = 0x68

Lc = 2 + LD

Vc = I || D

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

D := Data to be wrapped

Response

Tr = 0xe8

Lr = 13 + LD + 16

Vr = N || D || M

N := Nonce (13 bytes)

D := Wrapped data

M := Mac (16 bytes)