Stefano Frassi wrote: > At 17.59 19/10/2005, you wrote: > >> Stefano Frassi wrote: >> > I was trying the Muscle Applet in a JCOP41v2.2 javacard. >> > >> > Using muscletools I'm able to format the card. >> > I import a pkcs12 using Mozilla. >> > >> > Now, If I try to sign some data using the pkcs11 C_Sign function >> > or directly in muscletools with the crypt function, the Applet always >> > returns 6F00. >> > >> > Does anybody use this kind of javacard successfully with the Muscle >> Applet? >> > or is this a known problem with JCOP41v2.2 javacard ? >> > (using a Cyberflex e-gate 32K I don't have this problem) >> >> Yes, I do. I have the same result. What versions are you using? >> >> I will try to figure it out if it is a bug of the card or of the applet. > > > I've tried to reproduce the bug with the JCOP simulator... > > 1- Muscle Applet installed > 2- Framework initialized with the INS_WRITE_FRAMEWORK > 3- Imported 1 cert x509, 1 priv key and 1 pub key correctly > > until this point the APDU sent and the relative responses of a > JCOP41v2.2, an E-gate and the JCOP simulator are the same. > > Now, after the PIN has been verified, > I send the cipher init with > [INS_COMPUTE_CRYPT] b0 36 00 01 05 0003010000 > <-:9000 > > this it's OK on all the cards and the simulator > > but when I send the cipher final with > [INS_COMPUTE_CRYPT] b0 36 00 03 83 0100801122334455667788000000.........00 > > the Schlumberger E-gate and the JCOP SIMULATOR return the correctly > encripted 128 bytes > while the JCOP41v2.2 returns 6F00... > > I catched the point where the exception is thrown, it's the ciph.doFinal > method: it doesn't throw a > CryptoException but a general Exception > --------------------------------------------------------------------------------------------------------------------------------- > > private void ComputeCrypt(APDU apdu, byte buffer[]) > .... > case OP_FINALIZE: > ... > case CD_ENCRYPT: > case CD_DECRYPT: > .... > ciph.doFinal(src_buff, (short)(src_base + 2), size, > mem.getBuffer(), (short)(dst_base + 2)); > --------------------------------------------------------------------------------------------------------------------------------- > > > The different behaviour between the JCOP Simulator and the JCOP41v2.2, > makes me think that > maybe the Java Virtual Machine is not well implemented as regard the > javacardx.crypto.Cipher class... > > What do you think about?
I have asked the people from IBM in Zürich. Karsten > Bye > > _______________________________________________ > Muscle mailing list > [email protected] > http://lists.drizzle.com/mailman/listinfo/muscle _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
