DECRYPT PKCS1 Command

Decrypt data that was encrypted using RSA-PKCS#1v1.5.

Description

Decrypt data encrypted with RSA-PKCS#1v1.5

Shell Example

Decrypt the file enc using key 0xa930:

yubihsm> decrypt pkcs1v1_5 0 0xa930 enc
   xlwIc7yQf/KkV5v4Y87Q9ZSqLReoNAxlCmmMPA4W08U=

Protocol Details

Command

Tc = 0x49
Lc = 2 + LD
Vc = I || D

Parameters:

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

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

The data is padded using the PKCS#1v1.5 scheme with Block Type 2. The data is decrypted and conformance to the padding scheme must be checked. Padding is then removed and the contained message is returned.

Response

Tr = 0xc9
Lr = LR
Vr = R

Paramters:

R := Decrypted data with padding removed