PivApplet
PivApplet copied to clipboard
Using master branch for jcardSim
Hi,
I see to use PivApplet, we need to use your fork of jcardSim. Few key changes i see in your fork for jcard sim are: https://github.com/arekinath/jcardsim/commit/5574374559598f79be4483081784ddd1f660bcfc
-
buffer = JCSystem.makeTransientByteArray((short)(engine.getInputBlockSize() + 1), JCSystem.CLEAR_ON_DESELECT); in src/main/java/com/licel/jcardsim/crypto/AsymmetricCipherImpl.java
- private static final short BUFFER_SIZE = 261; in src/main/java/com/licel/jcardsim/framework/APDUProxy.java
a) Could you please help me understand why this change was made? b) And why not merge this change in the master branch of jcardSim as well?
Really appreciate your time and efforts here.
Cheers!
"Add support for smartcard/vpcd integration" which allows the applet to be run in java simulator and use a socket interface to pcsc. https://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html
An example of its use: https://github.com/OpenSC/OpenSC/blob/master/.github/test-piv.sh
I don't know why it needs the extra byte I was involved in getting test-piv.sh to work under github actions recently.
Hopefully this is not causing a problem.
I do see this exception when i use jcardsim-3.0.5-SNAPSHOT.jar instead of jcardsim-3.0.5.12-SNAPSHOT.jar from arekinath branch of JcardSim.
Method: processGeneralAuthRsa
Exception: 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)
Hi,
Would you be able to help?
Sorry, no. But I am the main developer for the OpenSC PIV driver, if you have questions. 261 comes from APDU (4) + Lc (1) + max data (255) + Le (1) = (261) for short APDUs.