DECRYPT OAEP Command

Decrypt data using RSA-OAEP.

Description

Decrypt data encrypted with RSA-OAEP

Shell Example

Decrypt data stored in file enc using key 0x79c3:

yubihsm> decrypt oaep 0 0x79c3 rsa-oaep-sha1 enc
xlwIc7yQf/KkV5v4Y87Q9ZSqLReoNAxlCmmMPA4W08U=

Protocol Details

Command

Tc = 0x59
Lc = 2 + 1 + LD + LH
Vc = I || M || D || Hl

Parameters:

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

M := Hash Algorithm to use for MGF1 (1 byte)

D := Decryption data (256, 384 or 512 bytes)

Hl := Hash of OAEP Label (20, 32, 48 or 64 bytes)

Response

Tr = 0xc9
Lr = LR
Vr = R

Parameters:

R := Decrypted data with OAEP padding removed