javacard

How to get started with Java Cards?

本小妞迷上赌 提交于 2019-11-28 18:08:49
问题 I'm new to smart-card development. Please help me understand how to get started. What's the relationship between Java Card and JCOP? How do I map a JCOP version to a GlobalPlatform Card Specification? For example, what specification does JCOP 2.4.1 map to? When do I need to code against one API versus the other? Where can I find good tutorials for getting started? 回答1: JCOP is a software platform originally from IBM that implements Javacard API and GlobalPlatform (formerly Open Platform). Now

SIMPLE-TLV vs BER-TLV

孤街醉人 提交于 2019-11-28 18:00:45
问题 I have found in docs they are referring to SIMPLE-TLV and BER-TLV . I was look into most of the EMV and GP docs but they have not mentioned the different. Could anyone help me to understand the difference of two ? 回答1: Data fields in ISO/IEC 7816-4 for smart cards BER encoding This is the specification of the more common BER encoding used by ISO/IEC 7816-4: Each BER-TLV data object shall consists of 2 or 3 consecutive fields (see ISO/IEC 8825 and annex D). The tag field T consists of one or

0x6f00 error casting Javacard Shareable Interface

烂漫一生 提交于 2019-11-28 08:56:24
问题 I tried to use SIO (Shareable Interface Objects) for two different packages in order to update the business logic of my applet in future. I'm using eclipse, and I start two different JavaCard applications, ClientSIOApplet and ServerSIOApplet. There is a package named appClient in ClientSIOApplet and one named appServer in ServerSIOApplet. Also, ClientApplet.java and ServerAppBankInterface.java are classes in appClient and ServerAppBankInterface.java and ServerApplet.java are in appServer. You

Send APDU commands to USIM/SIM card in android

爱⌒轻易说出口 提交于 2019-11-27 22:21:40
I was already worked with smart cards and I am familiar with APDU commands (that are defined in ISO/IEC 7816 and Global Platform specifications). Now I want to know if is there any way to send an APDU command to my USIM/SIM card that is inserted to my mobile phone? (Samsung A3 with Android v4.4.4 kitkat installed.) I already searched in the Google and I found some related topics and tools named SIM Toolkit Application and Seek for Android . But I don't really understand what are these? Are these items two applications that I must install on my mobile phone? or are those two tools that was

Failed to send Extended APDU

折月煮酒 提交于 2019-11-27 19:04:38
问题 I have a big byte array (it's 320 bytes) on my Java Card and I want to send its data in one APDU response. So, I implemented ExtendedLength interface in my applet and then used the following program: package exPack; import javacard.framework.*; import javacardx.apdu.ExtendedLength; public class testExtended extends Applet implements ExtendedLength { byte[] longData = {(byte) 0x00, (byte) 0x10, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x06, (byte) 0x07, (byte) 0x08, (byte)

Javacards IDE, and JCOP tools for eclipse unavailable to download

回眸只為那壹抹淺笑 提交于 2019-11-27 18:57:44
问题 I'm starting to develop in JavaCard (more specifically JavaCard 2.2.2). I'm searching for tools to develop in JavaCard. I want an IDE that incorporates both an emulator and a debugger. The eclipse plugin JCOP tools from IBM seems to do that, but for some reason I can't find it online. Some forums point to the link http://www.zurich.ibm.com/jcop/download/eclipse/, but this link no longer works... Anyone knows what's going on? Have JCOP tools been discontinued? If so, can anyone suggest another

Simulate int variables with byte or short

爷,独闯天下 提交于 2019-11-27 08:58:35
As you know there is no int variable on JavaCard 2.2.x. I need integer variables for the applet I'm developing. I want to know how to simulate an int variable and its arithmetic using byte and short variables. Christmas special answer. Fully tested using Unit tests, but as yet only on Java SE. Needs some work for instantiating the backing array. Some code can still be optimized by in-lining the left hand operand. Note that this code uses *= - assignment of the answer to the first variable - rather than * as it is not a good idea to create object instances during Java Card runtime (they are

Javacard - power loss during garbage collection

假装没事ソ 提交于 2019-11-27 02:31:26
问题 I noticed some very strange behaviour on my smartcards (NXP J2E145, J3A081, J3C145 with an Omnikey 5121 reader): A power loss right after calling JavaCard method JCSystem.requestObjectDeletion() can damage the card: after about 10% of such power cuts the ATR command is very slow (1000ms) and I get no response to any other APDUs (applet selection, card manager authentication etc.). I know that the behavior of requestObjectDeletion() depends on the vendor specific implementation, so my question

Simulate int variables with byte or short

不问归期 提交于 2019-11-26 14:24:45
问题 As you know there is no int variable on JavaCard 2.2.x. I need integer variables for the applet I'm developing. I want to know how to simulate an int variable and its arithmetic using byte and short variables. 回答1: Christmas special answer. Fully tested using Unit tests, but as yet only on Java SE. Needs some work for instantiating the backing array. Some code can still be optimized by in-lining the left hand operand. Note that this code uses *= - assignment of the answer to the first