Question about the performence of Java Card

Could anyone here tell me how slow running algorithms, like rc4�Ades3 or rsa, on an 8k EEPROM JavaCard?
thanx in advance
rong

Hi:
The performance of javacard is no direct relation with chips. At present most chips is still 8 bit processor. 16 bit processor has more higher price. The reason of running algorithm slow is same as the java applet running on PC platform. Any java and javacard applet must be interpreted by java VM or javacard VM. This way is different from common application windows-based running. This kind application is machine code which can be understanded by hardware directly. But bytecode of java applet is not. It must be translated into machine code by VM. So running speed must slow down. As I konw, some mainstream chip maker is developing javachip. It can run java applet several times faster than software implementation.
Chen Song
Beijing

Similar Messages

  • A question about share interface in java card

    I meet a big problem in java card recently.
    I try to develop a loyalty and a purse in the JCOP 20 . I use the share interface to share data between two applets.At first I write two small applets to test the share interface.Then I manully dowon the two applets into the card but it doesn't work. The error always happen to the "getAppletShareableInterfaceObject" method.
    Following is part of the code.
    buffer[0]=(byte)0x06; buffer[1]=(byte)0x05; buffer[2]=(byte)0x04; buffer[3]=(byte)0x03; buffer[4]=(byte)0x02; buffer[5]=(byte)0x01; buffer[6]=(byte)0x01;
    //server applet ID
    AID loyaltyAID2 = JCSystem.lookupAID(buffer, (short) 0,(byte)7);
    if(loyaltyAID2==null) ISOException.throwIt((short)0x0902);
    loyaltySIO = (JavaLoyaltyInterface) JCSystem.getAppletShareableInterfaceObject(loyaltyAID2,(byte)0);
    //...........................................error happen in this line
    I try to find the error I find the error, so I trace to the server applet,I add a "ISOException.throwIt " method in the getShareableInterfaceObject in the server applet.
    I find if I add it,the "getAppletShareableInterfaceObject" will return but get the null object.
    It's correct.But when I remark the "ISOException.throwIt" and just return "this" ,the card will get "6F00".
    Following is my code.
    public Shareable getShareableInterfaceObject(AID clientAID,byte parameter)
    //ISOException.throwIt((short)0x9999);
    return this; } error happen in this line
    TKS...

    Yes I did do it,I modify the sample code of the SUN micro's loality and purse .Following is my source code.
    Client code(purseeasy).......
    //=========================
    package purseeasy;
    import com.sun.javacard.samples.JavaLoyalty.JavaLoyaltyInterface;
    import javacard.framework.*;
    public class purseeasy extends javacard.framework.Applet
    private byte[] echoBytes;
    private static final short LENGTH_ECHO_BYTES = 256;
         public purseeasy()
         echoBytes = new byte[LENGTH_ECHO_BYTES];
    register();
    public static void install(byte[] bArray, short bOffset, byte bLength)
    new purseeasy();
    public void process(APDU apdu)
    byte buffer[] = apdu.getBuffer();
    short bytesRead = apdu.setIncomingAndReceive();
    short echoOffset = (short)0;
    switch(buffer[2])
    case 0x31:
    AID loyaltyAID1 =JCSystem.getAID();
    short i=loyaltyAID1.getBytes(buffer,(short)0);
    if(loyaltyAID1==null)
              ISOException.throwIt((short)0x0901);
    buffer[0]=(byte)0xd1;buffer[1]=(byte)0x58;
         buffer[2]=(byte)0x00;buffer[3]=(byte)0x00;
         buffer[4]=(byte)0x01;buffer[5]=(byte)0x00;
         buffer[6]=(byte)0x00;buffer[7]=(byte)0x00;
         buffer[8]=(byte)0x00;buffer[9]=(byte)0x00;
         buffer[10]=(byte)0x00;buffer[11]=(byte)0x00;
         buffer[12]=(byte)0x00;buffer[13]=(byte)0x00;
         buffer[14]=(byte)0x31;buffer[15]=(byte)0x00;
         AID loyaltyAID2 = JCSystem.lookupAID(buffer,
    (short)0,(byte)16);
    if(loyaltyAID2==null)
         ISOException.throwIt((short)0x0902);
         JavaLoyaltyInterface loyaltySIO =
    (JavaLoyaltyInterface)
         JCSystem.getAppletShareableInterfaceObject(loyaltyAID2,(byte)1);
    if(loyaltySIO ==null)
         ISOException.throwIt((short)0x0903);
    loyaltySIO.grantPoints (buffer);
    break;
    apdu.setOutgoingAndSend((short)0, (short)18);
    //=====================================
    //Server program....share interface
    package com.sun.javacard.samples.JavaLoyalty;
    import javacard.framework.Shareable;
    public interface JavaLoyaltyInterface extends Shareable
    public abstract void grantPoints (byte[] buffer);
    //=============================================
    //Server program....loyalty
    package com.sun.javacard.samples.JavaLoyalty;
    import javacard.framework.*;
    public class JavaLoyalty extends javacard.framework.Applet     implements JavaLoyaltyInterface
    public static void install(byte[] bArray, short bOffset,
    byte bLength)
    {new JavaLoyalty(bArray, bOffset, bLength);
    public JavaLoyalty(byte[] bArray, short bOffset, byte
    bLength)
    register();
    public Shareable getShareableInterfaceObject(AID
    clientAID,byte parameter)
    return (this);
    public void process(APDU apdu)
    byte buffer[] = apdu.getBuffer();
    short bytesRead = apdu.setIncomingAndReceive();
    apdu.setOutgoingAndSend((short)0, (short)18);
    public void grantPoints (byte[] buffer)
         buffer[0]=0x08;
         buffer[1]=0x08;
         buffer[2]=0x08;
         buffer[3]=0x08;
         buffer[4]=0x08;
         buffer[5]=0x08;
         buffer[6]=0x08;
         buffer[7]=0x08;
    Could you tell me what wrong with my code???
    Thanks....

  • Equium M40x-189: Question about the HDD and graphic card upgrade

    Hi folks just a few quick questions.
    1. can a second hard drive be fitted to the afore mentioned notebook?.....it came with a 60gb HDD
    2.can a graphics card such as an ati or geforce mobile/go be fitted instead of the onboard graphics?
    any answers would be greatly appreciated.

    Hello,
    As was said before, there is no way to install a 2nd harddrive physically on the machine without it being external. And this model does not have a seperate video card, it is integrated on the motherboard. Which means it would not be possible to upgrade it. Unfortunate as it is, best you can do is increase shared memory in bios and under your virtual memory settings. The Qosmio series from Toshiba does include a 2nd hard drive bay for 2 hdd's though, as well as some have seperate video cards so you can even possibly upgrade those as well. But not the Equium M40x. Have a great day.

  • Questions about the AMD 6450 Video card

    I just got an HP 8200 elite and love it so far.    It came with this card....
    Windows 7 pro
    Radeon 6450 512MB Video card.
    My questions are these:
    1.  I have read it can support dual monitors.   I know I can use a vga Y adapter but can I use vga and dv-1 at the same time?
    2. Is there a manuel somewhere for this I cant find?  I would think some vid cards that state dual monitor support would be able to split screens?????
    3.  Whats better to go to my TV to use as a monitor, VGA or dv-1?????
    Looking forward to these mysteries solved!!!!
    Thanks

    Yes, it should work fine.

  • Question about the GC in Java

    Given
    Given:
    3. class Beta { }
    4. class Alpha {
    5. static Beta b1;
    6. Beta b2;
    7. }
    8. public class Tester {
    9. public static void main(String[] args) {
    10. Beta b1 = new Beta(); Beta b2 = new Beta();
    11. Alpha a1 = new Alpha(); Alpha a2 = new Alpha();
    12. a1.b1 = b1;
    13. a1.b2 = b1;
    14. a2.b2 = b2;
    15. a1 = null; b1 = null; b2 = null;
    16. // do stuff
    17. }
    18. }Why there is only 1 object will be eligible for GC. I need a clear explanation pls

    newbie wrote:
    jverd wrote:
    newbie wrote:
    Pinto wrote:
    Since this looks like a homework assignment, how about you post what you think the answer is. Rather than just spoonfeeding you the answer which you will just hand in as your own work.It is not a homework assignment. It is practice test from SCJP. Nevertheless, since you're trying to learn, you'll learn better if you think it through as much as possible yourself, post what you think and why and solicit feedback on that, rather than just asking for the answer.
    How many objects do you think are eligible, and why?Thanks for your cheer.First of all I rename the instance variable of object Alpha. now i have
    Given:
    3. class Beta { }
    4. class Alpha {
    5. static Beta x;
    6. Beta y;
    7. }
    8. public class Tester {
    9. public static void main(String[] args) {
    10. Beta b1 = new Beta(); Beta b2 = new Beta();
    11. Alpha a1 = new Alpha(); Alpha a2 = new Alpha();
    12. a1.x = b1;
    13. a1.y = b1;
    14. a2.y= b2;
    15. a1 = null; b1 = null; b2 = null;
    16. // do stuff
    17. }
    18. I have a stack containing a1, a2, b1, b2 and heap is containing 2 objects of type Alpha, 2 objects of type Beta, x, y *(AM I RITE AT HERE)*Yes. Note that x and y are part of the two Alpha objects.
    At line 12 and 13, the instance variable y and class variable x of class Alpha point to an object of class Beta b1.Close. The instance variable y of one of the Alpha objects (not of the Alpha class) and the class variable x of class Alpha point to a Beta object--the same Beta that's pointed to by b1.
    At line 14,*instance variable y* points to an object of class Beta b2.Instance variable y of the other Alpha object points to the second Beta object--the same one that's pointed to by b2.
    Note that there are two y variables (one for each Alpha object) and one x variable (one for the Alpha class overall). That's the difference between an instance (non-static member) variable and a class (static member) variable.
    Finally, at line 15, a1, b1, b2 are set to null. Yup.
    Therefore, i think there are 2 objects which are eligible for GC ( 1 object of type Alpha and 1 object of type Beta)Well, let's see.
    a1 is null, so nothing is pointing to the first Alpha, so it's GC-able. Additionally, that first Alpha's y is no longer pointing to the first Beta, so you might think that makes that Beta unreachable. However, the class variable x (which is not specific to any Alpha instance) is still pointing to the first Beta. So far, one GC-able object.
    b1 is null, so it no longer points to the first Beta, but Alpha.x still points to the first Beta. Still one GC-able object.
    b2 is null, so it no longer points to the second Beta, but the second Alpha's y still does, so the second Beta is still reachable. Still one GC-able object.
    Remember, there are two y variables--one for each Alpha instance--and one x variable--one for the Alpha class as a whole.
    Part of what makes this example confusing is they followed a syntactically legal but bad practice approach of using a reference variable to refer to a static class member, rather than the class name.
    a1.x // legal, but confusing
    Alpha.x // preferred
    a1.y // the only legal way
    Alpha.y // error, won't compile -- how would the compiler know WHICH Alpha instance's y variable we mean?

  • HT4972 Good afternoon! I addressed in the AT&T company with a question about untying of a sim card of AT&T from my iPhone, all of them made Iphone now is unlocked, I executed all points which were written: To complete the unlock, simply  1 . Open iTunes o

    Good afternoon! I addressed in the AT&T company with a question about untying of a sim card of AT&T from my iPhone, all of them made Iphone now is unlocked, I executed all points which were written:
    To complete the unlock, simply
    1 . Open iTunes on your Mac or PC and verify that you have Internet connectivity.
    2 . Ensure a SIM card is inserted into your iPhone.
    3 . Connect your iPhone using the dock connector to USB cable that came with your iPhone.
    4 . Backup and restore your iPhone using iTunes. For information on backup and restore, please visit http://support.apple.com/kb/HT1414.
    5 . After restoring, your iPhone will be unlocked.
    Additional information on unlocking can be found at http://support.apple.com/kb/TS3198
    I made everything as well as was written, but on completion of the ios 6.1.3 installation the iPhone asks to be activated through wifi or through a wire to the computer.
    I connected Iphone to the computer and the text takes off: (Were sorry, we are unable to continue with your activation at this time. Please TR again later, or contact customer care! )
    how to me to activate my iPhone?
    I hope for your help....

    Hey APPLELovestory,
    We have an article that goes over troubleshooting iPhone activation issues here:
    iPhone: Troubleshooting activation issues
    http://support.apple.com/kb/TS3424
    Perform the following steps:
    Restart the iPhone.
    Try another means of reaching the activation server and attempt to activate.
    Try connecting to Wi-Fi if you're unable to activate using a cellular data connection.
    Try connecting to iTunes if you're unable to activate using Wi-Fi.
    Restore the iPhone.
    If you receive an alert message when you attempt to activate your iPhone, try to place the iPhone in recovery mode and perform a restore. If you're still unable to complete the setup assistant due to an activation error, contact Apple for assistance.
    Hope that helps,
    David

  • A question about the execution order of java code

    I have a question about the order of the execution of java code.
    class myclass
    String str1 = new String("str1");
    static String str2 = new String("str2");
    static
    String str3 = new String("str3");
    myclass( )
    String str4 = new String("str4");
    static myfuntion()
    String str5 = new String("str5");
    When I new a myclass object, what is the order of execution about str1,str2.str3 ,str4?
    When I run myclass::myfunction( ) instead of new a myclass object what is the execution order about str1, str2, str3, str4, str5?
    Thanks

    hello,
    I think there may be one thing can't use println to make sure.
    class myclass
    static {  System.out.println("str1");   };
    myclass() { System.out.println("str2"); }
    then str1 appear before str2
    class myclass
    static {  String str1 = new String("str1"); };
    myclass() { String str2 = new String("str2"); }
    then
    str1 initilized before str2,
    str1 get the value str1----->after<----- str2.
    Am I right or wrong?

  • I want to question about the official service at the service center of Sony.

    I want to question about the official service at the service center of Sony.
    long since I like the models and items sony. from start playstation, cameras, camcorders up, I've ever had. and a new camera that I bought two years ie compact cameras Sony Cybershot DSC H200. as of a month ago, a camera was having problems in lenses that would not close. and setting the automatic mode to move by itself. I came to the Sony Service Center in Makassar, precisely on Jl. Shop Pengayomann A5 / 05 (0411) 442340.
    operator initially said only two weeks to work on my camera. but this week has been more dau even want to go in a month tomorrow, dated July 9, no news from the service center. and I kept the call to the office service. as well as assorted reasons. there are no spare parts or technical constraints, and the last one I call to his office, he said the factory spare part is damaged. imported directly from Singapore. I think, ko new spare part it can be damaged before using that? how the quality of this Sony spare part? ugly? not good? why?
    I was disappointed with this situation, where soon it will Eid, want to return home as well to Java. but the camera has not been settled workmanship?
    nah, roughly what is the solution of the Sony plagued with this problem? please help, because he did not know to whom to complain. operator had just said: it's up to the father alone.
    once again I asked for his help. solution. if you can before Eid arrived.
    Thank you,
    AD. Rusmianto

    Hi awwee107, 
    Welcome to the Sony Community! 
    We have forwarded your query to the relevant team for their further assistance and someone from local CC will contact you.
    Thanks!
     

  • Question about the new Yoga 10 HD+

    Hi
    A few questions about the new Yoga 10 HD+ which I hope you can answer.
    I bought the old model last year. Loved the design and long battery time but a few major issues made me return it.
    Somewhere I read that it can't read NTFS over USB so I presume that's the same with an NTFS formatted microSD card?
    Can it read exFAT formatted microSD cards?
    Anyone observed issues regarding audio over bluetooth?
    (I know BT isn't exactly High End HiFi but the old Yoga 10 for some odd reason - most likely a driver issue which nobody cared to fix - sounded *much* worse with quite noticeably distortion while both my phone and a cheap noname tablet I have zero fidelity issues - no matter which of my bluetooth audio devices I tried aptX or not)
    So to avoid buying this only to return it too I really would like to see if I can have my questions answered before buying it.
    While I love the form factor and long running time the above issues are just two mayor dealbreakers to me. Bad audio quality = no joy listening to spotify, local MP3s etc. No NTFS or exFAT = no large movies.
    My old noname android tablet really could use an upgrade so I'm really curious whether this can be it or I should look at the competition and sacrify form factor and battery runtime.
    Thanks in advance.
    EDIT:
    If it's not supporting either NTFS or exFAT on the microSD have anyone tried ext3 and/or ext4?
    I mean with Androids Linux roots it should be a nobrainer to support at least when it comes to royalties unlike NTFS or exFAT where there *might* be some issues with Microsoft.
    Solved!
    Go to Solution.

    Thanks!
    OK. Seems I should just stay clear of this and look elsewhere
    Sony for sure I know support exFAT. I'm usure about Samsung. Odd it seems so hard to find out. File sizes of +4 GB should be taken for granted - it's not 199x anymore...
    Oh well. Wonder whether to just go for one from the competition or perhaps just save the money and wait until 64 bit catches on. Rumors is that the next Nexus 8 will be 64 bit... (I really don't expect an answer on this)

  • Questions about the T410s

    Hey guys,
    I'm considering buying the T410s because my last laptop was a Dell XPS and the GPU burned down after two years. I am a college student and I use my laptops quite extensively for homework, flash games, TV and movies. And I have a couple of questions about the T410s.
    1. Due to my previous experience with my Dell XPS, I am looking for a more reliable laptop. So would I have to worry about the T410s heating up/burning down or breaking in like two years? 
    2. I am not much of a gamer, but enjoy videos sometimes. Will the Intel graphics card be able to run 'not so intense' games like Starcraft 2?
    3. Also, would the 4gig of RAM be sufficient to run the Windows 7 64bit smoothly or I should choose the 32bit instead? 
    Thanks!!
    Solved!
    Go to Solution.

    1) your Dell XPS used the Nvidia GPU? That won't happen in the new T410s.
    2) the Intel 5700 MHD GPU can handle 1080p easily, but games like Starcraft 2 may only played on low to med settings.
    the Nvidia GPU Optimus GPU option would allow 4 LCD support through the dock, if you ever want to connect that many LCD in the future.
    3) 4 gigs is fine for 64 bit OS.
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Questions about the ipod camera connector...

    Hi,
    i got some questions about the ipod camera connector.
    1)Is the camera connector compatible with the Sony camera DSC-P93A ?
    In fact, this camera got PTP protocol.
    PTP (Picture Transfer Protocol) Oui
    Marque PIM (Print Image Matching) Oui
    PictBridge™ Oui
    So, do the camera need to have the three following protocols to be compatible with the camera connector ?
    =>Mass Storage, PTP, and Type 4
    Or maybe does it need only one of it??
    2) Is it compatible with a USB memory card reader?
    Thank you

    Wel, if i've right understood what you said, my camera is compatible because it got PTP protocol ?
    That's weird, cause i wrote a mail to sony to ask them about the compatibility of my camera, but they answered that it wasn't. But of course, i'll prefer to believe you than them !

  • A few Questions about the iTunes Store

    Hi, I have a couple questions about the store. First of all, can I use an iTUnes card to buy games for my iPod? Second, if I buy games/songs using my account, can I upload those games/songs onto multiple iPods? I ask this because me and my sister own iPods, and we don't want to waste money buying the same game twice.
    Thanks in advance.

    First of all, can I use an iTUnes card to buy games for my iPod
    Yes.
    Second, if I buy games/songs using my account, can I upload those games/songs onto multiple iPods?
    Yes; the iPods need to be set to sync with that account or manually.
    (35218)

  • A question about the getProperty method defined in the Security class

    Hello Everyone!
    I would like to ask a question about the getProperty method defined in the
    Security class.
    public static String getProperty(String key) Do you know how can I exract the list of all possible keys?.
    Thanks in advance,

    I found the answer, in fact the keys are defined in the java.security file.

  • A question about the option Reset All Settings

    Hello, I have a question about the reset all settings function in the IPad. I need to keep all of the installed applications on the device yet I need to remove any log in information and contacts. Is this the correct option or would the Erase All Content and Settings be what I want?

    If you read the OP's request, they "need to keep all of the installed applications on the device".  Selecting "Erase All Content and Settings" will do just that, erase everything.
    Faroff, you can remove accounts in Settings/ Mail, Contacts, Calendar ... that would remove contacts only if the contacts were synced to such an account.  If contacts were synced from iTunes, you'd have to un-sync them from iTunes by changing the sync settings.  If the contacts were just manually entered and not synced with anything, you have to delete them one by one.  However, iOS will remember past usage of a contact, so even if you remove them they may be recalled by you initiating an email or iMessage to something close to what used to be in the Contacts app.  The only way to clear that I think is to do a full erase of the iPad.
    As for log-in information, go to Settings/ Safari/ Passwords & Autofill, where you can erase passwords and saved credit card info.  You can also clear cookies and data in this menu.
    You might be better off doing a full erase of the iPad.  Why do you not want to remove the apps?  You can re-sync them from iTunes or re-download them if necessary.  Or did you inherit this device from someone else and you're wanting to keep their apps installed but remove their private information?

  • Re: Question about the Satellite P300-18Z

    Hello everyone,
    I have a couple of questions about the Satellite P300-18Z.
    What "video out" does this laptop have? (DVI, s-video or d-sub)
    Can I link the laptop up to a LCD-TV and watch movies on a resolution of 1080p? (full-HD)
    What is the warranty on this laptop?

    Hello
    According the notebook specification Satellite P300-18Z has follow interfaces:
    DVI - No DVI port available
    HDMI - HDMI-out (HDMI out port available)
    Headphone Jack - External Headphone Jack (Stereo) available
    .link - iLink (Firewire) port available
    Line in Jack - No Line in Jack port available
    Line out Jack - No Line Out Jack available
    Microphone Jack - External Micrphone Jack
    TV-out - port available (S-Video port)
    VGA - VGA (External monitor port RGB port)
    Also you can connect it to your LCD TV using HDMI cable.
    Warranty is country specific and clarifies this with your local dealer but I know that all Toshiba products have 1 year standard warranty and also 1 year international warranty. you can of course expand it.

Maybe you are looking for

  • How do I restore a deleted video on iPhone?

    I deleted it accidentally by hitting the trashcan icon within the Photos app. I really want this vido back. Thanks.

  • Jdev 11g application is running very slow.

    Hi, I have deployed the application on Solaris OS, Weblogic 10.3.2 and JDev 11g. Application is running very slow, means each page is taking time to launch. Server setup is as follows: 8 cpu's 6gb of memory 8gb swap 15gb /apps 20gb /logs Please let m

  • Why is my "Documents and Data" section taking up so much space on my iPhone?

    Before I updated my iPhone to iOS7, my "Other" section was giant, taking up over 4 GB! After I updated, the section split into "Other" and "Documents and Data". My "Other" section is under control now, but my "Documents and Data" section has over 3 G

  • RSA1 cube role

    I need to give a user a new role so that they can just view the contents of a specific cube within RSA1.  Say the cube is called ztest what entries do I need to enter in the following within PFCG so they can just see this cube Cross-application Autho

  • Render a portion of an image

    So I have this image of a weather map on my site. It is updated by a service every 5 minutes. I want to render it out in a small box and only show a portion of it. This will be clickable to take people to see the full size of the image. I can obvious