External Authentication with Java Card through HSM

Hi All,
How to do External Authentication process in Javacard through HSM (Hardware Security Module). Does any HSM supports this?
My requirement is to store the Card KMC in HSM and i should authenticate the terminal application with the Java Card through HSM.
Does anyone have the idea on this. Because i should not expose the Card KMC to outside world.

Hi,
Megaa1207 wrote:
My requirement is to store the Card KMC in HSM and i should authenticate the terminal application with the Java Card through HSM.If you cannot create a functional module for your HSM to perform external authenticate, you can use the PKCS11 libraries (cryptoki) to perform the primitive operations to generate your KDC's and to use them for generating session keys and cryptograms. All the sensitive data will be able to stay secured inside the HSM. You would perform the cryptographic operations on the derivation data and store the result as a key object inside the HSM. There is quite a lot of documentation on the PKCS11 operations on the RSA web site.
Cheers,
Shane

Similar Messages

  • Java application communicate with java card applet without java card

    Can I write java application to communicate with java card applet without using java card?
    Can I send APDU to java card applet on computer(not install in java card)? If it's not, how can I write?
    Best Regard,
    Thanawan

    Your JCOP simulator implements a JCVM/JCRE according
    to specs. The CREF does that same thing excepts it's
    only simulates the API without crypto or third party
    applets. JCOP simulator is more then that. They are using thesame_ codebase for simulator and for oncard JCVM. Basically you are dealing with the same environment in both cases.

  • Can  i use SLE4428 smart card with java card developmentkit 2.1.2

    Can i use SLE4428 smart card with java card developmentkit 2.1.2
    plz reply

    No. SLE4428 is memory card and not Java Card.

  • Loss 3D graphics and can't connect to external display with NVIDIA card

    I note this morning that the graphics in 3D mode of iWork (version 4.1 with system 10.6.8) no longer appears in all software suite. The 2D graphics are displayed perfectly. I also notice I can't connect an external display when I am on NVIDIA card but work well with Intel card.
    The 3D graphics are printed but not displayed on the screen (it also appear inthe thumbnail). It seems to be a worry to display.
    I posted two screen images showing the problem of 3D in Pages.
    Link :
    http://www.flickr.com/photos/94407289@N00/6105793305/
    and
    http://www.flickr.com/photos/94407289@N00/6106332902/
    What's going on? and can someone help me because I have a report?

    Hello lolthisnameisnttaken,
    Based on your post it seems you're having an issue with an external display. The following article may help you find a solution:
    Apple computers: Troubleshooting issues with video on internal or external displays - Apple Support
    Thank you for contributing to Apple Support Communities.
    Cheers,
    Bobby_D

  • External Authentication with Server 2008 R2

    Has anyone had success configuring External Authentication on Windows Server 2008 R2? We are using Hyperion Enterprise 6.5.1.
    Thank you.

    Was there ever an answer on this, having problems with setup using same versions

  • External Authentication with LDAP

    Has anyone integrated external authentication of Essbase with LDAP? I've searched discussion groups, websites with no luck, and of course, Essbase documentation doesn't help either. Any additional documentation will help.Thanks in advance!

    Thanks for the info. Is this sample code part of the default implementation that comes installed with the product (essldap.dll)? Or is this something completely different.Also, has anyone done anything similar in visual basic? We have a shortage of v c++ skills around here.Thanks again!

  • External authentication with 9.0.1.0.0

    I cannot get external authentication to work over Oracle Net
    with 9i …
    e.g.,
    sqlplus /@s2b …
    ERROR:
    ORA-01004: default username feature not supported; logon denied
    [Cause: An attempt was made to use automatic logon on a system
    not supporting this feature.
    Action: Provide the complete username and password to log on to
    Oracle.
    <http://download-
    east.oracle.com/otndoc/oracle9i/901_doc/network.901/a90150.pdf>
    advanced security guide
    This error indicates that the connection was not over SSL. Look
    at the tnmsnames.ora file to verify the protocol value of the
    net service name that youi are using. The value must be TCPS and
    not TCP.]
    The error messages imply that I have Advanced Security turned
    on, but I do not. .. it's not even part of the installation.
    sqlplus username/passwd@s2 does work
    as does
    sqlplus / [using ORACLE_SID]
    REMOTE_OS_AUTHENT is set to TRUE in the init<SID>.ora file.
    Does anyone know if this feature has been decremented in 9i? It
    definitely does work on our 8.1.7 installations.
    Thanks,
    Dick Wieland

    Yes, I have done that (i.e., edited the initSID.ora file and
    done a shutdown then startup). I can use external authentication
    when I bypass the tnsnames.ora file by going in directly with
    the ORACLE_SID parameter.
    Dick

  • External authentication with OID

    I know that OID 10g is capable of performing external authentication against AD, Sun OneDirectory, Novell eDirectory and openLDAP, but what about something else like Oracle Virtual Directory?
    As I understand, there is an out of the box script that will create and external authentication plugin that calls a few procedures from the auth_external package. The auth_external package also an out-of-the-box package with a few procedures (authenticate_user and change_passwd) I've seen so far. I haven't looked in the ODS schema, but I'm assuming this auth_external package is wrapped and not generally viewable.
    Anyone out there have any ideas, how this auth_external package works, or better yet... does anyone know if the out-of-the-box solution for external authentication will work with any LDAP directory (in this case a virtual one)?
    Thanks.

    Can someone from Oracle please comment on this? is "AUTH_EXTERNAL" package "out of box" or do we have to write it?
    I am following instructions from
    http://download.oracle.com/docs/cd/B14099_19/idmanage.1012/b14082/plugin_cust_ext_auth.htm
    LINE/COL ERROR
    143/9 PL/SQL: Statement ignored
    143/19 PLS-00201: identifier 'AUTH_EXTERNAL.AUTHENTICATE_USER' must be
    declared
    241/11 PL/SQL: Statement ignored
    241/11 PLS-00201: identifier 'AUTH_EXTERNAL.CHANGE_PASSWD' must be
    declared
    251/11 PL/SQL: Statement ignored
    251/11 PLS-00201: identifier 'AUTH_EXTERNAL.RESET_PASSWD' must be
    declared
    LINE/COL ERROR
    -------- -----------------------------------------------------------------

  • Please help error regarding GPShell 1.4.2 with Java Card 2.2.1

    Hi masters..
    please help me regarding GPShell + Smart Card Reader (namely Omnikey Cardman 5321)..
    currently i've a smart card reader (Omnikey) and a sample java card that support for Java Card 2.2.1..
    i've installed Smart card reader's driver, and it has already completely function..
    When i try to run this command in GPShell 1.4.2, i get this report :
    C:\GPShell-1.4.2>GPShell helloInstallgemXpressoProR3_2E64.txt
    mode_201
    gemXpressoPro
    enable_trace
    establish_context
    card_connect
    * reader name OMNIKEY CardMan 5x21 0
    card_connect() returns 0x80100069 (The smart card has been removed, so that furt
    her communication is not possible.
    select -AID A000000018434D00
    Command --> 00A4040008A000000018434D00
    Wrapped command --> 00A4040008A000000018434D00
    select_application() returns 0x00000006 (The handle is invalid.
    Yes, i know that in that script (helloInstallgemXpressoProR3_2E64.txt), there's a script for load helloworld.cap into Java card..
    i tried that because i just want to make sure whether my Java Card run well or not..
    Please help me regarding this..
    Thanks in advance..

    Hi safarmer, thanks for your reply :)..
    Sorry before, i still don't understand about your last reply.. :(
    especially for check the crytpogram.. :(
    could you describe what mean of each line of code from that snippet code?..
    Sequence   : 0002
    challenge  : 598dd3961bfd
    cryptogram : 24cccf18c18437bb
    host       : 5a7787ba91497948
    DEBUG [] - Input to session S-ENC derivation: 01820002000000000000000000000000
    DEBUG [] - S-ENC: adc1163ba2a146fbb94af44c8676fb7cadc1163ba2a146fb
    DEBUG [] - Input to session DEK derivation : 01810002000000000000000000000000
    DEBUG [] - S-DEK: fd01086b6db03bdfe0d5cb61d03ed3abfd01086b6db03bdf
    DEBUG [] - Input to session CMAC derivation: 01010002000000000000000000000000
    DEBUG [] - S-MAC: 3e07b0c8fdfd798a573b9b9889d0cb513e07b0c8fdfd798a
    Input to card cryptogram verification: 5a7787ba914979480002598dd3961bfd8000000000000000
    DEBUG [] - Signature : 24cccf18c18437bb
    DEBUG [] - Cryptogram: 24cccf18c18437bb
    Card cryptogram authenticated=======================================================================================
    =======================================================================================
    i've added script "mode_211" to my script, as follow :
    mode_211
    enable_trace
    establish_context
    card_connect -readerNumber 2
    select -AID a0000000030000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
    delete -AID a00000006203010c0101
    delete -AID a00000006203010c01
    delete -AID a00000006203010c0101
    install -file HelloWorld.cap -nvDataLimit 500 -instParam 00 -priv 2
    card_disconnect
    release_contextbut when i executed that script in the console, i got this :
    C:\GPShell-1.4.2>GPShell helloInstallChan.txt
    mode_211
    enable_trace
    establish_context
    card_connect -readerNumber 2
    * reader name OMNIKEY CardMan 5x21-CL 0
    select -AID a0000000030000
    Command --> 00A4040007A0000000030000
    Wrapped command --> 00A4040007A0000000030000
    Response <-- 6F108408A000000003000000A5049F6501FF9000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
    f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
    Command --> 80CA006600
    Wrapped command --> 80CA006600
    Response <-- 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864
    886FC6B03640B06092A864886FC6B040215650B06092B8510864864020102660C060A2B060104012
    A026E01029000
    Command --> 80500000083C4E03633407EC1800
    Wrapped command --> 80500000083C4E03633407EC1800
    Response <-- 0000715457173C2B8FC1FF020002598DD3961BFD8B6F2963C070FF949000
    Command --> 8482010010E17B69E2A3DFEA320B0B457657362614
    Wrapped command --> 8482010010E17B69E2A3DFEA320B0B457657362614
    Response <-- 9000
    delete -AID a00000006203010c0101
    Command --> 80E400800C4F0AA00000006203010C010100
    Wrapped command --> 84E40080144F0AA00000006203010C0101D259A163E654B99900
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    delete -AID a00000006203010c01
    Command --> 80E400800B4F09A00000006203010C0100
    Wrapped command --> 84E40080134F09A00000006203010C01094A9BF13AD2CC3E00
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    delete -AID a00000006203010c0101
    Command --> 80E400800C4F0AA00000006203010C010100
    Wrapped command --> 84E40080144F0AA00000006203010C010156679B9711B83FAB00
    Response <-- 6A88
    delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
    install -file HelloWorld.cap -nvDataLimit 500 -instParam 00 -priv 2
    file name HelloWorld.cap
    Command --> 80E602001F09A00000006203010C0107A0000000030000000AEF08C60201A8C80201
    F40000
    Wrapped command --> 84E602002709A00000006203010C0107A0000000030000000AEF08C60201
    A8C80201F400D35F07F1D11A31E500
    Response <-- 6985
    install_for_load() returns 0x80206985 (6985: Command not allowed - Conditions of use not satisfied.)What it does mean?..
    so, can i reset THE RETRY COUNTER of my Java Card?..
    could you give me an example script that reset the Retry Counter?..
    Thanks in advance..
    Sorry i really confuse.. :(

  • Generate DES key with java card with JCRE 2.1.2

    Hi everyone,
    I want to generate DES key in my applet . my card supports GP 2.0.1 and JCRE 2.1.2 .
    I have tested my applet with JCRE 2.2.1 and used this JCSystem class functions to generate DES key and it compiles and works correctlly .
    but when I want to compile my applet with JCRE 2.1.2 I recieve an error which says that API 2.1.2 doesn't support JCSystem class .
    so I'll really appreciate it if anyone could tell me how can I generate DES key with JCRE 2.1.2
    and also I use JCSystem class functions to get my card's persistent and transistent memory , so with this class not working on JCRE 2.1.2 I have problem to read my free memories too .
    So I'll appreciate your help on this matter too.
    Best Regards,
    Vivian

    Hi Vivian,
    I don't seem to have any problem with the code you posted. What is the error you are getting? Is it with the compiler or with the CAP file converter? If it is a compiler error, you will need to ensure that the Java Card API jar is in your build path.
    Here is a simple class that works with JC 2.1.1 (which will work with JC 2.1.2 as well). I have confirmed that this applet compiles and will return encrypted data to the caller.
    package test;
    import javacard.framework.APDU;
    import javacard.framework.Applet;
    import javacard.framework.ISO7816;
    import javacard.framework.ISOException;
    import javacard.framework.JCSystem;
    import javacard.security.DESKey;
    import javacard.security.KeyBuilder;
    import javacard.security.RandomData;
    import javacardx.crypto.Cipher;
    * Test JC2.1.1 applet for random DES key.
    * @author safarmer - 1.0
    * @created 24/11/2009
    * @version 1.0 %PRT%
    public class TestApplet extends Applet {
        private DESKey key;
        private Cipher cipher;
         * Default constructor that sets up key and cipher.
        public TestApplet() {
            RandomData rand = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
            short lenBytes = (short) (KeyBuilder.LENGTH_DES / 8);
            byte[] buffer = JCSystem.makeTransientByteArray(lenBytes, JCSystem.CLEAR_ON_DESELECT);
            key = (DESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_DES, KeyBuilder.LENGTH_DES, false);
            rand.generateData(buffer, (short) 0, lenBytes);
            key.setKey(buffer, (short) 0);
            cipher = Cipher.getInstance(Cipher.ALG_DES_CBC_ISO9797_M1, false);
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            // GP-compliant JavaCard applet registration
            new TestApplet().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
        public void process(APDU apdu) {
            // Good practice: Return 9000 on SELECT
            if (selectingApplet()) {
                return;
            byte[] buf = apdu.getBuffer();
            switch (buf[ISO7816.OFFSET_INS]) {
                case (byte) 0x00:
                    cipher.init(key, Cipher.MODE_ENCRYPT);
                    short len = cipher.doFinal(buf, ISO7816.OFFSET_CDATA, buf[ISO7816.OFFSET_LC], buf, (short) 0);
                    apdu.setOutgoingAndSend((short) 0, len);
                    break;
                default:
                    // good practice: If you don't know the INStruction, say so:
                    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
    }Cheers,
    Shane

  • 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

  • Sim tool kit  with java card help

    Hi all,
    i want to develop an applet which sends a sms to the network using sim tool kit and java card. can anyone can help me on this?
    if u can give me any document or links or sampale codes i realy appriciate it.
    Nuwan Nanayakkara

    * Send message by SMS
    * @param message byte[] : message to send
    * @param number byte : number of the sms
    public void envoiSMS(byte[] message, byte number) {
    // sending of message with all needed parameters
    ProactiveHandler hdlerPro = ProactiveHandler.getTheHandler();
    short tpduSubmitLength = (short) (SERVER_ADDRESS.length + 6 +
    message.length);
    byte[] tpduSubmit = new byte[tpduSubmitLength];
    // TP-SRR + TP-UHDI + TP-RP + TP-VPF + TP-RD + TP-MTI
    //reply path(b) | user header indicator (b) | report request (b) | periode validity(2b) | rejet m�me numero MR(b) | message type (2b)
    byte FIRST_BYTE_local = (byte) 0x01; //juste type de message SUBMIT
    //tpduSubmit[0] = FIRST_BYTE; // TP-MTI + TP-RD + TP-VPF + TP-RP + TP-UDHI + TP-SRR
    tpduSubmit[0] = FIRST_BYTE_local;
    //tpduSubmit[1] = number;
    tpduSubmit[1] = 5;
    for (short i = 0; i < SERVER_ADDRESS.length; i++) {
    tpduSubmit[ (short) (i + 2)] = SERVER_ADDRESS;
    tpduSubmit[ (short) (SERVER_ADDRESS.length + 2)] = TP_PID;
    tpduSubmit[ (short) (SERVER_ADDRESS.length + 3)] = TP_DCS;
    tpduSubmit[ (short) (SERVER_ADDRESS.length + 4)] = (byte) message.length; //UDL
    for (short i = 0; i < message.length; i++) {
    tpduSubmit[ (short) (SERVER_ADDRESS.length + 5 + i)] = message[i]; //UD
    //envoi d'un SMS
    hdlerPro.init(PRO_CMD_SEND_SHORT_MESSAGE, (byte) 0, DEV_ID_NETWORK);
    hdlerPro.appendTLV(TAG_SMS_TPDU, tpduSubmit, (short) 0,
    (short) tpduSubmitLength);
    hdlerPro.send();
    I can't do all comments in english; another comments is in french.

  • How to start with java card

    hello,
    i'm new to java card n know a bit of core java.. my superior of company asked me to get complete knowledge on java card.. iworked for 1 month on native cards..n know a bit of gsm 11.14. I want a favour.
    my queries:-
    a) how and from where should i start
    b) wat all basics i need to know &
    c)how to work on this card.
    ANY REPLY WILL BE APPRECIATED..
    Thanks

    a)
    - Look at Sun's tutorials on Java Card.
    - Z. Chen's book from Sun about smart cards gives you deeper knowledge about the Java Card technology.
    - Furthermore there is a great reference book about smart cards in general from W. Rankl.
    b)
    - Java: You should have basic understanding and knowledge about Java.
    - Java Card: is a subset of Java, but you need to be much more aware of the Java Card VM and RE.
    - You need to have some specifications at hand
    - Java Card API, VM and RE
    - GlobalPlatform
    - ISO 7816 and ISO 14443 for CL
    c)
    - There is a number of smart card operating systems.
    - I recommend the Java Card Open Platform (JCOP) from IBM/NXP. There is a good developer environment (JCOP Tools plugin for Eclipse) where you can start developing against a smart card SW simulator.

  • Is there ANYONE who have REAL knowelage with JAVA CARD OS?

    It is serious problem. Same problem like this one:
    http://forums.sun.com/thread.jspa?threadID=5344671&tstart=30
    Anyway. Main problem is that if you want to use several times encryption using different key every time
    soon or later card will BLOCK itself!!!
    Well it will return code 6F00 and ONLY whole reprograming of card will help!!!
    Here is simple code:
    package com.cpit.javacard;
    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.AESKey;
    import javacard.security.DESKey;
    import javacard.security.Key;
    import javacard.security.KeyBuilder;
    import javacard.security.MessageDigest;
    import javacard.security.RSAPrivateCrtKey;
    import javacardx.crypto.Cipher;
    public class DES3a extends Applet
    byte[] staticKey = {0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47};
    byte[] inData ={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
    byte[] outData ={(byte) 0xF1,(byte) 0xD7,(byte) 0x5E,(byte) 0x4F,(byte) 0x0D,(byte) 0x37,(byte) 0xC2,(byte) 0x2C,(byte) 0xB8,(byte) 0xD5,(byte) 0x4E,(byte) 0x62,(byte) 0x53,(byte) 0xBB,(byte) 0x40,(byte) 0xB1};
    byte[] dummy = new byte[4024];
    //constructor
    private DES3a (byte bArray[], short bOffset, byte bLength)
    register(bArray, (short) (bOffset + 1), bArray[bOffset]);
    // install
    public static void install(byte bArray[], short bOffset, byte bLength)
    new DES3a (bArray, bOffset, bLength);
    public void process(APDU apdu)
         byte[] buf = apdu.getBuffer();
         // Good practice: Return 9000 on SELECT
    if (selectingApplet())
    return;
    if (buf[ISO7816.OFFSET_CLA] != (byte) (0xB0)) ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    if (buf[ISO7816.OFFSET_INS] != (byte) (0xAA)) ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
    byte buffer[] = apdu.getBuffer();
    Crypt_DES(apdu);
    private void Crypt_DES(APDU apdu)
    byte[] buffer = apdu.getBuffer();
    for( short i = 0; i<(short)50; i++) {
    generateSessionKey(inData, staticKey, buffer);
    if (Util.arrayCompare(buffer,(short) 0, outData, (short)0x0, (short)16) != 0 ) break;
    Util.arrayCopy(outData, (short)(0), buffer, (short)16, (short)16);
    apdu.setOutgoing();
    apdu.setOutgoingLength((byte) 0x30);
    apdu.sendBytes((short) 0, (byte) 0x30);
         return;
         private void generateSessionKey(byte[] derivationData, byte[] staticKey,byte[] sessionKey){
              DESKey key = ( DESKey )KeyBuilder.buildKey(KeyBuilder.TYPE_DES, KeyBuilder.LENGTH_DES3_2KEY, false );
              key.setKey( staticKey, (short)0 );
              Cipher cipher = Cipher.getInstance( Cipher.ALG_DES_ECB_NOPAD, true );
              cipher.init( key, Cipher.MODE_ENCRYPT );
              cipher.doFinal(derivationData, (short)0, (short)16, sessionKey, (short)0);               
              key.clearKey();
    It seems that problem is in KeyBuilder?! . Is this function allocates EEPROM??? how can be that memory
    deallocated? Even worst is if it used TYPE_DES_TRANSIENT_DESELECT insead TYPE_DES!!!
    In example from above in loop top value is 50. On some cards (depend on EEPROM size) it can be even
    1000 ! but still it will crash on the end!
    Also increasing size of "dummy" it will reduce number of DES runs.
    Here is results:
    cm> /select 11223344556677
    => 00 A4 04 00 07 11 22 33 44 55 66 77 00 ......"3DUfw.
    (20215 usec)
    <= 90 00 ..
    Status: No Error
    cm> send b0aa000000
    => B0 AA 00 00 00 .....
    (14394373 usec)
    <= F1 D7 5E 4F 0D 37 C2 2C B8 D5 4E 62 53 BB 40 B1 ..^O.7.,..NbS.@.
    F1 D7 5E 4F 0D 37 C2 2C B8 D5 4E 62 53 BB 40 B1 ..^O.7.,..NbS.@.
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    90 00 ..
    Status: No Error
    cm> send b0aa000000
    => B0 AA 00 00 00 .....
    (15024947 usec)
    <= F1 D7 5E 4F 0D 37 C2 2C B8 D5 4E 62 53 BB 40 B1 ..^O.7.,..NbS.@.
    F1 D7 5E 4F 0D 37 C2 2C B8 D5 4E 62 53 BB 40 B1 ..^O.7.,..NbS.@.
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    90 00 ..
    Status: No Error
    cm> send b0aa000000
    => B0 AA 00 00 00 .....
    (15632306 usec)
    <= F1 D7 5E 4F 0D 37 C2 2C B8 D5 4E 62 53 BB 40 B1 ..^O.7.,..NbS.@.
    F1 D7 5E 4F 0D 37 C2 2C B8 D5 4E 62 53 BB 40 B1 ..^O.7.,..NbS.@.
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    90 00 ..
    Status: No Error
    cm> send b0aa000000
    => B0 AA 00 00 00 .....
    (8572462 usec)
    <= 6F 00 o.
    Status: No precise diagnosis
    As you can see that card (jcop41) can run correct less than 200 times!!!
    On gemplus 64k it can run less than 1200 times!!!
    So is there any method for dealocating EEPROM that is used by KeyBuilder?
    Or to use RAM (Using TYPE_DES_TRANSIENT_DESELECT is even worst!)
    That is problem with EEPROM here is proof:
    On halted card when is application deleted it takes more time !!!
    ;HALTED CARD
    cm> ext-auth plain
    => 84 82 00 00 10 B0 B9 D5 5A FC D3 BA 3F AE 85 CD ........Z...?...
    9F 24 25 A5 04 .$%..
    (123134 usec)
    <= 90 00 ..
    Status: No Error
    cm> delete 11223344556677
    => 80 E4 00 00 09 4F 07 11 22 33 44 55 66 77 00 .....O.."3DUfw.
    (3235735 usec)
    <= 00 90 00 ...
    Status: No Error
    cm> delete 112233445566
    => 80 E4 00 00 08 4F 06 11 22 33 44 55 66 00 .....O.."3DUf.
    (940978 usec)
    <= 00 90 00 ...
    Status: No Error
    NORMAL CARD
    cm> ext-auth plain
    => 84 82 00 00 10 96 4D 17 94 84 41 0B 03 62 BF AC ......M...A..b..
    3D 72 41 E0 D4 =rA..
    (67224 usec)
    <= 90 00 ..
    Status: No Error
    cm> delete 11223344556677
    => 80 E4 00 00 09 4F 07 11 22 33 44 55 66 77 00 .....O.."3DUfw.
    (930056 usec)
    <= 00 90 00 ...
    Status: No Error
    cm> delete 112233445566
    => 80 E4 00 00 08 4F 06 11 22 33 44 55 66 00 .....O.."3DUf.
    (946824 usec)
    <= 00 90 00 ...
    Status: No Error
    As you can see 3235735 usec vs 930056 usec
    Any help?
    regards

    Ok, thanks for hints & help, here is a tested working example:
    static byte DES_flag = 0xa5;
    DESKey key ;
    Cipher cipher;
    //constructor
    // because I dont know how "install" handles functions i've use "selectingApplet"
    if (selectingApplet())
    if (DES_flag ==0xa5){
    cipher = Cipher.getInstance( Cipher.ALG_DES_ECB_NOPAD, false );     //instead true!     
    key = (DESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_DES_TRANSIENT_DESELECT , KeyBuilder.LENGTH_DES3_2KEY, true );
    DES_flag =0;
         return;
         private void generateSessionKey(byte[] derivationData, byte[] staticKey,byte[] sessionKey){
              key.setKey( staticKey, (short)0 );
              cipher.init( key, Cipher.MODE_ENCRYPT );
              cipher.doFinal(derivationData, (short)0, (short)16, sessionKey, (short)0);               
              key.clearKey();
    Regards

  • NetBeans java card platform

    Dear All,
    I need a java card simulator to debug my java card applet code.
    I try to use Java Card Platform on NetBeans IDE 7.1 for debugging purpose. After successfully building the applet and loading it onto the simulated card environment I try to select the applet instance using the following command through the Console.
    select //aid/3F564379F5/00279CD982
    in response I receive the following error.
    "Connection reset by peer: socket write error"
    Is anyone using Java Card Platform for debugging? I would be very happy to hear how to resolve this problem.
    Thanks in advance!
    Cheers!
    Mehmet

    Mehmet wrote:
    Hello Rohit,
    If you download the Java Card Development Kit (http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javame-419430.html#java_card_kit-2.2.1-oth-JPR)
    you will have a set of sample java card applets to use.
    You can use JPShell to download the cap files(compiled applet) onto the card and send ADPU to the card to see if you get correct response.
    Following link provides all the information to set up the environment and start developing java card applets using NetBeans IDE and GPShell.
    https://minotaur.fi.muni.cz:8443/~xsvenda/docuwiki/doku.php?id=public:smartcard:javacardcompilation
    I hope this can help.
    MehmetI already have , Netbeans 7.1 and now i have gpshell 1.4.4 ,i think netbeans is capable to making .cap file, did you mean that with use of gpshell i can connect with java card through reader? gp shell would work stand alone or we need to set this to netbeans? i read the link which u passed to me, it seems very good but "it seems very tough to implement" . HELL IS WAITING FOR ME... KIDDING DEAR,
    one last thing, anything other than net beans { here we create applet and it automatically create cap file} and gp shell are require to load applet onto the card? OR these is enough to implement wholo java card application- I asked this because i get the term JCOP and etc when i read uploading applet to card.
    anyways thanks for your help.

Maybe you are looking for

  • [SOLVED]Openshot Fails to Launch

    I've seen similar issues with openshot package in the past, now the thing is i think there is a bug with the current package (or mlt) because my current system is a fresh-updated install and i've the following output from openshot: [boris@compaqnx ~]

  • Background job for CM01

    Hi All, We need to be able to run CM01 Transaction in background and output the list to a text file instead of showing on the screen. The approach we took was made copies of CM01,CM0X, SAPMC65A etc and linked them appropriately. But when trying to ex

  • How do i place content in a sliding panel one beside the other?

    my site: www.islamobec.com how can i populate my sliding panel by placing content beside each other??

  • AK1 segment missing in 997 in B2B 10g

    I have configured a 997 acknowledgment in B2B 10g with version 5010VICS . In reports i can see AK1 segment in xml payload while it is missing in wire messege payload.Please suggest.

  • HT4859 How do i retrieve deleted notes from icloud backup?

    I accidentally deleted some notes on my ihone notes app and need to retreive them, can anyone help?