You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It currently fails when trying to perform auth operations.
Exception i get is:
javacard.security.CryptoException
at javacard.security.CryptoException.throwIt(Unknown Source)
at com.licel.jcardsim.crypto.AsymmetricCipherImpl.update(AsymmetricCipherImpl.java:115)
at com.licel.jcardsim.crypto.AsymmetricCipherImpl.doFinal(AsymmetricCipherImpl.java:92)
If I change the buffer size to getInputBlockSize() + 1 to make it 256, everything works.
Can you please help me understand why we are limiting the buffer size to engine.getInputBlockSize()? Is it possible to make the buffer size bigger and let RSAEngine fail if the input is bigger than expected for that Cipher.
The text was updated successfully, but these errors were encountered:
Hi,
First of all, thanks for the great work.
I am trying to use this simulator to run PIV Applet: https://github.com/arekinath/PivApplet
It currently fails when trying to perform auth operations.
Exception i get is:
javacard.security.CryptoException
at javacard.security.CryptoException.throwIt(Unknown Source)
at com.licel.jcardsim.crypto.AsymmetricCipherImpl.update(AsymmetricCipherImpl.java:115)
at com.licel.jcardsim.crypto.AsymmetricCipherImpl.doFinal(AsymmetricCipherImpl.java:92)
This is because the buffer size here: https://github.com/licel/jcardsim/blob/master/src/main/java/com/licel/jcardsim/crypto/AsymmetricCipherImpl.java#L77 is 255 bytes for RSA 2048 key.
However, in the doFinal input size is 256 and it fails at:
https://github.com/licel/jcardsim/blob/master/src/main/java/com/licel/jcardsim/crypto/AsymmetricCipherImpl.java#L120
If I change the buffer size to getInputBlockSize() + 1 to make it 256, everything works.
Can you please help me understand why we are limiting the buffer size to engine.getInputBlockSize()? Is it possible to make the buffer size bigger and let RSAEngine fail if the input is bigger than expected for that Cipher.
The text was updated successfully, but these errors were encountered: