1 Reply Latest reply: May 8, 2012 7:19 PM by safarmer RSS

    jcop tool (jcshell ) vs gpshell *mutual_authentication() returns 0x80302000

    rohit007
      I think that jcop tool and gpshell are two technique to upload applet inside the card , M i right? or these both are any real big difference????????


      In Jcop i used following command to upload a cap file inside the java card
      cm>  /terminal "PCSC|SCM Microsystems Inc. SCL010 Contactless Reader 0"
      --Opening terminal
      <div class="jive-quote"> /card -a a000000003000000 -c com.ibm.jc.CardManager</div>
       
      cm>  set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
      cm>  init-update 255
       
      cm>  ext-auth plain
                                                  ..
      Status: No Error
      cm>  delete a0010203040506070809
                                                 j.
       
      cm>  delete a00102030405060708
                                                j.
       
      cm>  upload "C:\Documents and Settings\amit pathak\workspace\jcop\bin\jcop\javacard\jcop.cap"
       
      cm>  install -i a0010203040506070809 -q C9#() a00102030405060708 a0010203040506070809
                                                 ..
      Status: No Error
      cm>  card-info
       => 80 F2 80 00 02 4F 00 00                            .....O..
       (8301 usec)
       <= 08 A0 00 00 00 03 00 00 00 01 9E 90 00             .............
      Status: No Error
       => 80 F2 40 00 02 4F 00 00                            ..@..O..
       (279151 usec)
       <= 07 A0 00 00 02 47 10 01 07 00 0A A0 01 02 03 04    .....G..........
          05 06 07 08 09 07 00 90 00                         .........
      Status: No Error
       => 80 F2 10 00 02 4F 00 00                            .....O..
       (24089 usec)
       <= 07 A0 00 00 00 03 53 50 01 00 01 08 A0 00 00 00    ......SP........
          03 53 50 41 08 44 65 6D 6F 49 4C 4A 41 01 00 01    .SPA.DemoILJA...
          07 A0 00 00 02 47 10 01 09 A0 01 02 03 04 05 06    .....G..........
          07 08 01 00 01 0A A0 01 02 03 04 05 06 07 08 09    ................
          90 00                                              ..
      Status: No Error
       
      Card Manager AID   :  A000000003000000
      Card Manager state :  OP_READY
       
          Application:  SELECTABLE (--------) A0000002471001  
          Application:  SELECTABLE (--------) A0010203040506070809
          Load File  :      LOADED (--------) A0000000035350   (Security Domain)
           Module    :                        A000000003535041
          Load File  :      LOADED (--------) "DemoILJA"      
           Module    :                        A0000002471001
          Load File  :      LOADED (--------) A00102030405060708
           Module    :                        A0010203040506070809
      cm>  \select a0010203040506070809
      jcshell: Backslash only in quotes allowed
      cm>  /select a0010203040506070809
       => 00 A4 04 00 0A A0 01 02 03 04 05 06 07 08 09 00    ................
       (5891 usec)
       <= 90 00                                              ..
      Status: No Error
      cm>  /send 8002000003
       => 80 02 00 00 03                                     .....
       (6023 usec)
       <= 01 02 03 90 00                                     .....
      Status: No Error
       
      basically jcop tool automatically write these commands on the shell when uploading cap file in the card...

      when i try gpshell to upload cap file i got this error like:-
      D:\amit pathak\all in one (java)\GPShell-1.4.4\GPShell-1.4.4>GPShell.exe list.tx
      t
      mode_201
      enable_trace
      establish_context
      card_connect
      select -AID a0000000030000
      Command --> 00A4040007A0000000030000
      Wrapped command --> 00A4040007A0000000030000
      Response <-- 6F198408A000000003000000A50D9F6E064051420422009F6501FF9000
      open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
      f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
      Command --> 805000000894918FD9BC6C5F8700
      Wrapped command --> 805000000894918FD9BC6C5F8700
      Response <-- 00004330001341906809FF02005D6C4BE624901F1DB57E450CE1976E9000
      *mutual_authentication() returns 0x80302000 (The verification of the card cryptog*
      ram failed.)
      why it is happening ? i am able to use the commands of jcop and gpshell , but i dont know about command meaning !!! could anybody give me some links where i can learn more about jcop and gpshell, about why it used, about it associated commands and their meaning..

      Edited by: rohit pathak on May 8, 2012 9:13 PM
        • 1. Re: jcop tool (jcshell ) vs gpshell *mutual_authentication() returns 0x80302000
          safarmer
          D:\amit pathak\all in one (java)\GPShell-1.4.4\GPShell-1.4.4>GPShell.exe list.tx
          t
          mode_201
          enable_trace
          establish_context
          card_connect
          select -AID a0000000030000
          Command --> 00A4040007A0000000030000
          Wrapped command --> 00A4040007A0000000030000
          Response <-- 6F198408A000000003000000A50D9F6E064051420422009F6501FF9000
          open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
          f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
          Command --> 805000000894918FD9BC6C5F8700
          Wrapped command --> 805000000894918FD9BC6C5F8700
          Response <-- 00004330001341906809FF02005D6C4BE624901F1DB57E450CE1976E9000
          *mutual_authentication() returns 0x80302000 (The verification of the card cryptog*
          ram failed.)
          why it is happening ?
          You may have the wrong GP version (mode_201 sets the operation to OpenPlatform 2.0.1). You could try mode_211.
          i am able to use the commands of jcop and gpshell , but i dont know about command meaning !!! could anybody give me some links where i can learn more about jcop and gpshell, about why it used, about it associated commands and their meaning..
          The GP card spec describes all of the card management commands. You may also need to read some of the JCVM spec for Java Card to understand the format of the load command as well.



          Shane