Signing with custom hash

Algorithm School

Moderator: UNKNwYSHSA

Thumb
Posts: 1
Joined: Tue Mar 03, 2020 5:13 am
Points :14
Contact:

Signing with custom hash

Post by Thumb » Tue Mar 03, 2020 5:43 am

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!

tay00000
Posts: 149
Joined: Tue Sep 27, 2016 10:58 am
Points :2044
Contact:

Re: Signing with custom hash

Post by tay00000 » Sat Mar 07, 2020 4:28 am

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'.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 8 guests

JavaCard OS : Disclaimer