Time duration on RSA Encryption
Posted: Tue May 02, 2017 3:43 am
I am testing RSA Encryption with keys length 768 and 1024.
In debugging window, about 4000 us for 768 key length, about 3000 us for 1024 key length.
For other keys, the time duration increases from 512 to 1984.
Does anyone have any idea about time duration?
In debugging window, about 4000 us for 768 key length, about 3000 us for 1024 key length.
For other keys, the time duration increases from 512 to 1984.
Does anyone have any idea about time duration?
Code: Select all
private final static short RSA_KEY_SIZ = KeyBuilder.LENGTH_RSA_768;
rsa_KeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, RSA_KEY_SIZE);
cipherRSA = Cipher.getInstance(Cipher.ALG_RSA_NOPAD, false);
cipherRSA.init(rsa_PrivateCrtKey, Cipher.MODE_ENCRYPT);
short cyphertext = cipherRSA.doFinal(inpBuffer,(short) 0, (short) (RSA_KEY_SIZE/8), buf, ISO7816.OFFSET_CDATA);