dufkan / JCEd25519

JavaCard implementation of Ed25519 signature algorithm for smartcards that do not support EdDSA algorithm introduced in JavaCard API version 3.1.
MIT License
7 stars 2 forks source link

Key Generation doesn't work with JCIDE (javacardOS) simulator or with P71D600 #2

Open cryptoanalyzers2 opened 1 year ago

cryptoanalyzers2 commented 1 year ago

The applet compiles and run in the JCIDE simulator. Initialization works well but when key generation is requested, the error F101 is received.

image

The code returns a cryptographic exception on the function setW on a ECPublic key

I tried with different javacard runtime (3.04, 3.05...) but the error remains: (ILLEGAL VALUE)

The profile SIMULATOR is used, I tried changing some settings but error remain.

When the applet is loaded on a P71D600, it returns the same error.

dufkan commented 1 year ago

Hi, thanks for the report. The implementation needs to work around specific behavior of ECPublicKey implementations on some smartcards and the jcardsim simulator. We do not plan to support other simulators, so, please, consider trying the simulator included in this project.

As for the smartcards, we know that the implementation works on NXP J2E145G and NXP J3R180, but the implementation may need further testing or adjustments on other cards. I do not have P71D600 available to analyze the problem.

There are planned some improvements of the JCMathLib library, which may allow it to run on more cards. When the changes are released, I plan to merge it to JCEd25519. There is a chance that this will solve your problem, but it will be done in 2-3 months at the earliest.

dufkan commented 1 year ago

Hi, the library is now updated. Please, check if it resolved the issue with your card for some configuration. I think the profile JCOP4_P71 has the highest chance of working with your card, but it was tested on NXP J3R200 card so there may be some differences.