Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

javacard

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.s is made by IBM. and we require only and only JCOP tool to send cap inside this card because OS inside is JCOP and jcop tool would be the only option to talk to jCOp card?

question 2- or is there any other method by which i can send the applet inside my card?

    enable_trace
    establish_context
    card_connect
    select -AID a0000000030000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
    delete -AID D0D1D2D3D4D50101
    delete -AID D0D1D2D3D4D501
    delete -AID D0D1D2D3D4D50101
    install -file helloworld.cap -nvDataLimit 500 -instParam 00 -priv 2
    # getdata
    # close_sc // Close secure channel
    # putkey // Put key

  // options:
  //          -keyind Key index
  //          -keyver Key version
  //          -key Key value in hex
card_disconnect
release_context`

question 3- above code i got from gpshell 1.4.4 , the code style indictate that this is also a method tp send cap file inside the java card, I want to know that for my card case { atr is -3b 89 80 01 4a ....40 ( in character form it indicate- ;---jcop41v22m)} , I can apply gpshell to send .cap file in my card.

question 4- is gpshell is used to send cap into a special java card which is not jcop enable or which does not contaion jcop operating system?

there are so many techniques , so many type of java card, it makes me confuse , I hope you seems this question genuine and would give me revert back regards:-

like image 544
daniel_india Avatar asked Dec 28 '22 05:12

daniel_india


2 Answers

Answer to the subject of the question is:

NO.

Have a look at https://github.com/martinpaljak/GlobalPlatform

like image 33
Martin Paljak Avatar answered Feb 05 '23 16:02

Martin Paljak


The question is good. I see a lot of people that work with smart card for years and cannot still get the picture.

What you read is right JCOP is operating system for smart cards.

Although it is NOT true that you have to use JCOP tool to deploy applets. They might be helpful but it is not the only way. In fact what you need to know is what version of Global Platform is supported by your card. Global Platform is the standard that defines how Card Contend is managed. This includes installation, security concept and so on. For example if your card support GP 2.1.1 you should use this document as a reference:

http://www.win.tue.nl/pinpasjc/docs/Card%20Spec%20v2.1.1%20v0303.pdf

All the tools like gpshell, jcshell are wrapping global platform commands in more user friendly commands, and also implementing the security protocols for you. So you can use whatever tool that supports the GP version of your target card.

I hope this makes it a bit more clear.

like image 184
Kamen Goranchev Avatar answered Feb 05 '23 17:02

Kamen Goranchev