Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Partial hashing

843851Aug 14 2009 — edited Aug 14 2009
Hello

I got my hands on a card that in order to perform a Digital Signature the data has to be passed has a Partial Hash. It only supports this kind of hashing method

Well, putting it simple I do not know how to perform this.

The APDU format for the PSO where the data is passed is the following:

Cla: 0x00
INS: 0x2A - For PSO
P1: 90 - For hashing
P2: A0 - For hash calculation of the data
Data: CRT DST with the following TLV structure

0x90, 0x1C, Intermediate hash value and number of bit already hashed (coded over 8 bytes = MSB...LSB);
0x80, Var (<= 0x40); Last block, to be hashed by the card

I also do not understand how to configure this DST.

In the DST, the field with tag 0x90 is with length 28 bytes (1C). This means that is the regular 20 bytes from an hash plus 8 other bytes? What other bytes?

And also in the DST but for the tag 0x80 what is the last block?

The Google searches are not helping much, so, any tips regarding partial hashing?

Ty
Cad
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2009
Added on Aug 14 2009
1 comment
300 views