Page 1 of 1

Signing with custom hash

Posted: Tue Mar 03, 2020 5:43 am
by Thumb
Hi,

Just wondering if the following scenario is possible.

1.) Port over a new hashing algorithm directly to my applet (in my case Blake2b)

2.) Use this as the base hashing algorithm for one of the on-board signature schemes.
2a.) Will setInitialDigest & signPreComputedHash do what I am asking in:
https://docs.oracle.com/en/java/javacar ... ature.html

Unrelated question, is there an estimate as to when a javacard running 3.1 will be available? I can't even find 3.0.5, the latest versions I can see are 3.0.4

Many thanks!

Re: Signing with custom hash

Posted: Sat Mar 07, 2020 4:28 am
by tay00000
Hi Thumb,

The smart card industry world moves on a very very slow pace. We only recently see the practical implementation of JC 3.0.4 on smart cards and most of the smart cards and SIM cards are still being equipped with just JC 2.2.2 or 3.0.1/2.

It will take a very long time before the industry moves from 3.0.4 to 3.0.5 before reaching 3.1.

You may do a custom hashing algorithm and here are the steps.

1.) Write the hashing algorithm Java source code (Blake2b for your case).
2.) Look for a card with signPreComputedHash signature capability.
3.) Create a custom digital signature class or function that will take in the hash result and then put it through the signPreComputedHash function for the Signature class. You won't need to use 'setInitialDigest'.