Page 1 of 1

Generate Random number on card and on terminal?

Posted: Tue Dec 01, 2015 5:21 am
by wintstar
I am implementing a mutual authentication and I am wondering about Random number generation.

Code: Select all

RandomData rnd = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM); 
rnd.generateData(RP, (short) 0, (short) 16);


Needless to say, this code works fine. But according to my specifications, in order to do a three-way challenge-and-response I need to have a Random Number Generator on the terminal and on the picc. This is confusing me, since I am only aware of this way to create random data and would use this way of implementing it twice, once in the install-method, once in the relevant process-method.

Re: Generate Random number on card and on terminal?

Posted: Wed Dec 02, 2015 8:55 am
by vermont
The terminal. Usually the terminal system sends the commands to the card. So if you would run a Java application with javax.smartcardio then you could use the Java Standard Edition SecureRandom class.