Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

Error while in testing JavaCOS A22 dual interface Java card with RSA and encryption/signing

Automated testing tool for algorithms supported by particular smart card with JavaCard platform

Moderator: Ellisun

Hooben
Posts: 53
Joined: Tue Jun 16, 2015 12:32 am
Points :414
Contact:

Error while in testing JavaCOS A22 dual interface Java card with RSA and encryption/signing

Post by Hooben » Mon Jul 18, 2016 1:37 am

One customer was test Feitian JAVA COS A22CR, the applet using JCAlgTest

The log can found from attachment.

My proprietary application gets CryptoException.ILLEGAL_USE for every call to to .doFinal for RSA ciphers. (It's working fine on a variety of other cards)

And running JCAlgTest

http://www.fi.muni.cz/~xsvenda/jcsupport.html
AlgTest_JavaCard/AlgTest_v1.6.1_jc2.2.2.cap

in performance testing mode (which actually tries to use the ciphers)

fails for every RSA operation except .update on ALG_RSA_NOPAD with 512 bit RSA key.

[relevant section of log attached]
You do not have the required permissions to view the files attached to this post. Please login first.

User avatar
JavaCardOS
Posts: 273
Joined: Thu Apr 30, 2015 12:00 pm
Points :2403
Contact:

Re: Error while in testing JavaCOS A22 dual interface Java card with RSA and encryption/signing

Post by JavaCardOS » Mon Jul 18, 2016 2:17 am

Just to confirm the problem, after generating keypair, call setP and setQ to do setting operation.

Code: Select all

            kp.genKeyPair();
           
            RSAPrivateCrtKey priKey = (RSAPrivateCrtKey) kp.getPrivate();   // Code added;
            short pLen = priKey.getP(buf, (short) 0);                       // Code added;
            priKey.setP(buf, (short) 0, pLen);                              // Code added;
            short qLen = priKey.getQ(buf, (short) 0);                       // Code added;
            priKey.setQ(buf, (short) 0, qLen);                              // Code added;


After modifying, do your own test again. Await for your reply!

wousim
Posts: 14
Joined: Tue Feb 16, 2016 10:12 pm
Points :109
Contact:

Re: Error while in testing JavaCOS A22 dual interface Java card with RSA and encryption/signing

Post by wousim » Mon Jul 18, 2016 2:27 am

JFYI:

I have encountered this problem before. I found there was something wrong with RSA algo in A22CR.

Recently, I bought several A22CR cards from JavaCardOS e-shop and the cards didn't have any problem with RSA.

I guessed that the problem has been fixed.

Hooben
Posts: 53
Joined: Tue Jun 16, 2015 12:32 am
Points :414
Contact:

Re: Error while in testing JavaCOS A22 dual interface Java card with RSA and encryption/signing

Post by Hooben » Sun Sep 04, 2016 11:48 pm

Our customer was did check the COS version, the answer from him, please have a look, thanks

A>> T=1 (4+0000) 80CA9F7F 00
A<< (0000+2) (13ms) 6A88

Not sure if this helps, but the ATR is:
3b:fc:18:00:00:81:31:80:45:90:67:46:4a:00:68:08:04:00:00:00:00:0e

Please check how can help on this, thanks


Hooben
Posts: 53
Joined: Tue Jun 16, 2015 12:32 am
Points :414
Contact:

Re: Error while in testing JavaCOS A22 dual interface Java card with RSA and encryption/signing

Post by Hooben » Tue Sep 06, 2016 1:35 am

Just got answer, the java cos is old one, already ship latest java card to customer for test, thanks

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 5 guests

JavaCard OS : Disclaimer