javacard

Difference between verification and authentication?

有些话、适合烂在心里 提交于 2019-12-02 10:27:10
问题 As you know, we prove to the card that we are the authentic user, via INITIAL UPDATE and EXTERNAL AUTHENTICATION commands, as follow : < 80 50 00 00 08 | Host Challenge > ... < 84 82 03 00 10 | Host Cryptogram | MAK > ... I want to know, what is the differece between this authentication process and the VERIFYING process with CLA 20 P1 P2 Lc Data Le APDU? All cards support both? or each card use one of this mechanism? Update: As you see, I upload and install my applet on the card successfully

Difference between verification and authentication?

£可爱£侵袭症+ 提交于 2019-12-02 06:36:28
As you know, we prove to the card that we are the authentic user, via INITIAL UPDATE and EXTERNAL AUTHENTICATION commands, as follow : < 80 50 00 00 08 | Host Challenge > ... < 84 82 03 00 10 | Host Cryptogram | MAK > ... I want to know, what is the differece between this authentication process and the VERIFYING process with CLA 20 P1 P2 Lc Data Le APDU? All cards support both? or each card use one of this mechanism? Update: As you see, I upload and install my applet on the card successfully , [Without using Verification]! So why I need verificatin : C:\Users\ghasemi\Desktop\gpj-20120310>gpj

Upload a .cap file on Smart Card?

孤街醉人 提交于 2019-12-02 06:25:14
问题 I have a fresh card with the below code as its ATR. 3B 68 00 00 00 73 C8 40 12 00 90 00 I searched this ATR in google and finally I know this is a "Brazilian e-CPF card". the question is how I can use this card? I mean what APDUs for example it supports? is there any datasheet for it? is it a javacard? [if yes] how I can upload a .cap file in it? is there any default key for it? and a lot of this kind of questions. the mainly question is that : what kind of data I can gain from an ATR? btw I

Java Card Applet and Host-based Card Emulation of Android Kitkat 4.4

送分小仙女□ 提交于 2019-12-02 04:13:43
I would like to create NFC Payment Application based on Android Kitkat 4.4 which now support the NFC Card Emulation Mode for both not involving secure element and involving secure element. I would like to let My Application involve a secure element. So, I have a question. The Android KitKat can let my application access to the java card applet which is installed into a secure element? No, while the Android HCE documentation lists the possibility to use secure element-based card emulation, there are several problems hindering the use of a secure element in current devices: Nexus devices have a

Smartcardio.Terminal connection error in PCSC Gemplus Javacard

99封情书 提交于 2019-12-02 03:33:31
问题 I am extremely new to Java Card programming. While using javax.Smartcardio in my code, I am getting an error while trying to connect to Gemalto PCSC Java card. import java.util.List; import javax.smartcardio.*; public class App { public static void main(String[] args) { try { // Display the list of terminals TerminalFactory factory = TerminalFactory.getDefault(); List<CardTerminal> terminals = factory.terminals().list(); System.out.println("Terminals: " + terminals); // Use the first terminal

jcop applet upload error

落花浮王杯 提交于 2019-12-02 02:00:58
问题 I'm new to Java card development. I use jcop tools as development kit. When I run simple applet in Eclipse it gives this error. In the run configurations I choose the Java card simulation mode. After successfully installed in simulation mode i want to install app in java card. cm> upload -b 250 "C:\Projects\Javacard\MyTestApp\bin\hms\javacatd\Myapp\javacard\Myapp.cap" cm> install -i 6d796170702e617070 -q C9#() 6d797061636b616765 6d796170702e617070 jcshell: Error code: 6985 (Conditions of use

Upload a .cap file on Smart Card?

自作多情 提交于 2019-12-02 01:12:18
I have a fresh card with the below code as its ATR. 3B 68 00 00 00 73 C8 40 12 00 90 00 I searched this ATR in google and finally I know this is a "Brazilian e-CPF card". the question is how I can use this card? I mean what APDUs for example it supports? is there any datasheet for it? is it a javacard? [if yes] how I can upload a .cap file in it? is there any default key for it? and a lot of this kind of questions. the mainly question is that : what kind of data I can gain from an ATR? btw I use ACR38 SmartCard reader. and I create a .cap javacard program in Eclipse. Next Question: I use GPJ

how to write and read data from smart card using java card apdu

我只是一个虾纸丫 提交于 2019-12-01 12:56:15
I have written an applet and installed it in smart card. But I don't know how to read and write data to smart card? private void readName(APDU apdu) throws ISOException { byte[] apduBuffer = apdu.getBuffer(); for (byte i=0; i<userName.length; i++) { apduBuffer[5+i] = userName[(byte)i] ; } apdu.setOutgoing(); apdu.setOutgoingLength((short)userName.length); apdu.sendBytes((short)5, (short)userName.length); } Is it right code to read data from smart card? please tell me how to write data to smart card using javacard. Your card is either contact or contactless. Since you say you have already

Math library for JavaCard?

孤者浪人 提交于 2019-12-01 12:32:51
I'm currently working on a JavaCard project (v.2.2.2) and I need to compute values using square roots, logarithms, etc... I know that the Math class isn't available in JavaCard API and wonder if there exists another library which provides such operations ? And also I can't use double values but I need to. Is there a way to represent a double value in the JavaCard API and perform operation (such as log, sqrt, etc..) ? Any help appreciated ! The javacard 2.2.2 only supports boolean, byte, short, and optionally int. If you really need to perform Math, then you need to create your own class with

how to write and read data from smart card using java card apdu

怎甘沉沦 提交于 2019-12-01 11:48:15
问题 I have written an applet and installed it in smart card. But I don't know how to read and write data to smart card? private void readName(APDU apdu) throws ISOException { byte[] apduBuffer = apdu.getBuffer(); for (byte i=0; i<userName.length; i++) { apduBuffer[5+i] = userName[(byte)i] ; } apdu.setOutgoing(); apdu.setOutgoingLength((short)userName.length); apdu.sendBytes((short)5, (short)userName.length); } Is it right code to read data from smart card? please tell me how to write data to