javacard

Point addition using Elliptic Curve calculations on Java Card

你说的曾经没有我的故事 提交于 2019-12-03 21:18:05
I have a smart card which supports JavaCard 2.2.2 and I would like to develop a signature with tickets on elliptic curve. To do that, I need to compute the sum of 2 points on an elliptic curve. I've read the JavaCard's API and I don't think it is possible, in fact there are things about elliptic curves but only for algorithms that are already developed (ECPrivateKey for ECDSA for example ...) But when you want to create an ECPrivateKey, you have to give the parameters which define the elliptic curve, so it is defined somewhere, right ? To put it in a nutshell, is it possible to develop a Java

is jcop is only way to install applet in java card?

痴心易碎 提交于 2019-12-03 16:12:57
I am trying to understand the concept of java card , I have some doubts , I want to share with , perhaps you would any best suggestion for me. //Jcop- I read somewhere that Java Card OpenPlatform (JCOP) is a smart card operating system for the Java Card platform developed by IBM Zürich Research Laboratory. question 1 - if this above sentence is right it means jcop is an operating system developed by IBM, handle all operation inside the card.right? I have a card which indicate ATR like- 3b 89 80 01 4a ....40 ( in character form it indicate- ;---jcop41v22m) , so can i say? this is a card which o

Safe Max Java Card APDU Data Command and Respond Size

蓝咒 提交于 2019-12-03 15:20:31
What is the recommended data field size in a Java Card APDU ? From Zhiqun Chen's Java Card Technology for Smart Cards: Architecture and Programmer's Guide book, it mentions that Le field allows a max of 255. Are we to interpret it as follow for the APDU Command: |<----------------------- 255 Bytes total ------------------------>| |<- CLA -><- INS -><- P1 -><- P2 -><- Lc -><---- DATA ----><- Le ->| Thus, if CLA, INS, P1, P2, Lc, Le are all 1 bytes each, we should assume that the we can safely only set 249 bytes into the DATA region ? For the APDU Response are we to interpret: |<----------------

Fast bit shift of a byte array - CMAC subkeys

断了今生、忘了曾经 提交于 2019-12-03 13:13:37
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) | carry); output[i] = (byte)carry; carry = (short)((carry >> 8) & 1); } while (i > 0); } Any ideas how to improve the performace? I was thinking about some Util.getShort(...) and Util.setShort(...) magic, but I did not manage to make it work faster then the implementation above. This is one part of CMAC subkeys computation and it

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

How can I check INITIALIZE UPDATE and EXTERNAL AUTHENTICATE correctness?

孤人 提交于 2019-12-03 10:09:27
I sent 80 50 00 00 08 00 00 00 00 00 00 00 00 [ INITILIZE UPDATE Command] via opensc-tool to my java card and received 00 00 11 60 01 00 8A 79 0A F9 FF 02 00 11 79 11 36 5D 71 00 A5 A5 EC 63 BB DC 05 CC [ Init Response ] as its response from the card. As you see: In the command,I send 00 00 00 00 00 00 00 00 as Host Challenge , And in the response : 00 00 11 60 01 00 8A 79 0A F9 = Key diversification data FF 02 = Key information 00 11 79 11 36 5D 71 00 = Card challenge A5 A5 EC 63 BB DC 05 CC = Card cryptogram Now I want to check myself,if the card cryptogram is OK or not. How I can do it? for

Javacard applet RPDU does not contain any data when accessed from seek-for-android

亡梦爱人 提交于 2019-12-03 09:13:19
I have a complex Javacard applet, which is developed and tested for ordinary Smart Card (e. g. NXP J3E145, T=1). Now I have to use it in UICC in a mobile phone and access it from my Android app. The UICC uses T=0 protocol. When I communicate to the SIM card from an ordinary card reader (Omnikey 5321), the applet works fine. However, when I move it into my mobile phone (Sony Xperia S) and send APDUs via seek-for-android API, some RPDUs do not contain any data part, there is only the status word 0x9000 and the data part is missing! These APDUs are failing: 80 04 00 00 00 --> 90 00 (although

What is the structure of an application protocol data unit (APDU) command and response? [closed]

早过忘川 提交于 2019-12-03 06:25:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am trying to learn Java Card . I have just started and have not found many resources. My first question is how to understand APDU commands. (such as those defined in ISO/IEC 7816-4) For example, if I see a byte pattern such as 10101010 how can I understand the meaning of this, and in particular determine the

getting started with java card on sim cards

家住魔仙堡 提交于 2019-12-02 19:43:42
I'm looking to write a simple beginner program using Java Card to run on sim cards. Can anyone point me to some very basic information on getting started? I've seen some descriptions of the toolkit api, but I'm looking for things like: what capabilities are supported by the sim card, how to upload my code to the card (do i need special hardware?), how do I tell whether a sim card supports java card, that sort of thing. EDIT: I'm specifically looking to run code on sim cards. I've seen some very high level tutorials online, but nothing that goes as far as connecting to a sim card or uploading

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

强颜欢笑 提交于 2019-12-02 13:31:51
问题 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? 回答1: No, while the Android HCE documentation lists the possibility to use secure element-based card emulation