![]() ![]() Like the main method in a Java application class, the install method is static so that it can be invoked by the smart card JVM before an object exists (it's invoked directly from the class definition). The install method must instantiate a new object that represents the applet. The other three are install, select, and deselect. The method that handles this loop is named process and is one of four required smart card applet methods. The structure of a smart card applet then became clear: The applet sits in a virtual loop, like a network service waiting for packets to arrive on its network interface. Thus, errant applets are simply deleted by the developer once it's ascertained that they aren't responding correctly to the APDUs they receive. Further, there are predefined APDUs that tell the runtime to select an applet, delete applets, load applets, and so on. This understanding provided an answer to one of my first questions about the Java Ring: How come a broken applet doesn't make the ring unusable? The answer is that the smart card runtime code gets the first crack at decoding the APDUs as they arrive on the serial interface. These can be used by the smart card infrastructure to decide when to send the APDUs to the server on the smart card, and when to interpret them directly. However, like their big-brother packets in the TCP/IP world, APDUs do carry a few bytes that are common to all packets. ![]() Instead, they are implicitly addressed to the computer on the other end of the serial link. Unlike packets in the TCP/IP world, these APDU packets don't carry any sort of addressing information. The network protocol is encapsulated in packets that are called application program data units, or APDUs for short. The Java Card architecture has taken client/server architectures to a new place - one where the "server" is a small piece of software on an extremely small system, and the client is a potentially huge piece of software on a potentially much larger system. I then realized that what really connected the ring to the "outside" world was not a serial port but a network protocol. I was looking for linkages between the JVM on the ring and the JVM on a PC and finding nothing beyond descriptions of a rather peculiar serial interface that connected them. ![]() I've seen some wonderful technical discussions on how to program these devices (see the Resources section for pointers), but, to be perfectly honest, the descriptions were quite opaque to me. The Java Ring is in fact a Java smart card, and the ring's virtual machine is based on the Java virtual machine (JVM) that was proposed as the Java Card 2.0 standard. But first I had to figure out what the heck an APDU was! The Java Card applet model The ENIGMA was used by German commanders to encrypt all of their important plans and orders to the field marshalls. I pondered this question for a while, until I came up with what was, for me, the ideal solution: I would program my ring to simulate the most important piece of cryptographic equipment used in the second World War - the German ENIGMA machine. Of course this pursuit of knowledge did raise the question of what, exactly, I should program into my ring. And while I was waiting, what better to do but learn the ins and outs of programming my new piece of "smart" jewelry? I am resourceful though, and since Dallas Semiconductor had promised that a fully functional Java Ring was going to be available eventually, all I needed to do was wait. Dallas Semiconductor later confirmed that it couldn't be enabled at all, which really dampened my enthusiasm for the whole concept. ![]() It allegedly had a high-performance encryption engine, an exciting prospect indeed, until I discovered that the encryption unit wasn't accessible on the ring. For me, the highlight of the JavaOne Developer Conference in San Francisco last March was Dallas Semiconductor's iButton with Java - aka the Java Ring, a wearable computer that ran Java. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |