Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RSA encryption & doFinal & 2048 bit

858245Sep 8 2011 — edited Sep 14 2011
The next line of code lasts cca 420000 usec:
 sigLen = cipher.doFinal(tmpBuffer.data, (short) 0, chainingLength, tmpBuffer.data,
						(short) 0);
Cipher is the applet instance and it has been initialized in MODE_ENCRYPT mode of work. The cipher is defined like:
cipher = Cipher.getInstance(Cipher.ALG_RSA_PKCS1, false);
Does usec represent microsecond? I checked the specification JCOPV2_4_1R3_um and I saw something that surprised me. It says that the RSA encryption with the RSA key with the length 2048 but = 256 byte lasts 21 ms. What is happening? I checked several times and I am sure that this line is the bottleneck of the method execution. It would be the expected behavior only in situation if usec represents the millisecond instead microsecond.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2011
Added on Sep 8 2011
9 comments
503 views