MiniSmart II
20
Retrieve CA Public Key
Command Body is 72 46 04 01<5 bytes RID> <1 byte Index>.
Response Body is 06 <5 bytes RID> <1 byte Index> <1 byte Hash Algorithm> <1 byte
Encryption Algorithm> <20 bytes HashValue> <4 bytes Public Key Exponent> <2 bytes
Modulus Length> <Variable bytes Modulus>
Where:
<Hash Algorithm>: The only algorithm supported is SHA-1.The value is set to 0x01
<Encryption Algorithm>: The encryption algorithm in which this key is used. Currently
support only one type: RSA. The value is set to 0x01.
<HashValue>: Which is calculated using SHA-1 over the following fields: RID & Index
& Modulus & Exponent
<Public Key Exponent>: Actually, the real length of the exponent is either one byte or 3
bytes. It can have two values: 3 (Format is 0x00 00 00 03), or 65537 (Format is 0x00 01
00 01)
<Modulus Length>:
<LenL> <LenH>
Indicated the length of the next field.
<Modulus>: This is the modulus field of the public key. Its length is specified in the field
above.
Note:
If CA Key RID does not exist, response 15 F2 05
If CA Key Index does not exist, response 15 F2 06
Remove CA Public Key
Command Body is 72 46 04 02 <5 bytes RID> <1 byte Index>.
Response Body is 06
Note:
If CA Key RID does not exist, response 15 F2 05
If CA Key Index does not exist, response 15 F2 06
Set CA Public Key
Command Body is 72 46 04 03 <5 bytes RID> <1 byte Index> <1 byte Hash Algorithm>
<1 byte Encryption Algorithm> <20 bytes HashValue> <4 bytes Public Key Exponent>
<2 bytes Modulus Length> <Variable bytes Modulus> <2Bytes MAC Length>
Where:
<Hash Algorithm>: The only algorithm supported is SHA-1.The value is set to 0x01
<Encryption Algorithm>: The encryption algorithm in which this key is used. Currently
support only one type: RSA. The value is set to 0x01.
<HashValue>: Which is calculated using SHA-1 over the following fields: RID & Index
& Modulus & Exponent
<Public Key Exponent>: Actually, the real length of the exponent is either one byte or 3
bytes. It can have two values: 3 (Format is 0x00 00 00 03), or 65537 (Format is 0x00 01
00 01)