Announce two new product: SmartCard Reader Rockey200 and USB2.0 Extension Cable

ROCKEY 200 is a handy and portable USB Smart Card reader that can perform read/write operations on any ISO 7816-1/2/3/4 smart cards which are compatible with protocol T=0 and T=1.

USB2.0 Extension Cable With high speed USB 2.0 devices such as USB token ,USB Card Reader and so on.

Come to try it now!

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: 402
Contact:

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

Postby 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: 257
Joined: Thu Apr 30, 2015 12:00 pm
Points: 2253
Contact:

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

Postby 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

Postby 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: 402
Contact:

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

Postby 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: 402
Contact:

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

Postby 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


Return to “JCAlgTest”

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer