smartcard,javacard,globalplatform , What is the meaning of out put of GP -I command?


What is the meaning of out put of GP -I command?

Question:

Tag: smartcard,javacard,globalplatform

Below, you see the output of gp -i command :

gp :gp -i
Reader: ACS ACR122 0
ATR: 3B8980014A434F5032343252334B
More information about your card:
    http://smartcard-atr.appspot.com/parse?ATR=3B8980014

***** Card info:
***** Card CPLC:
IC Fabricator: 4790
IC Type: 5075
Operating System ID: 4791
Operating System release date: 2347
Operating System release level: 4100
IC Fabrication Date: 4198
IC Serial Number: 00174397
IC Batch Identifier: 4248
IC Module Fabricator: 4812
IC Module Packaging Date: 4205
ICC Manufacturer: 0000
IC Embedding Date: 0000
IC Pre-Personalizer: 143E
IC Pre-Perso. Equipment Date: 2830
IC Pre-Perso. Equipment ID: 31373433
IC Personalizer: 0000
IC Personalization Date: 0000
IC Perso. Equipment ID: 00000000
***** CARD DATA
GlobalPlatform card
Version: 2.2
TAG3: 1.2.840.114283.3
SCP version: SCP_02_55
TAG5: 1.3.656.840.100.2.1.3
TAG6: 1.3.6.1.4.1.42.2.110.1.2
***** KEY INFO
Key ID:1 VER:255 LEN:16
Key ID:2 VER:255 LEN:16
Key ID:3 VER:255 LEN:16
Key version suggests factory keys

gp :

I want to know what is the meaning of this items?

Why I should know them? In the other word, why gp tool developer, add --info(or -i) parameters to its software?

And also, what are different key versions and different key IDs for? Does having different Key version and Key ID mean, Different applets can use different Keys? Or the user can use different keys to communicate with the card? Or each Key has a specific role?


Answer:

As suggested before: you can get detailed information from the GP specification. Consider -i a "dump data from card useful for debugging and other purposes". It dumps card data, CPLC and key template of the ISD. If you don't know what that means, read the specification.


Related:


lib directory could not be found in jcdk home


javacard
I will start a project about Java card on Eclipse IDE.I follow the instructions here and when I set the home location of JCDK , I am getting "lib directory could not be found in JCDK home." error.What can be reason?

NFC SWP applet selection returns 6999


android,nfc,smartcard,javacard,sim-card
I have a simple JavaCard applet installed on my SIM card. I try to communicate with my applet using Omnikey 5121 CL reader and NFC-enabled Sony Xperia L through NFC/SWP (single wire protocol). The problem is I cannot select the applet - as a status word I get 6999. The...

How can I extract an X509 certificate from a smart card using Java?


java,smartcard
I use the OmniKey 3121 reader and can use the javax.smartcardio API to send APDU commands to the card reader. I'm not sure if there is a standard way to access the certificate stored on the card. Pointers to example code to read the certificate data would greatly help. Also,...

Recovering an ECPublicKey from JavaCard to Java


java,bouncycastle,javacard,apdu,elliptic-curve
I am trying to implement ECDH between a terminal (simulated by my computer) and a smart card (Java Card). I fixed the elliptic curve that I want to use, and on the card side I have the following code to run the first part of the protocol : ECPublicKey pubKey...

RSA key pair generator applet, generate fixed almost zero private and public keys


java,rsa,javacard
I wrote the below JavaCard applet to generate 512 bit RSA public and private key pairs on the card and transfer them through the APDU responses to the outside: public class CryptoRSA extends Applet { //Abbreviations private static final boolean NO_EXTERNAL_ACCESS = false; //arrays for generated keys in byte. (I...

Converting decimal to hexadecimal byte in Java Card


hex,javacard,pkcs7,pkcs#5
I would like to convert a decimal (integer or short types) in Java to hexadecimal byte in a Java Card environment (only supports byte and short types and possibly int types). Example: int num = 254 Print out result: 0xFD My current method of using switches and if-else to handle...

UID of a NFC/SWP-accessed SIM card


android,nfc,smartcard,sim-card
SIM card is used as a secure element in my project. It is accessed through NFC-SWP contactless interface from a terminal device. I need to identify the SIM card somehow with a unique and permanent identifier and I need to be able to read the identifier through NFC. ICCID seems...

Send APDU commands to USIM/SIM card in android


android,smartcard,at-command,javacard,sim-card
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?...

resources to make java card application similiar like RB 5.0


java,resources,javacard,jcop
I am making java app which main function is to write data on java card 36k, so I need resources ,tutorials about java cards,stuff like that.? I have no experience making java card apps, so please give me any helpful resources.. I am making application like RB 5.0 , if...

ISO7816 - Odd INS codes?


smartcard,javacard,apdu
I found these mysterious lines in ISO 7816, (http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4_5_basic_organizations.aspx#chap5_4): 5.4.2 Instruction byte The instruction byte INS of a command shall be coded to allow transmission with any of the protocols defined in part 3 of ISO/IEC 7816. Table 10 shows the INS codes that are consequently invalid. Table 10 -...

Java Card memory leak in for loop?


for-loop,memory-leaks,javacard
I know that Java Card VM's doesn't have have a garbage collector, but what happens with a for loop: for(short x=0;x<10;x++) {} Does the x variable get utilized after the for loop, or it turns into garbage? Just in case I have a transient byte array called index from size...

Why Eclipse returns an error when trying to convert an applet, while NetBeans not?


java,eclipse,javacard
Below, you see a Java Card program that acts as a 8 byte random number generator : package randGen; import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISOException; import javacard.framework.JCSystem; import javacard.framework.Util; import javacard.security.RandomData; public class RandGen extends Applet { byte[] generatedArray; RandomData randData = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM); private RandGen() { generatedArray = JCSystem.makeTransientByteArray((short)8,...

Performance measures : Java vs JavaCard [closed]


java,performance,time,smartcard,javacard
I implemented two algorithms in Java. To compare their effectiveness, I call each function 1000 times and compare the execution time (using System.currentTimeMillis()). It needs 2500 ms to execute the first one and 1300 ms for the second one. With these results, I thought have a significative difference (in term...

Change PIN of a Gemalto Smartcard through a script


smartcard,gemalto
We have to use the Gemalto IDPrime .Net card Smartcard. We get these USB Dongles and have to change the PIN. Gemalto says via windows: From the Start menu, choose Run and type PINTool. Insert a IDPrime .Net card in the reader as prompted, and click OK. The change PIN...

Is there any alternative to GlobalPlatform Shell for Java Cards?


javacard
I know that GP Shell is a tool for testing I/O to Java Cards. But, it is very cumbersome to work with. Is there any alternative to GP Shell which doesn't need written scripts?...

How to write a cross-card Java Card applet?


javacard
Normally, when we write an applet containing a feature that our card not support it, the on-card verifier prevents installing its CAP file. I want to know if is there any way to write an applet that can install on all cards, but returns an already defined error during run-time...

Random data generator applet returns `0x6F00`


javacard
I wrote the below program to generate random numbers of different lengths, using two different algorithms (ALG_SECURE_RANDOM and ALG_PSEUDO_RANDOM). P1 and P2 in the APDU command specify the algorithm and the random length in order. P1 = 0X01 : ALG_SECURE_RANDOM P1 = 0X02 : ALG_PSEUDO_RANDOM P2 = Random number length...

Sending signature data in response APDU - Java Card


digital-signature,smartcard,javacard,apdu,ecdsa
I would like to sign some data (the MESSAGE byte array) on my Java Card and then return the signature in a response APDU. My code works fine (or at least I think it does and it returns 9000) without the line apdu.sendBytes(BAS, sSignLen), but when I uncomment it I...

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


java,cryptography,javacard
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 { // Array for the encryption/decryption key...

Encode publicKey on Java Card


java,encoding,javacard,ecdsa,pkcs#8
How to encode an ECDSA PublicKey on Java Card so that after I can decode it on another platform (e.g. sending the encoded key in a response APDU and processing it in a standard Java application)? keyPair.getPublic().getEncoded() on Java would do the trick with PKCS#8 encoding, but as far as...

DES Crypto applet returns errror on reception of any command


java,cryptography,javacard
In the below you see a simple Java Card applet that is written to encrypt and decrypt data with different DES and 3DES algorithms. These are supported commands : 00 C0 00 00 | KeyLength | KeyValue : To set the DES/3DES Key. (8 byte for DES, 16/24 bytes for...

Why am I unable to find my desired environment variable functionality on Win7?


javacard
And, in the path section I have: C:\ProgramData\Oracle\Java\javapath; C:\Program Files (x86)\Intel\iCLS Client\; C:\Program Files\Intel\iCLS Client\; %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; C:\Program Files\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files\Intel\Intel(R) Management Engine Components\IPT; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT; C:\Program Files (x86)\Skype\Phone\; C:\Program...

Two OwnerPIN object in Java Card


security,smartcard,javacard,apdu,pin-code
I am working on a Java Card application where our requirement is to keep some static data and balance in the card. For security I was thinking to make 2 object of OwnerPIN. One object is for terminal authentication (i.e. the terminal needs to send 8 bytes of data to...

Sturdiness of an applet in Java Card


java,exception,applet,javacard
I developed an applet in Java Card and it works fine. Now I am working on the sturdiness of this applet and more precisely, what happens if the card is deplugged during the applet execution for example. I am wondering if there is an Exception which handle this kind of...

How to send a data array to my Applet and manipulation it by Applet and return new data in response apdu?


arrays,applet,javacard,apdu
I want to send a random byte array including for example 24 elements to my JavaCard applet and then my applet is supposed to change that array using a specific method. For example that method XOR each elements with 0x05 and returns the result array in APDU response. To aim...

how changing master key or other keys can provide security ?how used session key to keep the further communication between DESFire and reader?


security,session,authentication,nfc,smartcard
I am working on the ticket electronik that tickets are DESFire cards. I want communications be safe . i now trying change PICC key . Before changing DESFire master key Authenticate with master key is necessary. In desfire sheet about Authenticate at page 31 was described: "This procedure not only...

Recovering an ECPublicKey from Java to JavaCard


java,cryptography,javacard,apdu,elliptic-curve
This question is related to the one I asked yesterday : Recovering an ECPublicKey from JavaCard to Java I have the same problem but in the opposite way : After sending the public key from my card to my computer (the point is represented as an octet string in uncompressed...

C on smartcards [closed]


c,smartcard
I have the task to write some crypto stuff in C and make it lightweight. The idea behind making it lightweight is, that it could run on a smartcard which doesn't offer much computational power and memory. It won't come to actually running it on a smartcard and it won't...

Secure Box in JCOP card


smartcard,javacard,globalplatform,jcop,nxp-microcontroller
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...

Hash generator applet doesn't work fine


hash,md5,javacard
Below, you see an applet that generate hash value of input data based on MD5, RIPEMD160, SHA, SHA224, SHA256, SHA384 and SHA512 : package hashPack; import javacard.framework.*; import javacard.security.CryptoException; import javacard.security.MessageDigest; public class HashMachine extends Applet { //outputArray byte[] hashedValue = new byte[64]; //output Length short OLength = 0x0000; //Defining...

How to transfer RSA public[/private] key outside the card?


javacard
I wrote the below simple program to generate a RSA key pair and transfer the public key to outside the card in the APDU response: public class CryptoRSA extends Applet { //Abbreviations private static final boolean NO_EXTERNAL_ACCESS = false; //Switch case parameters for selecting instruction = INS in apdu command...

Trying Java Card Application On real smart card


javacard,apdu
I will write an application for smart card with using Java Card Framework.When I finished my application I want to set up to a real smart card and try it.Which equipment I must have?How can I run my codes on a real smart card?I have to provide a connector between...

How much memory does this card really have? (EEPROM and ObjectDeletion game!)


javacard,jcop
I wrote a simple program to check requestObjectDeletion() method functionality and my card's available memory. My applet respond to five different kind of APDU commands as follow : SELECT APDU command : Response : 0X9000 Command : XX 00 XX XX XX [...] Response : Return available memory in byte....

Smartcard PKCS11 AES Key Gen Failure


python,aes,smartcard,pkcs11
I am attempting to create an AES 256 key on an ACOS5-64 smartcard and OMNIKEY 3121 card reader, using PKCS11 in python (using the PyKCS11 library). So far, all the "standard" operations seem to work with regards to asymmetric crypto. I have run plenty of code samples and pkcs11-tool commands,...

Smart Card Reader T0 T1 communication on APDU level


smartcard,apdu,smartcard-reader
I am struggle to understand what protocol I have to use to communicate with the card T0 or T1? So, correct me if I am wrong, but the reader actually decides by itself what protocol to use to communicate with the card if the card supports both. So my logic...

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


netbeans,javacard
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...

number value to byte[6] array card reader


c#,smartcard,smartcard-reader,cardreader
What's the best way to convert a number to a byte[6] in C#? I'm using MagTek Card reader and trying to display desired amount on device screen, it should be 6-byte array. The amount needs to be used and authorized, EMV Tag 9F02, format n12. Function: int requestSmartCard(int cardType, int...

Is it possible to program a “Java Card” - enabled smart card in any other language than Java?


c,embedded,smartcard,javacard
I have a Java Card enabled smart card and a card reader that was given by my Lab-instructor. I am supposed to do a project using Java Card 2.1.1 API. I don't like the Java Card API. Is it possible to program my given smart card using any other language...

How to change master key of DESfire cards?What is deciphered key?


smartcard,mifare
I want to change the master key of a DESfire card. I read mifare DESFire datasheet already, but as I am new in this field, I couldn't understand it. It is explained how to Change the Key at page 37 of above document. Can anybody give me an example or...

Fast bit shift of a byte array - CMAC subkeys


performance,cryptography,bit-manipulation,bit-shift,javacard
I need to implement as fast as possible left bit shift of a 16-byte array in JavaCard. I tried this code: private static final void rotateLeft(final byte[] output, final byte[] input) { short carry = 0; short i = (short) 16; do { --i; carry = (short)((input[i] << 1) |...

Determine Facility Code and Card Number from ATR in C#


c#,.net,bytearray,smartcard,winscard
I have the following card reader HID Omnikey 5325. I have a contact-less card named HIS Proximity. The number written on this card is 133593 42101044091-3. By reading the card, I get the following ATR hex: 3B050002F10673 Using the folowing applications I have managed to see the following information. I...

ADPU Service in iOS


ios,nfc,smartcard,apdu,contactless-smartcard
I'm looking for an NFC solution for iOS similar to HostApduService for Android. Can someone tell me how can I exchange APDU commands in iOS. Thank you....