6985  and 6881 for any subsequent APDU. Where is the source of the problem?

Hi.
I'm trying to load applet to Athena Card (Java Card compliant) with JCOP Tools. Although the load process finishes successfully, subsequent install [for install and for make selectable] APDU is responded with 6985 error code - �Condition of use not satisfied� (according to Global Platform specification 2.2.1). After that any APDU sent to the card is responded with 6881 error code - �Logical channel not supported� (according to ISO/IEC 7816-4 document).
I'm sure that these errors are not sent from our applet. First of all I double checked the install routine of the applet and it does not send such error. Second, I don't use any logical channel, only the main one.
What may be the source of this behavior?
Thank you in advance,
Best regards, neutrino.

I have JCOP41 v 2.3.1 and it has RetailMAC.
I'm implementing now this algorithm and it's too complicated. Could you give me suggestions on how to implement it?
I have already wrote these lines (not completed yet, but I'm sure you will understand what I'm trying to do). Please forgive me for ugly code. I'm a C# developer and I do not have enough Java experience in my background.
    // Here goes section of Retail MAC signing/verification
    // Coded by Gregory Stein.
    private static final byte BAC_MAC_VERIFY = 1;
    private static final byte BAC_MAC_SIGN = 2;
    private static final byte BAC_KS_MAC_VERIFY = 3;
    private static final byte BAC_KS_MAC_SIGN = 4;
    private byte[][] lastMAC = new byte[2][8];
    private byte[] mac = new byte[8];
     * @author Gregory Stein
     * Generates the signature of all/last input data
     * using Retail MAC algorithm as defined in Global
     * Platform specification Appendix B.1.2.2 and as described in
     * ISO 9797-1: MAC Algorithm 3 with output
     * transformation 3, without truncation, and with DES taking
     * the place of the block cipher.
      * @param input input buffer containing data to be sign
      * @param inputOffset the offset into the input buffer at which to begin signature generation
      * @param inputLength the byte length to sign
      * @param signatureBuffer the output buffer to store signature data
      * @param signatureOffset the offset into sigBuff at which to begin signature data
      * @return number of bytes of signature output in sigBuff
     private short sign(byte[] input, short inputOffset, short inputLength,
               byte[] signatureBuffer, short signatureOffset, byte instance)
          short signBytes = 0;
          Cipher cipherDES = Cipher.getInstance(Cipher.ALG_DES_CBC_ISO9797_M2, false);
          DESKey keyDES;
          byte[] iv;
          if (instance > 2) {
               iv = lastMAC[1];
               keyDES = bacKSmacKey3;
          } else {
               iv = lastMAC[0];
               keyDES = bacKmacKey3;
          cipherDES.init(keyDES, Cipher.MODE_ENCRYPT, iv, (short)0, (short)8);
          cipherDES.doFinal(input, inputOffset, inputLength, mac, (short)0);
          cipherDES = Cipher.getInstance(Cipher.ALG_DES_ECB_NOPAD, false);
          cipherDES.init(keyDES, Cipher.MODE_DECRYPT, mac, (short)0, (short)8);
          cipherDES.doFinal(inBuff, inOffset, inLength, outBuff, outOffset)
          // Here I'm writing now
          switch(instance)  {
               case BAC_MAC_VERIFY:
               case BAC_MAC_SIGN:
               case BAC_KS_MAC_VERIFY:
               case BAC_KS_MAC_SIGN:
          return signBytes;
     // End of signing/verification sectionPlease advise me, how can I reduce this code? Or improve it in some way?
Thank you in advance.
Best regards, neutrino.

Similar Messages

  • I am trying to connect Garritan Personal Symphony to Logic Express and Garageband. A dialog box pops up and asks for plugin Garritan-P. Where do I find it and what do I do with it. I can't locate this plugin doing searches on any of the porgrams.

    I am trying to connect Garritan Personal Symphony to Logic Express and Garageband. A dialog box pops up and asks for plugin Garritan-P. Where do I find it and what do I do with it. I can't locate this plugin doing searches on any of the porgrams.

    I'm not sure which version of Garritan Personal Orchestra you have or when you are getting a window pop-up, but check this link for starters:
    http://afjohnston.blogspot.com/2009/11/using-garritan-personal-orchestra-gpo.htm l

  • IPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

  • Is it possible to have English as the interface language, but use (and develope for) any other language/locale?

    Before installing Firefox, I need to clarify the following:
    The use of locales: I am a developer and my preferable language, for the interface, is English (though, it is not my mother tongue). But, I would like to be able to use any other language (including, the use of any dictionary) and develop for any language or locale. So, does the English version let me do the above mentioned?
    Or, eg, do I need to install the Hebrew locale, if I want to use the Hebrew dictionary?
    Or, is it possible to install different locales on the same computer (and for the same user, in Win XP)?

    You can install any dictionary is every locale, so that shouldn't be a problem if you use the English locale.
    If you want to check out the user interface or how the browser acts with an RTL locale like Hebrew then you need to install the language pack and switch to that locale.
    You can install additional language packs in any Firefox version.
    * http://kb.mozillazine.org/Language_packs
    * Locale Switcher: https://addons.mozilla.org/firefox/addon/locale-switcher/
    * http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/win32/xpi/

  • I have lost my iPad and would like to block it from being reregistered. It is a wifi only and does not have a sim card. I did not sign up for any tracking software either. Can apple block the serial number?

    I have lost my iPad and would like to block it from being reregistered. It is a wifi only and does not have a sim card. I did not sign up for any tracking software either. Can apple block the serial number?

    No.
    Apple can do nothing.
    You cannot block it from being "registered".
    If you did not set up find my ipad before it was lost, then there is nothing you can do but change your passwords.

  • Lightroom mobile syncing is super slow and stop for no reason. cannot resume syncing. no idea with the progress of syncing. cannot sync the original file from mobile into desktop.

    lightroom mobile syncing is super slow and stop for no reason. cannot resume syncing. no idea with the progress of syncing. cannot sync the original file from mobile into desktop. stuck and cannot process any further.

    Hi. Did you trigger a delete data via LR preferences ->Lightroom mobile.
    I'm not seeing a catalog connected to your account.
    Did you import originals via the connection-kit?
    Thanks
    Guido

  • New iphone. someone else put in their username and password. time for me to update the iphone. downloaded itunes onto pc. plugged in iphone and waiting for prompt to show phone. pc thinks it is the camera. how do i get itunes/pc to recognize iphone ?

    new iphone. (someone else put in their username and password. so i had lots of apps that i had to eliminate but do NOT wish to compromise the contact list) time for me to update the iphone. downloaded itunes onto pc. plugged in iphone and waiting for prompt to show phone. pc thinks it is the camera. how do i get itunes/pc to recognize iphone ? then, how do i backup contacts and proceed before updating iphone?

    This forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes or iPhone forums.
    Regards.

  • How can I have one thing open in Safari on my MacBook Pro and search for another thing in Safari without closing out of the other? For instance, How can I leave Pandora playing while I search Facebook?

    How can I have one thing open in Safari on my MacBook Pro and search for another thing in Safari without closing out of the other? For instance, How can I leave Pandora playing while I search Facebook?

    With Safari open use the Command + T keyboard shortcut to open a new tab.
    Or, Command + N to open a new window.

  • HT5429 I have recently returned from a holiday in New Zealand and transited for 6 hours in China. Since returning to the UK my maps app on Iphone 5 will not show my surroundings in hybrid or satellite. How can i get this back?

    I have recently returned from a holiday in New Zealand and transited for 6 hours in China. Since returning to the UK my maps app on Iphone 5 will not show my surroundings in hybrid or satellite. I have also noticed that the data from section that usually displays data from TOM TOM and others now just says others. Has anyone encountered this before or know how to get the Satellite function on maps back?

    Your phone is "stuck" in the Chinese version of maps. This also happened to me once I got back from China recently. I believe I solved the problem by logging out of iCloud and reloging in.
    BTW the App Store app was also stuck in China. It only displayed Chinese characters and I had to log out and relogin.
    Hope this helps.

  • MY IPHONE WAS WORKING NORMALLY SUDDENDLY IT TURNED OF AND DOESNT WORK ANY MORE!WHEN I PLUGED IT TO THE CHARGER GIVES THAT ITS IN THE RECOVERY MODE WHEN I REMOVE THE CHARGER IT TURNED OFF DIRECTLY SO WHAT I SHOULD DO PLZ HELP !

    MY IPHONE WAS WORKING NORMALLY SUDDENDLY IT TURNED OF AND DOESNT WORK ANY MORE!WHEN I PLUGED IT TO THE CHARGER GIVES THAT ITS IN THE RECOVERY MODE WHEN I REMOVE THE CHARGER IT TURNED OFF DIRECTLY SO WHAT I SHOULD DO PLZ HELP !

    Please turn off your caps lock.
    All caps indicates shouting, is considered rude and is difficult to read.  Many simply will not read such posts.
    Enter & Exit iPhone Recovery Mode

  • I've had creative cloud installed and subscribed for more than a year. Recently I started getting problems and couldn't launch PS. This evening while trying to fix the problem I've managed to do something and now I can't launch either LR or PS. I get an e

    I've had creative cloud installed and subscribed for more than a year. Recently I started getting problems and couldn't launch PS. This evening while trying to fix the problem I've managed to do something and now I can't launch either LR or PS. I get an error message about verifying my subscription when I click and get my subscription verified it ays "OK" and I clock to to application and then it jumps back to verification needed - and so it goes on and on and on and..

    Here are two other examples of this happening..
    I expected more from Apple.
    https://discussions.apple.com/thread/6919109
    https://discussions.apple.com/thread/6683814

  • A friend gave me an older Nano 3rd generation. Can anyone tell me how to delete what is on there and how to get rid of his name. It does not connect to my itunes. I cannot even find the source or the place to restore it as suggested in the owners manual.

    I have a 3rd generation ipod that a friend gave me. I cannot find anything on how to get rid of his name and music on it. This is what the owners manual says:
    "Select ipod nano in the soiurce list and click the summary tab" I cannot find the source or the summary tab on itunes. Can any one help me? I would like to delete everything on it and start over but I am afraid I cannot add anything back on it. I know this is detailed and a lot, but I really need help.

    Restore
    Note: Because Restore erases all of the songs and files on iPod, make sure toback up any files you've saved on the iPod disk. All of your songs, videos, podcasts, audiobooks, and games can be loaded back to your iPod provided that you have them stored in your iTunes Library.
    How to restore your iPod:For Windows:
    1. Make sure you've reinstalled the latest version of iTunes.
    2. Open iTunes, and then connect your iPod to your computer.
    3. After a few moments, it will appear in the source list in iTunes. If the iPod's display doesn't show "Connected" or "Do not disconnect" you may need to put the iPod into disk mode to proceed.
    4. Select your iPod in the source list and you will see information about it appear in the Summary tab of the main iTunes windows.
    5. Click the Restore button. You will be prompted with one or more restore options that may prompt iTunes to automatically download of the latest iPod Software. The 4 possible restore options are:
    Restore Option 1: Restore - Restores with same iPod Software version already on iPod.
    Restore Option 2: Use Same Version - Restores with same iPod Software version already on iPod even though a newer version is available.
    Restore Option 3: Use Newest Version - Restores with the latest iPod Software on your computer.
    Restore Option 4: Restore and Update - Restores with the latest iPod Software on your computer.
    6. A progress bar will appear on the computer screen indicating that the first stage of the restore process has started. When this stage is completed, iTunes will instruct you to leave iPod connected to your computer to complete restore.
    7. During the stage 2 of the restore process, the iPod will show an Apple logo as well as a progress bar at the bottom of the display. It is critical that the iPod remains connected to the computer or iPod Power adapter during this stage. Note: The progress bar may be difficult to see since the backlight on the iPod display may be off.
    8. After stage 2 of the restore process is complete and the iPod is connected to the computer, the iTunes Setup Assistant window will appear asking you to name your iPod and choose your syncing preferences similar to when you connected your iPod for the first time.
    For Mac:
    1. Make sure you've reinstalled the latest version of iTunes.
    2. Open iTunes, and then connect your iPod to your computer.
    3. After a few moments, it will appear in the source list in iTunes. If the iPod's display doesn't show "Connected" or "Do not disconnect" you may need to put the iPod into disk mode to proceed.
    4. Select your iPod in the source list and you will see information about it appear in the Summary tab of the main iTunes windows.
    5. Click the Restore button. You will be prompted with one or more restore options that may prompt iTunes to automatically download of the latest iPod Software. The 4 possible restore options are:
    Restore Option 1: Restore - Restores with same iPod Software version already on iPod.
    Restore Option 2: Use Same Version - Restores with same iPod Software version already on iPod, even though a newer version is available.
    Restore Option 3: Use Newest Version - Restores with latest iPod Software version on your computer.
    Restore Option 4: Restore and Update - Restores with latest iPod Software version on your computer.
    6. A message will appear prompting you to enter an administrator's name and password.
    7. A progress bar will appear on the computer screen indicating that the first stage of the restore process has started. When this stage is completed, iTunes will instruct you to leave iPod connected to your computer to complete restore.
    8. During the stage 2 of the restore process, the iPod will show an Apple logo as well as a progress bar at the bottom of the display. It is critical that the iPod remains connected to the computer or iPod Power adapter during this stage. Note: The progress bar may be difficult to see since the backlight on the iPod display may be off.
    9. After stage 2 of the restore process is complete and the iPod is connected to the computer, the iTunes Setup Assistant window will appear asking you to name your iPod and choose your syncing preferences similar to when you connected your iPod for the first time.
    Source:
    iPod nano (3rd generation) Troubleshooting Assistant
    Message was edited by: michael08081

  • My iPhone 4 has lost SIM connection several times over the past week when the phone is left on continually. I have had the SIM checked and it was not the source of the problem. I have found that I can reactivate the SIM by switching the phone off and on.

    My iPhone 4 has lost SIM connection several times over the past week when the phone is left on continually. I have had the SIM checked and it was not the source of the problem. I have found that I can reactivate the SIM by switching the phone off and on again. Has anyone else experienced this problem and if so, is there an easy fix. I have been advised by Apple that the latest IOS update may overcome this situation but I'm only on slow download speeds and 690 Mb would take forever. I would appreciate any advice.
    Best regards,
    Rob.

    PinguXeF wrote:
    , while I have taken a backup of the iTunes Library,
    this means nothing if it was not done correctly...
    To have  EVERYTHING on a New Computer...
    From your OLD computer...
    Copy your ENTIRE iTunes FOLDER to an External Drive... and then from the External Drive to your New Computer..
    Full Details Here  >  http://support.apple.com/kb/HT1751

  • How can I get a file to copy all of the files in a directory except itself and the source of the copy function will be the directory the final program is in?

    How can I get a file to copy all of the files in a directory except itself and the source of the copy function will be the directory the final program is in? This application must be in Lab View 8.

    you mean something like this (see below)?
    Now you may have to implement code to check if the destination folder exists and to create it, etc.  But if you use the Front Panel Control to select the destination folder, it should be okay.
    Not the best implementation, mind you but you'll get the idea..
    Message Edited by JoeLabView on 04-18-2007 03:43 PM
    Attachments:
    copy folder contents.PNG ‏10 KB

  • I need to know about 3g (max download and upload) for any compatible 3G products

    my customers have question to me about your products when used 3G
    such as  the maximum download ? , compatible 3G mobile internet connectivity which one?
    i need real information form you about any product which compatible 3G such as any model of iphone, ipad
    1. model
    2. 3g frequency compatible
    3. maximum download with used 3G (my customer speed test)
    mail to me : [email protected]
    regards,
    yossaprous srithanavut

    Read the technical specifications Apple posts for each model of iPhone and iPad they sell. That will provide you with all the information anyone here can provide about the devices themselves. Actual upload and download performance will depend on the specific cell carrier, the technology they use, the specific cell you happen to be connected to, and a number of other factors.

Maybe you are looking for