Help please. RSA or P-Code error


[ Follow Ups ] [ BasicCard User Forum ]

Posted by gonzalor (81.35.99.14) on July 11, 2012 at 15:58:08:

Hey. I have a problem using the RsaExDecryptRaw Functions and RsaExEncryptRaw.
In the simulator it work perfectly, but in a real card gives me the error 0x4403 in liberror. If it were 6403, I said to P-code has executed an invalid instruction (pcNotImplemented).

Here I leave the code with which I have problems:

Command &H80 &H14 RSAEncryptBuffer(UserID as String * 20, Disable Le)
If PINVerified = False then SW1SW2 = swPINRequired : Exit
If Buffer = "" then SW1SW2 = swNoData: Exit
Dim PublicKey as String
PublicKey = FuncGetRSAPublicKey(UserID)
Call RsaExEncryptRaw(Buffer, PublicKey)
If LibError 0 Then SW1SW2 = LibError: LibError = 0: Exit
End Command


Command &H80 &H1A RSADecryptBuffer(UserID as String * 20, Disable Le)
If PINVerified = False then SW1SW2 = swPINRequired : Exit
If Buffer = "" then SW1SW2 = swNoData: Exit
Dim PrivateKey as String
PrivateKey = FuncGetRSAPrivateKey(UserID)
Call RsaExDecryptRaw(Buffer, PrivateKey)
If LibError 0 Then SW1SW2 = LibError: LibError = 0: Exit
End Command


Follow Ups:


[ Follow Ups ] [ BasicCard User Forum ]