# Patent

## Title
Method and system to provide a trusted channel within a computer system for a SIM device

## Abstract

Exchanging data between a SIM device and an application executed in a trusted platform, wherein the data to be exchanged is secured from unauthorized access. In one embodiment, the exchanging data includes exchanging an encryption key via a trusted path within a computer system, and exchanging data encrypted with the encryption key, via an untrusted path with the computer system.

## Background
CROSS REFERENCE TO RELATED APPLICATIONS
This application is related to the following co-pending U.S. patent applications: 1) U.S. patent application Ser. No. 10/718,103 entitled, “Method and Apparatus for Implementing Subscriber Identity Module (SIM) Capabilities in an Open Platform,” assigned to the assignee of the present invention and filed Nov. 19, 2003; 2) U.S. patent application Ser. No. 10/744,120 entitled, “A Method and Apparatus for Providing a Trusted Time Stamp in an Open Platform”, assigned to the assignee of the present invention and filed Dec. 22, 2003; 3) U.S. patent application Ser. No. 10/718,369 entitled “Providing Services to an Open Platform Implementing Subscriber Identity Module (SIM) Capabilities,” assigned to the assignee of the present invention and filed Nov. 19, 2003; and 4) U.S. patent application Ser. No. 10/881,658 entitled “System Including a Wireless Wide Area Network (WWAN) Module with an External Identity Module Reader and Approach for Certifying the WWAN Module,” assigned to the assignee of the present application and filed Jun. 29, 2004.
FIELD OF INVENTION
The field of invention relates generally to trusted computer platforms; and, more specifically, to a method and apparatus to provide a trusted channel within a computer system for a SIM device.
BACKGROUND
Trusted operating systems (OS) and platforms are a relatively new concept. In first generation platforms, a trusted environment is created where applications can run trustedly and tamper-free. The security is created through changes in the processor, chipset, and software to create an environment that cannot be seen by other applications (memory regions are protected) and cannot be tampered with (code execution flow cannot be altered). As a result, the computer system cannot be illegally accessed by anyone or compromised by viruses.
In today's computing age, Subscriber Identify Modules (SIM), sometimes referred to as a smart card, are becoming more prevalent. A SIM is a credit card sized card that is typically used for Global System for Mobile communications (GSM) phones to store telephone account information and provide Authentication, Authorization and Accounting (AAA). The SIM cards also allow a user to use a borrowed or rented GSM phone as if it were their own. SIM cards can also be programmed to display custom menus on the phone's readout. In some cases, the SIM cards include a built-in microprocessor and memory that may be used in some cases for identification or financial transactions. When inserted into a reader, the SIM is accessible to transfer data to and from the SIM.
When using a SIM card in a computer system, there is a need to securely access information from the SIM card in order to prevent accesses to the SIM from unauthorized software applications. Such accesses may be intended to learn certain SIM secrets or to break GSM authentication mechanisms and steal services provided.



FIGURES
One or more embodiments are illustrated by way of example, and not limitation, in the Figures of the accompanying drawings, in which
FIG. 1 illustrates a computer system capable of providing a trusted platform to protect selected applications and data from unauthorized access, according to one embodiment; and
FIG. 2 is a flow diagram describing a process of providing a trusted channel within a computer system for a SIM device, according to one embodiment.



DETAILED DESCRIPTION
A method and system to provide a trusted channel within a computer system for a SIM device is described. In one embodiment, data is exchanged between an application being executed in a trusted platform and a SIM device, wherein the data exchanged is protected from unauthorized access. In one embodiment, an encryption key is exchanged via a trusted channel within a computer system. Data encrypted with the encryption key is exchanged via an untrusted channel within the computer system.
In the following description, numerous specific details are set forth. However, it is understood that embodiments may be practiced without these specific details. In other instances, well-known circuits, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
Reference throughout this specification to “one embodiment” or “an embodiment” indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In addition, as described herein, a trusted platform, components, units, or subunits thereof, are interchangeably referenced as protected or secured.
Trusted Platform
FIG. 1 illustrates a computer system, according to one embodiment, capable of providing a trusted platform to protect selected applications and data from unauthorized access. System 100 of the illustrated embodiment includes a processors 110, a chipset 120 connected to processors 110 via processor bus 130, a memory 140, and a SIM device 180 to access data on a SIM card 182. In alternative embodiments, additional processors and units may be included.
Processor 110 may have various elements, which may include but are not limited to, embedded key 116, page table (PT) registers 114 and cache memory (cache) 112. All or part of cache 112 may include, or be convertible to, private memory (PM) 160. Private memory is a memory with sufficient protections to prevent access to it by any unauthorized device (e.g., any device other than the associated processor 110) while activated as a private memory.
Key 116 may be an embedded key to be used for encryption, decryption, and/or validation of various blocks of data and/or code. Alternatively, the key 116 may be provided on an alternative unit within system 100. PT registers 114 may be a table in the form of registers to identify which memory pages are to be accessible only by trusted code and which memory pages are not to be so protected.
In one embodiment, the memory 140 may include system memory for system 100, and in one embodiment may be implemented as volatile memory commonly referred to as random access memory (RAM). In one embodiment, the memory 140 may contain a protected memory table 142, which defines which memory blocks (where a memory block is a range of contiguously addressable memory locations) in memory 140 are to be inaccessible to direct memory access (DMA) transfers. Since all accesses to memory 140 go through chipset 120, chipset 120 may check protected memory table 142 before permitting any DMA transfer to take place. In a particular operation, the memory blocks protected from DMA transfers by protected memory table 142 may be the same memory blocks restricted to protected processing by PT registers 114 in processor 110. The protected memory table 142 may alternatively be stored in a memory device of an alternative unit within system 100.
In one embodiment, Memory 140 also includes trusted software (SNV) monitor 144, which may monitor and control the overall trusted operating environment once the trusted operating environment has been established. In one embodiment, the trusted S/N monitor 144 may be located in memory blocks that are protected from DMA transfers by the protected memory table 142.
Chipset 120 may be a logic circuit to provide an interface between processors 110, memory 140, SIM device 180, and other devices not shown. In one embodiment, chipset 120 is implemented as one or more individual integrated circuits, but in other embodiments, chipset 120 may be implemented as a portion of a larger integrated circuit. Chipset 120 may include memory controller 122 to control accesses to memory 140. In addition, in one embodiment, the chipset 120 may have a SIM reader of the SIM device integrated on the chipset 120.
In one embodiment, protected registers 126 are writable only by commands that may only be initiated by trusted microcode in processors 110. Trusted microcode is microcode whose execution may only be initiated by authorized instruction(s) and/or by hardware that is not controllable by unauthorized devices. In one embodiment, trusted registers 126 hold data that identifies the locations of, and/or controls access to, trusted memory table 142 and trusted S/W monitor 144. In one embodiment, trusted registers 126 include a register to enable or disable the use of trusted memory table 142 so that the DMA protections may be activated before entering a trusted operating environment and deactivated after leaving the trusted operating environment.
Trusted Channel with SIM Device
FIG. 2 is a flow diagram describing a process of providing a trusted channel within a computer system for a SIM device, according to one embodiment. As described herein, reference to a SIM device includes other types of related Smart cards. The processes described in the flow diagram of FIG. 2, are described with reference to the system of FIG. 1, described above.
In one embodiment, in process 202, an application 150 being executed in a trusted environment of the system 100, determines information is to be accessed from a SIM device 180 of the system 100. The application 150 being executed in a trusted atmosphere can be located in a protected memory, such as protected memory 160 of cache 112, or a protected section of memory 140. In one embodiment, the SIM device 180 includes a mechanism to ascertain that the accesses are coming from the application in a trusted environment that is running on the same platform that the SIM device is physically attached to, and not from some remotely executing application.
In process 204, the application and the SIM device perform a mutual authentication to determine that the SIM device is the correct device from which the application is to receive data, or that the application is the correct application to which the SIM device is to send the data. The mutual authentication may be conducted via a variety of processes known throughout the concerned field of technology.
In process 206, following the completion of the mutual authentication, in one embodiment, the application 150 transmits an encryption key to a protected section of memory 140, via a trusted channel with the memory device, and corresponding PT entries held in the processor. In one embodiment, the protected section of memory to store the encryption key is identifiable via the protected memory table 142.
The encryption key provided by the application 150 to the protected section of memory 140, is generated by the application 150, and is applicable to one of several available encryption processes, such as the Data Encryption Standard (DAS) or the Advanced Encryption Standard (AES). In one embodiment, the encryption key is generated via utilization of the key 116 of processor 110.
In process 208, the SIM device 180 accesses the encryption key from the protected section of memory 140. In one embodiment, the SIM device accesses the encryption key via a trusted port 112, of a chipset 120, which is mapped to the protected section of memory 140. In one embodiment, the trusted port may support one of several platform bus protocols, including USB. In an alternative embodiment, the encryption key is provided by the SIM device, wherein the application accesses the encryption key from the SIM device via the trusted port of the chipset.
In process 210, the SIM device 180 uses the encryption key to encrypt data to be sent to the application 150. In process 212, the encrypted packets are transferred from the SIM device 180 by a host controller 128 (e.g., a USB host controller) of the chipset to a regular area of memory (i.e., unprotected section of memory 148). For example, an area of memory that is used to store data packets, such as USB data packets.
In one embodiment, the encrypted packets are transmitted to the memory by the host controller via a regular port 124 of the chipset (i.e., an unprotected port), which maps to an unprotected section of memory 148. In one embodiment, the encrypted packets from the SIM device include Message Authentication Code (MAC) to provide a level of integrity protection.
In process 214, a driver (e.g., an unprotected USB driver) accesses the encrypted packets from the unprotected section of memory 148 and provides the encrypted packets to the application 150 being executed in the trusted environment. In process 216, the application 150 decrypts the encrypted packets to access the data from the SIM device, which have been securely transferred to the application via an untrusted path within the system 100.
In one embodiment, new encryption keys may be exchanged based on predetermined events. For example, a new encryption key may be exchanged following one of, or a combination of, each new transaction (as defined based on implementation choice), the passage of a predetermined period of time, or the exchange of a predetermined amount of data.
In another alternative embodiment, multiple encryption keys are exchanged between the application 150 and the SIM device 180, to be used for encrypted data exchanges between the SIM device 180 and the application 150.
For example, a SIM device may include multiple data pipes (e.g., bulk-in, bulk-out, and default control pipes). For each of the data pipes of the SIM device, a separate encryption key may be used to protect the data exchanges. Alternatively, the separate data pipes may all use the same encryption key.
In an alternative embodiment, the data packets may be transmitted from the SIM device to the application without the use of encryption. For example, the host controller 128 transmits the data from the SIM device to the protected section of memory 140 via the trusted port 112 of the chipset 120. A trusted driver would then access the data from the protected section of memory 140 and provide the data to the application 150 via a trusted path, without having the SIM data encrypted.
The processes described above can be stored in the memory of a computer system as a set of instructions to be executed. In addition, the instructions to perform the processes described above could alternatively be stored on other forms of machine-readable media, including magnetic and optical disks. For example, the processes described could be stored on machine-readable media, such as magnetic disks or optical disks, which are accessible via a disk drive (or computer-readable medium drive). Further, the instructions can be downloaded into a computing device over a data network in a form of compiled and linked version.
Alternatively, the logic to perform the processes as discussed above could be implemented in additional computer and/or machine readable media, such as discrete hardware components as large-scale integrated circuits (LSI's), application-specific integrated circuits (ASIC's), firmware such as electrically erasable programmable read-only memory (EEPROM's).
In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. In particular, as described herein, the SIM device is inclusive of Smart card devices, including USB Chip/Smart Card Interface Devices (CCID. Furthermore, the architecture of the system as described herein is independent of any particular key exchange protocols that are used. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.

## Claims

1. A method comprising:
executing, by a hardware processor, a protected application in a protected execution environment that is provided by a trusted platform, the protected execution environment being associated with a protected section of memory that is inaccessible to direct memory access and an unprotected section of memory that is accessible to direct memory access, wherein the trusted platform includes a trusted path and an untrusted path;
determining, by the hardware processor executing the protected application, that information is to be accessed from a subscriber identity module (SIM) device that includes a SIM card, the SIM device being physically connected with the trusted platform;
wherein the trusted path is a path between the protected application and the SIM device, the trusted path being a path through a trusted port of the trusted platform, wherein the trusted port is mapped to the protected section of memory;
wherein the untrusted path is another path between the protected application and the SIM device, the untrusted path being a path through an untrusted port of the trusted platform, wherein the untrusted port is mapped to the unprotected section of memory;
exchanging unencrypted data that includes an encryption key between the SIM device and the protected application via the trusted path, wherein the unencrypted data to be exchanged is secured from unauthorized access via properties of the trusted port; and
exchanging encrypted data that is additional data that has been encrypted using the encryption key between the SIM device and the protected application via the untrusted path.

2. The method of claim 1, wherein exchanging the encryption key includes the protected application transmitting the encryption key to the protected section of memory; and
the SIM device accessing the encryption key from the protected section of memory.

3. The method of claim 1, wherein exchanging the encryption key includes the protected application accessing the encryption key from the SIM device, the protected application accessing the encryption key via the trusted port.

4. The method of claim 1, wherein exchanging the encryption key includes exchanging multiple encryption keys, and exchanging the encrypted data includes exchanging separate units of data, with each unit of data separately encrypted with an encryption key selected from the multiple encryption keys.

5. The method of claim 1, wherein exchanging the encrypted data includes a host controller transmitting data from the SIM device to the unprotected section of memory, and a driver transmitting data from the unprotected section of memory to the protected application.

6. The method of claim 5, wherein the host controller is a Universal Serial Bus (USB) host controller and the driver is a USB driver.

7. The method of claim 1, wherein exchanging the encryption key includes the SIM device reading the encryption key from the protected section of memory via the trusted port.

8. The method of claim 1 further comprising:
the protected application decrypting the encrypted data using the encryption key.

9. The method of claim 1 further comprising:
prior to exchanging the encryption key, the protected application authenticating the SIM device.

10. The method of claim 5, further comprising:
exchanging a new encryption key based on a predetermined event selected from a group comprising of, each new transaction, passage of a predetermined period of time, and exchange of a predetermined amount of data.

11. A system comprising:
a memory having a protected section that is inaccessible to direct memory access and an unprotected section that is accessible to direct memory access;
a trusted platform to provide a protected execution environment, the protected execution environment being associated with the protected section of memory and the unprotected section of memory, wherein the trusted platform includes a trusted path and an untrusted path; and
a hardware processor to execute a protected application in the protected execution environment, wherein the trusted application to:
determine that information is to be accessed from a subscriber identity module (SIM) device that includes a SIM card, the SIM device being physically connected with the trusted port;
wherein the trusted path is a path between the protected application and the SIM device, the trusted path being a path through a trusted port of the trusted platform, wherein the trusted port is mapped to the protected section of memory;
wherein the untrusted path is another path between the protected application and the SIM device, the untrusted path being a path through an untrusted port of the trusted platform, wherein the untrusted port is mapped to the unprotected section of memory;
exchange, with the SIM device, unencrypted data that includes an encryption key via the trusted path, wherein the unencrypted data to be exchanged is secured from unauthorized access via properties of the trusted port; and
exchange, with the SIM device, encrypted data that is additional data that has been encrypted using the encryption key via the untrusted path.

12. The system of claim 11, wherein the exchange of the encryption key includes the protected application to transmit the encryption key to the protected section of memory, and the SIM device to access the encryption key from the protected section of memory.

13. The system of claim 11, wherein the exchange of the encryption key includes the protected application to access the encryption key from the SIM device, the protected application to access the encryption key via the trusted port of the trusted platform.

14. The system of claim 11, wherein the exchange of the encryption key includes an exchange of multiple encryption keys, and the exchange of encrypted data includes an exchange of separate units of data, with each unit of data separately encrypted with an encryption key selected from the multiple encryption keys.

15. The system of claim 11, wherein the system further includes a host controller to transmit data from the SIM device to the unprotected section of memory.

16. The system of claim 15, wherein the system further includes a driver to transmit data from the unprotected section of memory to the protected application.

17. The system of claim 16, wherein the host controller is a Universal Serial Bus (USB) host controller and the driver is a USB driver.

18. The system of claim 11, wherein the SIM device is to read the encryption key from the protected section of memory via the trusted port of the trusted platform.

19. The system of claim 11, wherein the protected application is to decrypt the encrypted data using the encryption key.

20. The system of claim 11, wherein the protected application is to authenticate the SIM device prior to the exchange of the encryption key.

21. The system of claim 11, wherein a new encryption key is to be exchanged based on a predetermined event selected from a group comprising of, each new transaction, passage of a predetermined period of time, and exchange of a predetermined amount of data.

22. The method of claim 1, further comprising:
determining, by the SIM device, that the protected application is executed in the trusted execution environment before exchanging the unencrypted data.

23. The method of claim 1, wherein the trusted path is not accessible to applications other than the protected application and the untrusted path is accessible to applications other than the protected application.