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.