javacard

AID of JCOP's Security Domain and meaning of “Card Not Fused” or “Not Pre-Personalized”

天大地大妈咪最大 提交于 2019-12-18 09:29:32
问题 I download a software named JCOP Manger from here to deal with my CJ3A080 jcop java card. It recognize my card currectly. but it don't let my to install or list applets! why? Output of this software: I try to select the ISD using CardTool (The software that I use to send APDU to card), but as you see below none of common AIDs not found on the card : Note that, CardTool output format is as below : < CLA | INS | P1 | P2 | Lc | Le < Command Data Field (If Possible) > Response Data Field (If

Java Card DES generator applet output is different from online-tools output

匆匆过客 提交于 2019-12-18 05:12:44
问题 The below applet is written to do a DES encryption/Decryption on the APDU data field : package cryptoPack; import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISO7816; import javacard.framework.ISOException; import javacard.framework.JCSystem; import javacard.framework.Util; import javacard.security.CryptoException; import javacard.security.DESKey; import javacard.security.KeyBuilder; import javacardx.crypto.Cipher; public class CryptoDES extends Applet

JavaCard: How can an applet's instance call a method in another instance's context?

冷暖自知 提交于 2019-12-18 03:48:23
问题 Consider a Java Card Classic applet with multiple instances that need to share some data in a byte[] variable (e.g. persistent mutable, that is EEPROM/Flash), containing information common to all instances. A static byte[] variable would be a perfect fit, but these happen to be prohibited by validation rules imposed on me (I'm told: as a catch-all way to demonstrate that un-instantiating an instance frees what it allocated on instantiation). This would be solved if a slave instance could call

Send APDU commands to USIM/SIM card in android

冷暖自知 提交于 2019-12-17 16:21:58
问题 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

Get Data APDU command different tags and response format

纵然是瞬间 提交于 2019-12-14 03:39:46
问题 As you may know, Gloabal Platform Card Specification defines a command named Get Data to retrieve some information from the smart card. GlobalPlatformPro is one of the popular tools for communication with smart cards. When I list the installed applets on the card using this tool, I have the following output: D:\3-TestTools\SmartCard>GP -list -d -v -i //Useless Info Censored ATR: 3B6800000073C84012009000 //Select APDU Command A>> T=0 (4+0000) 00A40400 00 A<< (0018+2) (48ms)

How can i credit or debit more than 1 byte to/from card?

你离开我真会死。 提交于 2019-12-13 22:09:59
问题 I am newbie applets and i used from this link: working with Java Card Wallet for creating an Wallet project. I before could credit card amount by this command : 80 30 00 00 01 1A 00 . I now want add '5000' to the present amount. As you know 5000 in hex equals with '1388' that is 2 byte. So i must send 2 byte data 13 and 88 to the card. I create bellow command and sent it to card but i get '67 00 Wrong lenght' as response. 80 30 00 00 02 13 88 00 How can i credit or debit more than 1 byte to

is it possible to return some data along with the status word 9000 on selecting an applet in javacard?

情到浓时终转凉″ 提交于 2019-12-13 14:34:47
问题 i was wondering if i could send back some data from the javacard applet when it is selected. since select() method returns a boolean value i don't know how to return data bytes from it. can anyone help me with this? i want the applet to return a simple byte array along with the status word 9000 (which is default for success), when i send the select command to the card. ie, when i send the following command 00A4040006010203040506 i want a response like, 010203049000 (first four bytes are the

How to change applet's privilege and the card Historical Bytes?

只愿长相守 提交于 2019-12-13 01:10:46
问题 I already thought that changing Historical bytes is limited to Pre-Personalization step. But, I found a method named setATRHistBytes in the GlobalPlatform APIs today. This is its description(GlobalPlatform 2.2 Page 172) : setATRHistBytes public static boolean setATRHistBytes(byte[] baBuffer, short sOffset, bytebLength) For contact cards according to ISO/IEC 7816-4 and Type A contactless cards according to ISO/IEC 14443-3, this method sets the historical bytes. The sequence of bytes will be

Mark Javacard applet as implicit selectable (default applet) after install

£可爱£侵袭症+ 提交于 2019-12-12 15:11:21
问题 I'm looking for a way to mark an applet as the implicit selectable/"selected by default" applet after it already has been uploaded and installed on a Global Platform/JCOP 2.4.2 R1 system (for starters in the NXP JCOP Tools Java Card Simulation). The applet has been installed without the -d parameter in the JCOP shell: cm> install -i a000100201100001 -q C9#() a000100201100000 a000100201100001 => 80 E6 [...] 90 00 after that the state is Card Manager AID : A000000003000000 Card Manager state :

What is Max and Min size of Applet in java card

对着背影说爱祢 提交于 2019-12-12 02:52:34
问题 I am working on java card and i want to know: what is max and min size of an applet in java card and on which parameter it depends? How many applet we can install on smart card? I am using: smart card type = contact card using java card 2.2.2 with jcop using apdu 回答1: There is no official size limit (above the ones Robert already posted). Cards may have their own limits depending on available memory - but there is no fixed value for that; depends on what has already been installed, how their