1. Field of the Invention
The present invention relates to smart card systems, and more particularly relates to communications between a smart card integrated circuit (hereinafter “chip” or “processor”) and a host computer.
2. Description of the Prior Art
Smart cards have been used for quite some time in various applications, and their interface is specified in the ISO (International Standards Organization) 7816 standard. ISO 7816 is the international standard for integrated circuit cards, commonly referred to as smart cards, that use electrical contacts. The ISO 7816 standard, including all of its parts, is incorporated herein by reference, and written documentation of the standard may be purchased through ANSI (American National Standards Institute) in New York City, N.Y. Part 4 of the ISO 7816 standard specifies how to establish a secure channel from a host computer to a secure channel capable smart card chip. However, not every smart card chip has the capability of secure communications. If the smart card cannot securely communicate with another device, certain sensitive data, for example, a personal identification number (PIN) is transmitted to the smart card chip “in the clear” (i.e., unprotected and unencrypted). This may pose a security risk in environments where the communication path, for example, a Universal Serial Bus (USB), is shared with other devices, some of which may be untrusted or rogue devices. Such clear text data, unprotected and unencrypted, may be captured and can be used later for illegal purposes.
It is also well known in the art how to establish secure communication channels. One such example is a Secure Socket Layer (SSL), which is a protocol developed by Netscape Communications Corporation, where one party, for example, a server, has a public/private key pair. The other party, for example, a client, receives the server's public key, usually in a certificate, selects a random session secret, encrypts it with the public key and sends this encrypted value to the server. The server decrypts the received value with its private key and recovers the secret. Now, both sides, that is, the client and the server, are in possession of a shared secret which is used to derive keys which are then used to encrypt and integrity-protect the communication between the client and the server.
Although smart cards have been used for quite some time, especially in Europe, the need for smart card readers and the lack of such smart card readers in computing environments are hindering the proliferation of smart card use. One solution to the smart card reader problem is to put the smart card chip into a USB token. An example of such a token is disclosed in U.S. patent application Ser. No. 09/594,456, filed on Jun. 15, 2000, and entitled “USB-Compliant Personal Key Using a Smart Card Processor And a Smart Card Reader Emulator,” the disclosure of which is incorporated herein by reference. Such a smart card chip/USB token is manufactured and sold by SafeNet, Inc., formerly Rainbow Technologies, Inc., of Belcamp, Md., as an IKEY (TM) 2032 USB authentication token. Another example of a smart card/USB token is disclosed in U.S. Pat. No. 6,763,399, which issued on Jul. 13, 2004 to Yanki Margalit et al., the disclosure of which is incorporated herein by reference.
It is an object of the present invention to provide a method of protecting sensitive data while the data is sent from a computer to a smart card chip.
It is another object of the present invention to provide apparatus for securing communications between a computer and a smart card chip.
It is a further object of the present invention to provide a method and apparatus for encrypting data communicated between a host computer and a smart card chip.
It is yet another object of the present invention to provide a method and apparatus for secure communications between a host computer and a token having a smart card processor.
In accordance with one form of the present invention, a method of providing secure communications between a host computer and a token having a smart card processor, where the token is communicatively coupled to the host computer via a USB-compliant interface, includes the steps of requesting token information when the token is coupled to the host computer, and initializing communications with the token, including establishing an encryption key between the token and the host computer. Even more preferably, the step of establishing an encryption key between the token and the host computer includes the steps of receiving a token public key from the token, encrypting a random key with the token public key and transmitting the encrypted random key to the token.
In accordance with another aspect of the present invention, apparatus for providing secure communications between a host computer and a token having a smart card processor, whereby the token is communicatively coupled to the host computer via a USB-compliant interface, includes means for requesting token information when the token is coupled to the host computer, and means for initializing communications with the token, including means for establishing an encryption key between the token and the host computer. The encryption key establishing means preferably includes means for receiving a token public key from the token, means for encrypting a random key with the token public key, and means for transmitting the encrypted random key to the token.
These and other objects, features and advantages of the present invention will be apparent from the following detailed description of illustrative embodiments thereof, which is to be read in connection with the accompanying drawings.
Referring to
A USB token 18 is essentially a smart card housed in a token, or key, which plugs into the standard universal serial port of a host computer 2. Unlike smart cards, the USB token 18 advantageously requires no smart card reader. The USB token 18 includes a smart card processor 22, a standard ISO 7816 serial interface 24 operatively coupled to the smart card processor 22, and a controller (preferably, a microcontroller or, equivalently, a microprocessor) with associated firmware 26 which is coupled to the smart card processor 22 through the serial interface 24 and which interfaces through the USB port 20 with the USB controller 8 of the host computer 2.
When an application 10 on the host computer 2 wishes to use the services from a smart card, and more specifically, a USB token 18 having a smart card processor 22, generally, and as shown in
1. The application program 10 on the host computer 2 sends a request, for example, to verify a personal identification number (PIN), a signature, or the like, to the Application Programming Interface (API) layer 12 (Block 50).
2. Middleware, also referred to as the API layer 12, of the host computer 2 converts the request to a standard ISO 7816 smart card command (Block 52).
3. The middleware (API layer) 12 then sends the smart card command to the device driver 16 of the host computer 2 (Block 52).
4. The device driver 16 packages the smart card command into USB (Universal Serial Bus) packets (Block 54).
5. The device driver 16 of the host computer 2 then sends the USB packets to the USB token 18 through the USB-compliant interface 20 (Block 54).
6. Firmware 26 in the USB token 18 receives the USB packets from the device driver 16 in the host computer 2 (Block 56).
7. The firmware 26 in the USB token 18 unpacks the USB packets and thereby recovers the smart card command (Block 56).
8. The firmware 26 in the USB token 18 then sends the smart card command to the smart card processor 22 via the standard ISO 7816 serial interface 24 (Block 56).
9. The smart card processor 22 receives the smart card command and executes it. The response, in standard ISO 7816 format, is sent back to the firmware 26 of the USB token 18 via the ISO 7816 serial interface 24 (Block 58).
10. The firmware 26 in the USB token 18 packages the response into USB response packets (Block 60).
11. The firmware 26 in the USB token 18 then sends the USB response packets back to the host computer 2 (Block 60).
12. The device driver 16 on the host computer 2 receives the USB response packets (Block 62).
13. The device driver 16 then unpacks the USB response packets, thereby recovering the response from the smart card processor 22 (Block 62).
14. The device driver 16 then sends the smart card processor response from the USB token 18 to the API layer 12 of the host computer 2 (Block 62).
15. The middleware (API layer) 12 of the host computer 2 translates the smart card processor response and sends the translated response to the calling application program 10 (Block 64), which executes the response from the smart card chip on the USB token (Block 66).
In accordance with the method of the present invention, as illustrated by
Instead of Step 4 (Block 54) in the sequence described above, the following steps would be substituted therefor:
4A. The device driver 16 of the host computer 2 encrypts the smart card processor command (Block 54′); and
4B. The device driver 16 then packages the encrypted command into USB packets (Block 54′).
Similarly, Step 7 (Block 56) in the previously described communication sequence would be replaced by the following new steps:
7A. The firmware 26 in the USB token 18 unpacks the USB packets, thereby recovering the encrypted command (Block 56′); and
7B. The firmware 26 in the USB token 18 decrypts the encrypted command, thereby recovering the smart card processor command (Block 56′).
If desired, encryption and decryption may similarly be applied to the smart card processor response in Steps 10 (Block 60) and 13 (Block 62), in accordance with the present invention. Accordingly, Step 10 (Block 60) in the sequence of communications between a host computer 2 and a USB token 18 would be changed to the following:
10A. The firmware 26 in the USB token 18 encrypts the response from the smart card processor 22 (Block 60′); and
10B. The firmware 26 in the USB token 18 then packages the encrypted response into USB response packets (Block 60′).
Similarly, Step 13 (Block 62) would be changed to the following:
13A. The device driver 16 on the host computer 2 unpacks the USB response packets, thereby recovering the encrypted smart card processor response (Block 62′); and
13B. The device driver 16 of the host computer 2 decrypts the encrypted smart card processor response (Block 62′).
Most encryption algorithms may be used in the encryption/decryption steps in the method of the present invention for providing secure communications between a host computer 2 and a smart card chip 22. Many of such encryption algorithms are well known in the art. Some examples of such are Advanced Encryption Standard (AES), described in Federal Information Processing Standard (FIPS) Publication No. 197, and the Data Encryption Standard (DES), described in FIPS Publication No. 46, each of which publications is incorporated herein by reference. A copy of such publications may be obtained from the National Institute of Standards and Technology (NIST), in Gaithersburg, Md.
One problem with such secure communications between a host computer 2 and a smart card chip 22 on a USB token 18 is how to get the encryption key at both the device driver 16 of the host computer 2 and the firmware 26 of the USB token 18. One solution for doing this would be to pick one key and embed (“hard-code”) it into both the driver and the firmware source code. However, this solution is not ideal; although it would protect against eavesdropping, it is not a solution against replay attacks.
If the key is not hard-coded into the driver 16 and firmware 26, then a key agreement or key distribution problem arises. This particular problem is solved by the present invention in the following manner, by using a scheme similar to the SSL protocol described previously:
A private/public key pair, for example, a 1024-bit RSA (Rivest-Shamir-Adleman algorithm) key pair, is generated on the USB token 18. If the firmware 26 on the USB token 18 is capable of doing this and of RSA encrypt and decrypt operations, the private/public key pair may be generated in the USB token firmware 26; otherwise, the firmware 26 will use the RSA encrypt/decrypt capabilities of the smart card processor 22 in the USB token 18. The private key never leaves the token 18, but the public key can be obtained from the token 18 by the host computer 2.
The sequence of steps in establishing a key agreement protocol between the host computer 2 and the USB token 18 is illustrated by
The above described method of the present invention ensures that every time the token 18 is plugged into the USB port 20 and coupled to the device driver 16 of the host computer 2, the device driver 16 and the token firmware 26 will receive a fresh, new random session key. In accordance with the present invention, one can also protect against replay attacks within one session, that is, while the token 18 is plugged into the host computer 2 and while the communication is using the same encryption key Kr. In accordance with the present invention, one way to protect against such replay attacks is to use a sequence counter (not shown) forming part of one or both of the driver 16 and the token firmware 26, such as a 32 bit or a 64 bit counter, as an initialization vector (IV) in a Cipher Block Chaining (CBC) mode encryption. This counter would be initialized to a known fixed value each time the key agreement protocol succeeds, and is incremented each time the host computer 2 and the USB token 18 communicate so that the device driver 16 of the host computer 2 and the token firmware 26 are always in synchronization regarding the IV value. This ensures correct decryption of the encrypted data.
Therefore, in accordance with the present invention, sensitive data exchanged between a host computer and a smart card chip is protected by encrypting the data. Also, in accordance with the present invention, all of the data in the communication path, not just sensitive data, such as a PIN, may be protected. Using a USB token having a smart card processor in a secure manner promotes the use of such USB tokens over standard smart cards which require smart card readers.
Although illustrative embodiments of the present invention have been described herein with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various other changes and modifications may be effected therein by one skilled in the art without departing from the scope or spirit of the invention.
This application is related to U.S. provisional application Ser. No. 60/539,904, filed on Jan. 28, 2004, and entitled “Secure Communication Between A Computer and A Smart Card Chip”, the disclosure of which is incorporated herein by reference. This application claims the benefit of priority under 35 U.S.C. 119 to the aforementioned related provisional application.
Number | Date | Country | |
---|---|---|---|
60539904 | Jan 2004 | US |