apdu

Adding the Open Mobile API library to an Android device to get APDU-based access to the SIM

…衆ロ難τιáo~ 提交于 2019-12-12 05:07:28
问题 I have a device without NFC. This device also does not support the Open Mobile API. I need access to the SIM applet on that device. Now I wonder if I could add that functionality...If I have a copy of the Open Mobile API library, would it work if pushed that Open Mobile API library to my device through ADB? Could I then exchange APDUs with my SIM applet? 回答1: No, that won't work. The Open Mobile API library is only an interface to the Open Mobile API service ("SmartcardService"). Thus, the

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

Updating binary data on a smartcard on an offset higher than 32767

别说谁变了你拦得住时间么 提交于 2019-12-11 18:07:57
问题 Can anyone help me with the layout of the data field in an Odd INS UPDATE BINARY command? Specification tells "'54' '02' {Offset data object in file} || '53' L53 {Discretionary data object}". On all my tries I get Status Word result '6700', which is "Wrong length: no further indication". Please provide an example if possible. Thanks in advance. 回答1: I found the issue. The "||" does not mean OR. So the data object of the Odd INS UPDATE BINARY shoud be "54 02 {any offset in two bytes} 53 01 FF"

Native DESFire APDU Framing not worked

Deadly 提交于 2019-12-11 10:53:13
问题 I'm using Galaxy A5, Android 5.0.2, SDK 21 with Android Studio 1.1.0 Android as PCD, and Mifare DESFire as PICC. Native DESFire APDU Framing didn't work, but ISO 7816-4 worked. Example: MIFARE DESFire SelectApplication with AID equal to 000000h (PICC level) Command: 90 5a 00 00 03 00 00 00 00 . Expected response: 91 00 . Currently the response is 68 00 . Document reference: AN11004.pdf (page 33) void SelectApp() { _isoDep.connect(); byte[] reqSelectApp = new byte[]{(byte) 0x90, (byte) 0x5A,

Setting up host card emulation

五迷三道 提交于 2019-12-11 09:22:55
问题 I am currently attempting to connect between an Arduino UNO with NFC Shield to my Nexus 4 running Android 4.4. I have the service setup, it's simply logging at the moment. Problem is, the NFC intent doesn't get bound to my app. The debugger reports the following error: 11-24 02:45:46.139 4006-4027/? E/BrcmNfcNfa﹕ UICC[0x0] is not activated So here's my 2 questions: On the Arduino side of things, what kind of 'message' does the NFC shield needs to send to my phone for my phone to understand

How to send a command APDU to a HCE device?

懵懂的女人 提交于 2019-12-11 09:02:15
问题 The AID of my app is F239856324897348 and I have constructed a SelectAID APDU for it. Now how do I actually send it to the receiving Android device which is using host card emulation. I have a created my HCE service to respond with a response APDU as in this thread: How to define an APDU for STORE DATA for Host Card Emulation? public static byte[] SelectAID = new byte[]{ (byte) 0xF2, (byte) 0x39, (byte) 0x85, (byte) 0x63, (byte) 0x24, (byte) 0x89, (byte) 0x73, (byte) 0x48}; private void

Command APDU returning 6985 (Conditions of use not satisfied) in result

杀马特。学长 韩版系。学妹 提交于 2019-12-11 04:14:20
问题 I am working on reading a smart card in Java. When I execute the following code below, the card returns 6985 (Conditions of use not satisfied) as a result. TerminalFactory factory = TerminalFactory.getDefault(); List<CardTerminal> terminals = factory.terminals().list(); System.out.println("Terminals: " + terminals); if (terminals != null && !terminals.isEmpty()) { // Use the first terminal CardTerminal terminal = terminals.get(0); // Connect with the card Card card = terminal.connect("*");

About Get Response command in javacard

两盒软妹~` 提交于 2019-12-11 02:37:20
问题 I'm confused about Get Response command. I thought I know it but actually I don't. I wanna know the mechanism in which the card returns 1000-bytes data in case 4. I guess the command is as follows. Please let me know the correct one if it is wrong. (Card) <== [CLA] [INS] [P1] [P2] [Lc] [Data] [Le] // response data size is 1000 bytes (Card) ==> 6100 (Card) <== 00 C0 00 00 00 (Card) ==> [Data(256)] 6100 (Card) <== 00 C0 00 00 00 (Card) ==> [Data(256)] 6100 (Card) <== 00 C0 00 00 00 (Card) ==>

eVRC smart cards

不想你离开。 提交于 2019-12-11 01:36:13
问题 Does anyone have experience with reading eVRC (Electronic Vehicle Eegistration Cards), and APD U commands in JAVA? Any example will be useful. Thanks in advance. 回答1: I would strongly suggest you would go with the javax.smartcardio libraries. Note that there are some availability issues, such as for 64 bit and access conditions for 32 bits in the later Java runtime environments. That said, the APDU and CardTerminal interface is pretty neat compared to many other API's dealing with APDU's.

Can a JavaCard emulate a MIFARE Ultralight or NTAG NFC tag?

我与影子孤独终老i 提交于 2019-12-10 19:28:24
问题 I would like to write a Java Card applet that responds to an NFC reader as if it was a regular MIFARE Ultralight or NTAG NFC tag. I am aware the MIFARE protocol is proprietary and may be a little more difficult but surely I should be able to achieve emulation of the NTAG protocol. If I match the NTAG specification and respond to the correct APDUs then I can surely emulate an NTAG? Update to original question I think I asked my original question incorrectly. I'm not looking to emulate a