globalplatform

Build GlobalPlatform for Ubuntu 14.04 LTS

倖福魔咒の 提交于 2019-12-08 13:31:11
问题 I try building GlobalPlatform for Ubuntu 14.04LTS to get GPShell up and running. but I get the following errors. I think this is openssl related but I'm not 100% sure. crypto.c:1391:17: error: storage size of ‘ctx’ isn’t known EVP_CIPHER_CTX ctx; ^ crypto.c:1391:17: warning: unused variable ‘ctx’ [-Wunused-variable] make[1]: * [libglobalplatform_la-crypto.lo] Error 1 make[1]: Leaving directory `/usr/local/bin/globalplatform-6.0.0/src' make: * [check-recursive] Error 1 I used the current

Opening a secure connection with Java Card and Global Platform

丶灬走出姿态 提交于 2019-12-07 17:31:07
问题 After succeeding with Java Card development on emulators now I'm dealing with a real Java Card (Gemalto IDCore 3010). I have been experiencing with the Global Platform, but I have problems even with the most basic sample code, that would list the applets on the card. This is the original code: mode_201 enable_trace establish_context card_connect select -AID a0000000030000 open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key

Access an applet directly without AID selection

左心房为你撑大大i 提交于 2019-12-07 11:55:31
问题 Usually, when you power up a JavaCard smartcard and want to communicate with an applet, you must select the applet using its AID first. Is there any way to have a "default applet" that is selected when the card is powered up? What I really want to do is be able to send my application level APDUs immediately upon selecting the card and not need to go through the application selection process. Is this possible? If so, how? 回答1: If your Java Card smartcard implements the Global Platform Card

Update: Personalization of Javacard Applet with GlobalPlatform

孤街醉人 提交于 2019-12-06 11:06:13
问题 From what I've heard, it is common for bigger smart card applets to personalize with global platform. I also found some PDF about personalization with Global Platform, as well as the Javacard API for GP. But I'm somehow missing some information relating both and I haven't found a good documentation on it. How should I organize my Applet to perform GP compatible personalization? Edit: I've read into the documents and have some specific questions, which I hope you can answer shortly. Q1: Guide

setATRHistBytes() method always returns false

别等时光非礼了梦想. 提交于 2019-12-06 10:41:06
I wrote the following program to change the Historical Bytes in the ATR of my smartcard to, for example, 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 . I use GPSystem.setATRHistBytes() to set the historical bytes. Note that 0x00 0x00 ... 0x00 is not the actual value that I'm using for the historical bytes but I censored it. The actual value is an array of 15 bytes that is equal to the historical bytes of another exisitng card. package org.globalplatform; import javacard.framework.*; import org.globalplatform.GPSystem; public class TestPrj extends Applet { public static final byte[] HIST_B

How do I get CPLC data from a smart card?

佐手、 提交于 2019-12-06 09:01:17
问题 I'm using GPShell on an Ubuntu VM with a smart card reader (the model is ACR122) and I'm using several different NXP SmartMX chips. Using their Android TagInfo app, I'm able to see the "Card Production Lifecycle Data" when I scan one specific SmartMX chip. However, I would like to use GPShell to get the CPLC data as well. I assume it's accessible because I can see it when I scan the tag on the Android device. I have a program called connect.txt , and it has this as the contents: mode_211

Java Card applets, secure data transmission and Secure Channel

烈酒焚心 提交于 2019-12-05 16:19:05
I want to write my applet in a way that its APDU commands and status words wasn't be clear in the transmission channel between my card and my reader. I mean I don't want to send APDU commands and responses to be plain text for third parties. I think I have two option : After selecting my applet on the card, for all the other commands, do an encryption function on the data section of APDU commands and decrypt them on the card and after that analyze them. Note that I can't encrypt whole the command using this methodology because the result may have conflict with another SELECT APDU command and

Authentication failed to java card Manager after changing Global Platform default key in gpshell

余生颓废 提交于 2019-12-04 12:36:32
I want to change globalplatform default key for loading applet and secure messaging to card manager. I could change my gemalto default GP card key using bellow commands successfuly: mode_211 enable_trace establish_context card_connect -readerNumber 1 select -AID A000000018434D00 open_sc -security 1 -keyind 0 -keyver 1 -key 47454d5850524553534f53414d504c45 -keyDerivation visa2 // Open secure channel put_sc_key -keyver 0 -newkeyver 1 -key 505152535455565758595a5b5c5d5e5f // Put secure channel keys card_disconnect release_context But when i want to make secure channel to card manager by new key,

Extended APDUs and T=0/1 communication protocols

*爱你&永不变心* 提交于 2019-12-04 11:48:18
I have a JCOP V2.4.2 R3 java card that it is mentioned in its datasheet "The card support both T=1 and T=0 communication protocols" I have also an ACR38 smart card reader that it support both T=0 and T=1 protocols. (I have T=0 communication with one card successfully and T=1 communication with this card successfully.) I wrote the below program and upload it on the card to send and receive extended APDUs: package extAPDU; import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISOException; import javacardx.apdu.ExtendedLength; public class ExAPDU extends

Installing applet in javacard

不打扰是莪最后的温柔 提交于 2019-12-03 12:50:30
I made a .cap file of the popular "Hello World" javacard code via Eclipse And now I want to load it in a real javacard via GPShell and ACR38 smart card reader. question: Am I need any key to load the .cap file in the card? I mean, should I authenticate before uploading my applet in the card or it's not necessory? I think it is mndatory to authenticate. it is irrational to upload .cap without authentication. but I don't know , how to authenticate. question: What's wrong in this? C:\Users\ghasemi>java -jar e:\gpj\gpj.jar -load e:\helloWorld.cap -install Found terminals: [PC/SC terminal ACS CCID