Java Card  Hard ware necesarry?????

Hi all,
I have a project on Java Card.
Is it necessary that i have to purchse the hard ware to implement this project???
Pls Tell me how to proceed without any hardware.
If there is any simulator pls inform me.
Has any one worked on simulator.
Pls pls pls pls pls pls pls Help me
regards
Mihir

Actually you can develop your applet and test them without the need for hardware. Eclipse IDE + JCOP3.0 plugin provide exactly that.
HOWEVER in order to activate the JCOP plugin the easiest way is with a JCOP engineering card + Smart card reader.
to get eclipse: http://www.eclipse.org
for JCOP plugin and card you need to contact IBM: http://www-306.ibm.com/software/wireless/wecos/tools.html
Hope that helps.

Similar Messages

  • Java Card and Random Data

    Hello,
    i�m a student working with smart cards in my spare time. I�ve never
    worked with Java Cards before. As far as i know, instead of
    applications there are Java Applets on the Java Card. And instead of a
    native smart card OS there is the Java Card VM from Sun, with all its
    libraries.
    What i would like to know now is, how can i write a simple applet to
    generate for example a random number. According to Sun�s JC API 2.1.1
    there is a class called RandomData (in library javacard.security)
    which allows me to generate a random number. But this class is an
    abstract class. That means, i have to overwrite its abstract class
    functions setSeed(...) and generateData(...).
    Do i have to add the implementation code for these functions? How are
    these function calls handled to the JavaCard VM and to the hard ware
    of the Java Card? Does it depend on the possibilities of the hardware
    functionality of a Java Card?
    I would be very greatful if you could help me out with this.
    Sami

    You can call:
    RandomData r = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
    Usually, the chips have hardware RNG and thus provide true random.

  • How do I test a Java card applet with different AIDs on the fly?

    ... Like sweeping cards from employees in a queue of people lining up in the morning?
    When I created my applet, the aid is a fixed value inside the class.
    Whenever I wanted to test it with another value, I changed that AID and rerun the applet.
    I find it very cumbersome that needs to be rerun and rerun, over and over again.
    How do I test the applet easily with any values of AIDs that I'd like to put in, on the fly.
    I know I can't simulate the sweeps of card in the applet because I can't have a main method with a signature
    of Strings[] args or String[] args. I can only have JUnit to help me out, but still java card doesn't allow either
    main(Strings[] args) or TestCase to inherit from.
    Thanks
    Jack

    your question is hard to understand but:
    an applet always has one definite AID and you cant change it after install as far as i know
    a) you want to test many cards with diffrent AIDs?
    ->send a list of select commands and check the return values
    b)you want one card with the same applet to be available for many AIDs?
    ->install many dummy applets forwarding the commands to one core applet
    c)i think i didnt get your point :/

  • Urgent ! writing a java card applet -APDU problem

    hi
    i'm fairly new to the java programming language. i'm trying to write an RSA java card applet to run on a java card simulator.
    I am not sure at all what code i need to write for the CLA byte in the command APDU and what code i need to write for the INS byte in the command APDU, and where exactly to put it in my program.
    if anybody knows please could you help me out.
    So far i have written the code below.
    thanx
    louise
    import javacard.framework.*;
    import java.math.*;
    import java.util.*;
    /*the public key is the public part of the key. Anyone
    can have it. It can only encrypt data, not decrypt.*/
    public class publickey extends Applet{
    //code of the CLA byte in the command APDU header
    final static byte publickey_CLA = (byte)0x00;
    //max number of characters for text message is 60
    final static char MAX_TXT_MSG = 0x3c;
    //MAX number of tries (3) before PIN is blocked
    final static byte PIN_TRY_LIMIT = (byte)0x03;
    //size of PIN must be 4 digits long
    final static byte PIN_SIZE = (byte)0x04;
    //below status word(SW) values are returned by applet
    //in certain circumstances:
    //signal that the PIN verification failed
    final static short SW_PIN_VERIFICATION_FAIL = 0x6300;
    //signal that PIN validation required for txt msging
    final static short SW_PIN_VERIFICATION_REQUIRED = 0x630;
    //instance variables declaration
    OwnerPIN pin; //variable for holding owners pin
    BigInteger n,e;
    String owner;//variable for holding owners name
    /*make a public key. Do not do it yourself, but
    make a public key from a private key.*/
    publickey(String iowner,BigInteger in,BigInteger ie){
    owner=iowner;
    n=in;
    e=ie;
    public void process (APDU apdu) {
    byte[] buffer = apdu.getBuffer();
    //check Select APDU command
    if((buffer[ISO7816.OFFSET_CLA] ==0) &&
    (buffer[ISO7816.OFFSET_INS] ==(byte) (0xA4)) )
    return;
    if(buffer[ISO7816.OFFSET_CLA] !=publickey_CLA)
    ISOException.throwIt
    (ISO7816.SW_CLA_NOT_SUPPORTED);
    /*read the key back from a string.*/
    publickey(String from){
    StringTokenizer st=new StringTokenizer(from," ");
    owner=st.nextToken();
    n=readBI(st.nextToken());
    e=readBI(st.nextToken());
    /*use the key to encrypt a 'message' m. m should be a
    number from 1 to n (n not included).
    use makemessage to convert your message to a BigInteger.
    BigInteger encrypt(BigInteger m){
    return m.modPow(e,n);
    /*make a string from this key.*/
    public String toString(){
    return owner+" "+printBI(n)+" "+printBI(e);
    /*help methods for reading and writing:*/
    final static int radix=36;
    static String printBI(BigInteger b){
    return b.toString(radix);
    static BigInteger readBI(String s){
    return new BigInteger(s,radix);
    /* these methods convert an arbitrary message,
    in the form of an array of bytes, to a message
    suitable for encryption. To do this random bits
    are added (this is needed to make cracking of the
    system harder), and it is converted to a BigInteger.*/
    BigInteger makemessage(byte[] input){
    /*to understand this part of the program,
    read the description of the BigInteger constructor
    (in the standard java help). */
    if(input.length>128 ||
    input.length*8+24>=n.bitLength())
    return new BigInteger("0"); //error! message to long.
    byte[] paddedinput=new byte[n.bitLength()/8-1];
    for(int i=0;i<input.length;i++)
    paddedinput[i+1]=input;
    paddedinput[0]=(byte)input.length;
    for(int i=input.length+1;i<paddedinput.length;i++)
    paddedinput[i]=(byte)(Math.random()*256);
    return new BigInteger(paddedinput);
    /*the inverse of makemessage.*/
    static byte[] getmessage(BigInteger b){
    byte[] paddedoutput=b.toByteArray();
    byte[] output=new byte[paddedoutput[0]];
    for(int i=0;i<output.length;i++)
    output[i]=paddedoutput[i+1];
    return output;
    class privatekey{
    /*the data of a key*/
    BigInteger n,e,d;
    String owner;
    int bits;
    Random ran;
    /*unimportant things, needed for calculations:*/
    static int certainty=32;
    static BigInteger one=new BigInteger("1"),
    three=new BigInteger("3"),
    seventeen=new BigInteger("17"),
    k65=new BigInteger("65537");
    /*make a new key. supply the name of the owner of the
    key, and the number of bits.
    owner: all spaces will be replaced with underscores.
    bits: the more bits the better the security. Every
    value above 500 is 'safe'. If you are a really paranoid
    person, you should use 2000.*/
    privatekey(String iowner,int ibits){
    BigInteger p,q;
    bits=ibits;
    owner=iowner.replace(' ','_');//remove spaces from owner name.
    ran=new Random();
    p=new BigInteger(bits/2,certainty,ran);
    q=new BigInteger((bits+1)/2,certainty,ran);
    n=p.multiply(q);
    BigInteger fi_n=fi(p,q);
    e=chooseprimeto(fi_n);
    d=e.modInverse(fi_n);
    /*read the key back from a string*/
    privatekey(String from){
    StringTokenizer st=new StringTokenizer(from," ");
    st.nextToken();
    n=readBI(st.nextToken());
    e=readBI(st.nextToken());
    d=readBI(st.nextToken());
    /*some help methods:*/
    static BigInteger fi(BigInteger prime1,BigInteger prime2){
    return prime1.subtract(one).multiply(prime2.subtract(one));
    static BigInteger BI(String s)
    {return new BigInteger(s);}
    BigInteger chooseprimeto(BigInteger f){
    /*returns a number relatively prime to f.
    this number is not chosen at random, it first
    tries a few primes with few 1's in it. This
    doesn't matter for security, but speeds up computations.*/
    if(f.gcd(three).equals(one))
    return three;
    if(f.gcd(seventeen).equals(one))
    return seventeen;
    if(f.gcd(k65).equals(one))
    return k65;
    BigInteger num;
    do{
    num=new BigInteger(16,ran);
    }while(!f.gcd(num).equals(one));
    return num;
    final static int radix=36;
    static String printBI(BigInteger b){
    return b.toString(radix);
    static BigInteger readBI(String s){
    return new BigInteger(s,radix);
    /*returns the public key of this private key.*/
    publickey getpublickey(){
    return new publickey(owner,n,e);
    /*the same encryption that the public key does.*/
    BigInteger encrypt(BigInteger m){
    return m.modPow(e,n);
    /*decryption is the opposite of encryption: it
    brings the original message back.*/
    BigInteger decrypt(BigInteger m){
    return m.modPow(d,n);
    public String toString(){
    return owner+" "+printBI(n)+" "+printBI(e)+" "+printBI(d);
    /*this main demonstrates the use of this program.*/
    public static void main(String[] ps){
    say("************ make key:");
    privatekey priv=new privatekey("sieuwert",92);
    publickey pub=priv.getpublickey();
    say("the public key:"+priv);
    say("************ encrypt message:");
    byte[] P="RUOK?".getBytes();
    BigInteger Pc=pub.makemessage(P);
    say("converted:\t"+printBI(Pc));
    BigInteger C=pub.encrypt(Pc);
    say("coded message: "+printBI(C));
    say("************ decrypt message:");
    BigInteger Pc2=priv.decrypt(C);
    say("decoded:\t"+printBI(Pc2));
    byte[] P2=publickey.getmessage(Pc2);
    say("deconverted: "+new String(P2));
    static void say(String s){
    System.out.println(s);

    Command APDU is not written in your source code, rather it is sent from PC or programmed Card Acceptance Device/ Card Reader/ Terminal.
    The code installed in the Java Card should be able to handle the Command APDU received and process it accordingly, and finally your code should be able to send out response APDU.
    You may think your code as a decoder, to retrieve each byte (CLA, INS, P1, P2, DATA, LC) using the Java Card API, you should be able to do it.
    Also, I notice in your code that you want to work out with strings, but Java Card does not support strings, chars, long, float, double ...
    to send out reponse APDU, there are certain steps that you can use, not just simply print like ordinary J2SE may use.
    hope this will help u

  • How to run Java Card Program in a Simulator

    I m Narendra Reddy studying in India and have taken Java Card for my B.E. final year project.
    i also acquire knowledge of Whole Java Card Development Life Cycle but i found much more difficulties to implement those ideas into java card.
    so, Will you please do me a favour and give me a complete solution if possible with an example.
    i also want each step with the commands, from the creation of Class file to the running of prog. in simulator.
    it will be very useful for me to head towards my project.
    Thank you,

    Just for the record,
    Since we are looking at different possibilities, there are couple of ways to achieve simulation/testing environment for current Java Card,
    1. "The Java Card Workstation Development Environment(JCWDE) tool allows the simulated running of Java Card applet as if it were masked in ROM. It immulates Card environment." Although, as Joe mentioned, it does not support;
    - package installation
    - applet instance creation
    - persistent card state
    - firewall
    - transactions
    - transient array clearing
    - remote method invocation
    - applet/package deletion
    Thus you can use 'jcwde' tool in combination of apdutool to test some
    of the Applet behavior(& JCRE) but not all. You have realized this when you tried 'sample' applets.
    2. JCDK2.2 also provide c-reference implementation of the Java Card. This(cref) is more robust way to test Applet. Although the catch with this is that Sun does not have SCSL(Community Source Licensing) program for Java Card(alas!) and this means you can not mask your applet into this reference implementation unless you get hold of source code somehow(source licensing is one(costly) way)
    3. Buy reader/card and figure out how to install applet for
    testing purpose.
    4. Buy kit from JC vendor containing reader/software/cards and use it
    (costly and hard to find JC2.2 implementation)
    1 and 2 are easier but not a real life solution(how many cards with intel/sparc processor anyway?). 3 and 4 are ideal but other way challenging. Yes, probably solution-1 is the right for your purpose.
    regard,

  • I hav installed mac os lion on my MBP 2011 model but it is telling me no wifi hard ware installed what do i do pls suggest me sumthing

    i hav installed mac os lion on my MBP 2011 model but it is telling me no wifi hard ware installed what do i do pls suggest me sumthing
    so i cannot select my wifi or anything
    please tell me what do i do
    when i open network prefrences it shows
    when i click on "turn on wifi" nothing happens
    i have even done a apple hard ware test but it says everything is alright
    i am really tensed what do i do pls help me

    If AHT doesn't show any issues, your best bet would probably be to take it to the Apple Store. The AirPort (Wi-Fi) card may have been unseated from its original position. If there is a problem with the card Apple should be able to replace it for free.

  • Any one can help me ....in java card

    Please check the following the following thesis are correct and check whether it is possible also
    If it is wrong please tell me what is wrong…
    Client side application software means is the one which run on our desktop…is it right
    Smart card host software is the one which will be embed on the smart card….is it correct      
    I am going to use java card. So can I develop the client side application software in java standard Edition? ….is it possible
    And smart card host software using connected edition, java card platform which will be embed into the card so that I can communicate with client application software….is it right
    What I understand about smartcard I have written …Is all these are right...Kindly replying me

    here's a bone to get you started. now that i've done the hard part,
    you should be able to finish the rest.
    public class Pet {     
         private String name;
         private char gender;
         private String hunger;
         private String mood;
         private String cleanliness;
         public Pet(String _name, char _gender){
              name = _name;
              gender = _gender;
         public void buyAccomodation(String accom) {}
         public int buyFood(int num){return 1;}
         public void feed() {}
         public void playFetch() {}
         public void playHideAndSeek() {}
         public void bath() {}
         public void advanceDay() {}
         public void bidFarewell() {}     
    }

  • Java card perfomance

    Hello all,
    There are not too much vendors, which have java cards.
    And I propose to measure the perfomance of cards, which we are using in our projects, I think it will be usefull information for each other. Or may be not....
    Who could say something? Is topic correct ?

    - JCOP Tools include a performance test. It is hard to interprete the results though since a documentation and source code for the performance applet is not provided.
    - Eric V�tillard has a very good blog about Java Card. He addresses the issue that a standard test for Java Card perfomance measurement is missing:
    http://javacard.vetilles.com/2006/09/09/platform-performance/

  • MIDP and Bluetooth as Java Card substitute

    Hi,
    I'm a Java developer, but not a Java Card developer, so I'm curious about the opinions of Java Card developers. It seems to me that IR and Bluetooth enabled J2ME/MIDP devices could be used in many situations where Java Cards are currently used. Depending on the adoption rates of
    a) Bluetooth enabled computers, devices, access points, etc... and
    b) cell phones with both Bluetooth and J2ME
    It may soon (a year or two) become cheaper and/or more convenient to issue users without a J2ME Bluetooth phone, such a device, than to issue all users Java Cards.
    So, entrenched coders
    1) Is this migration sane?
    2) Is anybody doing it, now?
    3) How hard/trivial is porting the applications?
    Thanks,
    Curt

    I'm aware of the JSR, but what is the security element ?On Sun Tech Days I was told it should be a Java Card. ;-))
    The main advantage of a smartcard is that it provides a trustworthy and tamper-resistant environment.
    Please have a look at
    http://www.simalliance.org/portal_upload/SIMalliance_comm.PDF
    I quote from the SIM Alliance site:
    "Thanks to a defined standard, easy downloading and powerful operating systems displaying high quality graphics, J2ME phones are making their mark. This leads to the question with such success and a memory capacity up to 1000 times the (U)SIM, will this relegate the Smart Card to a second class citizen?
    While Smart Card cannot compete with a Java handset for the sexy aspects of applications such as graphics, the core attributes of a Smart Card offer a number of significant benefits to application delivery, execution and management. All of these features require privacy management, security, portability and one-to-one personalization.
    Wireless applications must be secure and robust. However, it is feared that operators' revenue streams and secure pipeline will be threatened by the free delivery of applications mimicking the loss-making Internet portal model.
    This is where the Smart Card, (UICC, (U)SIM, and equivalent), will play an essential role in providing security, building trust and protecting revenues for mobile businesses.
    The card will become an integral part of the architecture for distributed applications running at the same time on Server, Handset and Smart Card to leverage the respective benefits of each part of the infrastructure.
    By looking at the strong points of each of the Java standards, Java Card and J2ME are not competing technologies but instead can be used in tandem to create an "open" and "secure" infrastructure that operators and content providers need in order to increase their ARPU and diminish costs. At present this infrastructure does not exist but leading operators, handset manufacturers, content providers and (U)SIM suppliers are working to make it a reality."

  • Java Card SDK problem

    Hello,
    I have downloaded :
    *>java_card_kit-2_1_1-unix.tar.Z
    I am using Linux Mandrake 8.1 and j2sdk1.4.0_01.
    After installing and setting env vars I tried
    to run "jcwde" but it returned with:
    *>Error: native VM not supported
    I didn't find a linux specific download but I guess the unix download should work?!
    If the error comes because of wrong download, does anybody knows if there is one
    for Linux?
    thank you,
    John

    I find it hard to beleive that the kit didn't come with a README since I'm reading it right now !
    This is taken directly from it.
    Java Card 2.2
    " Supported Platforms
    * Windows� NT 4.0 with Service Pack 6
    * Solaris� 8 (SunOS 5.8) Operating Environment (SPARCTM platforms)
    Java Development Kit: Java2 SDK, Standard Edition (version 1.3) "
    Java Card 2.1
    Supported Platforms
    o Windows NT 4.0 with Service Pack 4
    o Solaris(TM) 2.6 (SunOS 5.6) Operating Environment (SPARC(TM) platforms)
    o Solaris 7 (SunOS 5.7) Operating Environment (SPARC(TM) platforms)
    o Solaris 8 (SunOS 5.8) Operating Environment (SPARC(TM) platforms)
         Java Development Kit: Java2 SDK, Standard Edition (version 1.2.2 or 1.3)

  • Storing file to java card

    HELP NEEDED URGENT!
    I want to store a file to a java card. (eg a text file)I want to enter the name of the text file to a text box and then store it to the card. How do i do this?
    Then i want to retrieve this file from the card. How do i do this? Pleas help as this is URGENT!!!
    Thanks
    J.

    Are you asking how to use middleware like OCF or PCSC to send the data to the card ? If so, that would be a large answer that I would recommend you read a bit.
    For OCF www.opencard.org,
    For PCSC - somewhere on MSDN ( always hard to find anything on MSDN. Today, you can find it at MSDN > Security > SDK Documentation > Authentication > Authentication Reference > Authentication Functions. To save time I always just search for SCardConnect )

  • Other Java Card Emulator

    Is there any other java card emulator besides cref from Java Card Development Kit?

    Dome313 wrote:
    Is there any other java card emulator besides cref from Java Card Development Kit?Hi,
    You will find that some of the major vendors have simulators available for their cards. Each of these simulators is designed to perform the same as the OS on the card so like different cards, different simulators can perform differently.
    NXP (JCOP), Gemalto and G&D all have a tool set for simulating (at least some of) their cards. These are built into an IDE. Some of these tools are hard to get a hold of and you should make sure any of these will meet your needs before paying for them (Gemalto Developer Suite is targeted at USIM development). You may be able to find other vendors that have similar offerings as well.
    Cheers,
    Shane

  • 3000 usd reward for the one can provide me any JAVA card with AES

    Hello,
    i am quite desperate, i am trying to find 1000-2000 java cards (schlumberger or jcop) with AES enabled. Seems this cards are really hard to find, i got allready offers and samples but all of them without AES enabled.
    I am willing offer 3000 USD reward to the person can give me the right contact where i can get those cards (at least 1000 pices) till 25-th of September. I got allready one offer from sagem orga for jcop, but their delivery time is 4-6 weeks, so it must be some one have such qtty of cards fizicaly on hand ready to ship.
    Please contact me by PM or phone (+852-6723-9999) or post here your contact details and i am calling you back.
    Thanks and best regards,
    Razvan

    @clemson
    i also have offer from sagem orga, delivery time 4-6 weeks, the point is that my customer does not understand that it is just a question of luck to find some one with cards on stock, he wants his goods fast. I have told him from begining not to stick on one specific card, but he preferred using jcop. I got some jcop from an analphabet, 10K pcs, jcop41 and this analphabet promised us to deliver us version 2.3.1, but the cards he delivered to us were 2.2.1 and those do not have AES !!!
    This is the reason why i am offering this reward. Maybe some one knows some one who have stock of 1000-2000 pcs. Now my customer does not mind to use ANY JAVA CARD which have AES. He don't mind if those cards are from Oberthur, Nxp, Gemalto, Giesecke & Devrient, or other manufacturer. His requirements are: a) must be java card b)must have AES other features are not important.
    Reagards,
    Razvan

  • Help with Java card client

    Hello All ,
    i am new to javacard ...
    i am using JCOP31 , and smartcard reader 5321
    and implementing the java card by using Eclipse with the JCOP tools plugin
    I installed an applet on a java card... and i was told that i have to write a client program to test it.
    I hope some one show me how to implement a javacard Client ..and what i should do to implement a JavaCard Client .
    Thank You for your time.

    Hi,
    Your best bet (for communicating with a real card) is to use the classes in the javax.smartcardio package in Java 6. If you search the forum you should be able to find examples of using this.
    If you need to communicate with the JCOP card simulator, you will need to use the JCOP offcard API's. This is a little bit harder and you will most likely have to use trial and error (and Eclipse) to find the classes you need. I have used this in the past, but I do not have any examples of this. It was actually possible to develop a service layer that can use either API so you can switch between a real card and JCOP simulator (handy for debugging). The JCOP offcard API jar file is in the JCOP Tools plugins directory.
    Cheers,
    Shane

  • I'm here to collect some information on tools used in Java Card development

    Hi All,
    Thank you for reading this message, I'm a technician from a software company. We are currently developing softwares based on java card technology. The complicated jcdk configurations and java settings are quite not easy to use. I'm coming here for asking a new set of tools which may help. Can any one give some suggestion?

    Hi,
    Are you looking for free or commercial tools? Are you developing for smart card or GSM/mobile?
    Many of the big card vendors have a commercial tools for developing with their cards. Some are harder to get than others. If you have a specific card vendor in mind you can contact them directly to see what tools they can offer. If your company is planning on purchasing a large number of cards the vendors are usually pretty happy to help out where ever they can.
    Another option is to develop a set of scripts or tools around the JCDK.
    Cheers,
    Shane

Maybe you are looking for