javacard

BigInteger subtraction in JavaCard

穿精又带淫゛_ 提交于 2020-01-02 21:13:21
问题 I am attempting a proof of concept under very constrained technological conditions. My question is: how to efficiently subtract big integers (represented as byte arrays) in a Java Card? . Now, the details are what make the task tricky. I have access to one smart card. The model is Feitian JavaCOS A22 and runs Java Card 2.2. For full detail, Java Card enables the usage of a very restricted subset of the Java API ( namely, no int , no char , and naturally, no BigInteger ), but it does support a

What exactly is the class byte in JavaCard?

孤街醉人 提交于 2020-01-02 07:06:29
问题 I've started to work with the JavaCards and trying to grasp the sense of CLA byte. If to read RFC 5.4.1 Class byte 5.4.1 Class byte According to table 8 used in conjunction with table 9, the class byte CLA of a command is used to indicate to what extent the command and the response comply with this part of ISO/IEC 7816 and when applicable (see table 9), the format of secure messaging and the logical channel number. So... CLA flag is used for the indication, but what exact? Because, the table

Authentication failed to java card Manager after changing Global Platform default key in gpshell

。_饼干妹妹 提交于 2020-01-01 16:58:11
问题 I want to change globalplatform default key for loading applet and secure messaging to card manager. I could change my gemalto default GP card key using bellow commands successfuly: mode_211 enable_trace establish_context card_connect -readerNumber 1 select -AID A000000018434D00 open_sc -security 1 -keyind 0 -keyver 1 -key 47454d5850524553534f53414d504c45 -keyDerivation visa2 // Open secure channel put_sc_key -keyver 0 -newkeyver 1 -key 505152535455565758595a5b5c5d5e5f // Put secure channel

JCWDE : Exception from install() method

余生颓废 提交于 2020-01-01 07:22:17
问题 I am working on JavaCard and I developed an applet with JCDE on Eclipse: import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISO7816; import javacard.framework.ISOException; import javacard.framework.Util; import javacardx.framework.math.BigNumber; import javacard.security.CryptoException; import javacard.security.MessageDigest; public class SignatureGPS extends Applet { public static final byte CLA = (byte) 0xB0; public static final byte INS = (byte)

getting started with java card on sim cards

╄→尐↘猪︶ㄣ 提交于 2019-12-31 10:36:14
问题 I'm looking to write a simple beginner program using Java Card to run on sim cards. Can anyone point me to some very basic information on getting started? I've seen some descriptions of the toolkit api, but I'm looking for things like: what capabilities are supported by the sim card, how to upload my code to the card (do i need special hardware?), how do I tell whether a sim card supports java card, that sort of thing. EDIT: I'm specifically looking to run code on sim cards. I've seen some

Receiving SW=`“6999”, “6422”, “6444” and “6D00” in the simulating procedure with NetBeans , CREF and JCWDE?

老子叫甜甜 提交于 2019-12-25 16:24:09
问题 A simple 8 byte random number generator program is written in NetBeans for Java Card. This is the program : public class RandGen extends Applet { byte[] generatedArray; RandomData randData = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM); private RandGen() { generatedArray = JCSystem.makeTransientByteArray((short)8, JCSystem.CLEAR_ON_DESELECT); } public static void install(byte bArray[], short bOffset, byte bLength) throws ISOException { new RandGen().register(); } public void process

How to store offline transaction data in Java Card

会有一股神秘感。 提交于 2019-12-25 05:01:10
问题 I am new to Java Card development. I have created a Java Card applet for online payment.. But I couldn't find way to how to do offline transactions. I need to know how to store offline data (such as the balance) in Java Card. Is there any way to use file structure to store data? 回答1: For offline transactions it is required that you store the data in persistent memory. Moreover, updates to this persistent memory should be atomic . This means that if a transaction is in progress and there is a

pkcs11 support for kona 25 javacard

社会主义新天地 提交于 2019-12-24 17:25:22
问题 I have some Kona25 javacard from Tag systems and I want to use them for encryption and signature of my emails (for example in thunderbird). I have searched Google, and I found that I need a PKCS11 module for my cards. I search more and I found that Charismathics CSSI provide a pkcs11 module for kona25 cards, but I am looking for an open source or free solution. Does anybody have a offer? OpenSC doesn't support kona25 cards! 回答1: As this is a JavaCard, everything in OpenSC wiki about JavaCard

Secure Box in JCOP card

痞子三分冷 提交于 2019-12-24 02:21:48
问题 JCOP V2.4.2 Revision 3 Security Target: Page 11-12 A Secure Box concept is implemented within JCOP 2.4.2 R3. The Secure Box is a construct which allows to run non certified third party native code and ensures that this code cannot harm, influence or manipulate the JCOP 2.4.2 R3 operating system or any of the applets executed by the operating system.The separation of the native code in the Secure Box from other code and/or data residing on the hardware is ensured by the Hardware MMU which has

SW 0x6f50 when trying to install crypto applet

岁酱吖の 提交于 2019-12-23 03:47:07
问题 I am trying to install an applet which uses security classes ( Cipher , RandomData and MessageDigest ), but always get an 6F50 error when trying to install it. The package is loaded correctly but the applet cannot be instantiated. I am allocating all objects in the constructor and the algorithms are supported by the card (at least according to the datasheet). If I comment out all security classes references, the applet loads and installs properly. I've tried allocating byte[] and Object 's