Device bound flashing/booting for cloning prevention

A method comprising downloading a boot image onto a mobile communication device and generating a device-bound certificate (“DBC”). The DBC preferably comprises an authentication code generated using a hashed message authentication code algorithm and a key specific to the device. The method may further comprise storing the DBC on the boot image, thus binding the boot image to the mobile communication device.

BACKGROUND

Mobile phones generally comprise software applications that may be executed to operate the mobile phone. In addition to enabling a phone with voice communications capabilities, these software applications may enable a phone with various other capabilities, such as text messaging and digital photography. A mobile phone boot image may comprise an operating system and any of a variety of such software applications that may be executed on the mobile phone. The price of a mobile phone may vary based on the quality of the boot image embedded in the phone's flash memory. High-quality boot images may cause particular phones to be more expensive than phones with boot images of lesser quality.

Texas Instruments'® proprietary Open Multimedia Applications Platform (“OMAP”) comprises a microprocessing engine that enables communications devices to process data and software applications while extending battery life. A mechanism present in current OMAP devices (i.e., models 161x, 171x, 73x) supports the flashing and booting of boot images using a key that is shared among a plurality of devices. This key helps verify the authenticity of a boot image, but does not prevent the unauthorized copying and re-use of the boot image on a separate phone, resulting in a possible penetrable security gap. Such a security gap may enable unauthorized entities to copy boot images from expensive phones and reproduce the boot images on inexpensive phones. In this way, an unauthorized entity may clone an expensive phone into an unlimited number of inexpensive phones and sell the inexpensive phones for a profit.

In addition to unlawfully copying the boot image, unauthorized entities also may tamper with the contents of the boot image to circumvent existing safeguards that prevent the usage of stolen mobile phones. For example, each mobile phone boot image comprises an International Mobile Equipment Identifier (“IMEI”) number that serves as an identification code for the phone in the Global System for Mobile Communication (“GSM”) and Third Generation (“3G”) networks. The IMEI number is used to grant or deny access to the cellular networks and the networks' services. Generally, if a phone is stolen, the owner may contact his or her cellular service provider (e.g., Sprint®, Verizon®, AT&T®) and have the phone added to a GSM/3G blacklist. Mobile phones found on the blacklist will be denied access to the cellular networks. Thus, an unauthorized entity that steals the phone would not be able to use the phone to access the networks, because the IMEI number of the phone has been added to the blacklist. However, a knowledgeable, unauthorized entity may easily alter the IMEI number of the stolen phone to a number that is not found on the blacklist, thereby gaining access to the cellular networks by way of the stolen phone.

Each year, mobile phone manufacturers lose substantial amounts of revenue due to phone cloning and tampering. Thus, it is desirable to prevent phone cloning and tampering.

BRIEF SUMMARY

The problems noted above are solved in large part by a method and apparatus for binding a boot image and the various contents of a boot image to a mobile communication device. One exemplary embodiment may include downloading a boot image onto a mobile communication device and generating a device-bound certificate (“DBC”). The DBC preferably comprises an authentication code generated using a hashed message authentication code (“HMAC”) algorithm and a key specific to the device. The method may further comprise storing the DBC on the boot image, thus binding the boot image to the mobile communication device.

NOTATION AND NOMENCLATURE

DETAILED DESCRIPTION

In accordance with the preferred embodiments, per-device “binding” of boot images and boot image contents is provided for a mobile communication device. A boot image that has been downloaded to a mobile phone may be manipulated so that the boot image cannot be copied, altered, or transferred to any other mobile phone. In this way, the boot image is “bound” to the mobile phone. The boot image, once bound to the mobile phone, is valid only for that particular mobile phone. The contents of a boot image also may be bound to a mobile phone in a similar fashion.

Per-device binding of a boot image is accomplished by way of a device-bound certificate (“DBC”). In accordance with the preferred embodiments, a DBC is used to bind a boot image to a particular mobile phone so that the boot image cannot be transferred, altered or otherwise copied to another mobile phone. In a binding process, private data comprising a hashed message authentication code (“HMAC”) is stored in the DBC and the DBC subsequently is encrypted with a secret key. In the preferred embodiment, a mobile phone is not permitted to use the boot image without first obtaining the HMAC contained in the DBC. The HMAC thus functions to bind the boot image to the mobile phone. Further, the phone cannot access the HMAC in the DBC without the secret key and only the phone to which the boot image is bound has the secret key. Hence, only the phone with the correct secret key may freely access the contents of the boot image. Thus, per-device binding of a boot image and all contents of the boot image is accomplished by way of a DBC.

Referring now toFIGS. 1,2and3a,FIG. 1shows a preferred embodiment of a mobile phone170comprising an OMAP processor172coupled to a UART/USB port174, a flash memory178and comprising a ROM code (i.e., on-chip firmware)176.FIG. 2illustrates a flow diagram describing the process of binding a boot image to the mobile phone170.FIG. 3aillustrates a boot image300comprising a TOC field302that describes the contents of the boot image300, a KEYS header304that comprises keys used for cryptographic reasons as described below and a common header306that acts as a header for a flash loader308, which comprises a protected application (“PA”)316. The boot image300also may comprise other fields310, a PA312and an empty device-bound certificate (“DBC”) field314. Protected applications are thusly named because the protected applications operate in a secure-mode environment, which may be defined as a hardware-based secure execution environment that is generally tamper-proof.

A binding process may be performed during manufacture of a phone, after the phone has been sold to a consumer, or at any other time. In general, the binding process begins with the creation of a DBC during the flashing process, the filling of the empty DBC field314with this DBC, and the subsequent storing of the boot image300on the mobile phone170. More specifically, the binding process may begin with the authentication of the flash loader308by the ROM code176to ensure the validity of the flash loader308(block202). Once authenticated, the flash loader308downloads the boot image300by way of a UART/USB port174or any appropriate device (block204). The boot image300and other information may be downloaded by a manufacturer or any appropriate entity from any appropriate source, such as the manufacturer's computer systems. In cases where specific items (e.g., an IMEI certificate comprising an IMEI number; SIMlock files) are to be bound to the mobile phone170, the items may be downloaded in a manner similar to that used to download the boot image300. Prior to being downloaded, the IMEI certificate preferably is signed by a manufacturer with an Original Equipment Manufacturer Interface (“OEMI”) private key. An OEMI public key and the IMEI certificate are both downloaded onto the mobile phone170, so that the mobile phone170may verify the IMEI certificate using the OEMI public key at a later time.

The flash loader308subsequently may load and call the PA316(block206). When calling the PA316, the flash loader308sends various parameters, comprising pointers to various components of the boot image300(e.g., the common header306) as well as the values of Creator ID and Application ID found in the common header306. The Creator ID describes the owner or creator of a DBC and the Application ID serves as an identifier for the application that creates the DBC. The PA316may use these pointers and values as necessary.

At least one purpose of the PA316is to compute the DBC (block208), optionally encrypt the DBC with a random key (block210), and pass the DBC to the flash loader308for further processing (block212). As previously discussed, the PA316operates in a secure-mode environment. The PA316may begin generating the DBC as follows:
HMAC=HMACKEY(SHA-1 (Common Header 306+Boot Loader)∥Public Chip ID∥Creator ID∥Application ID∥Reserved Fields),
where “HMAC” denotes a hashed message authorization code, the symbol “∥” denotes concatenation, the Public Chip ID serves as a public identifier for the OMAP PROCESSOR172, the Reserved Fields contain any information (e.g., an IMEI certificate) and the boot loader is contained in the boot image300as described inFIG. 3bbelow. Specifically, the common header306and the boot loader are first hashed together using the commonly-known SHA-1 algorithm, described below. The result is concatenated with various data as shown above (e.g., Public Chip ID, Creator ID). The resulting concatenation is hashed using a key (i.e., KEY) by a commonly-known HMAC cryptographic algorithm, where KEY is generated as:
KEY=SHA-1 (Chip Specific ID∥Creator ID∥Application ID),
and where the Chip Specific ID is a secret identifier created by the ROM code176or other system firmware and available only inside secure mode (i.e., during the execution of a PA). A secure hash algorithm SHA-1 is used for computing a “condensed representation” of a message or a data file. The “condensed representation” is of fixed length and is known as a “message digest” or “fingerprint.” It is computationally infeasible to produce two messages having the same message digest. This uniqueness enables the message digest to act as a “fingerprint” of the message. For instance, SHA-1 may be used to ensure the integrity of a downloaded or received file by comparing the file hash with the original file hash. Any message or similar construct requiring integrity may be verified in this fashion.

The PA316completes the DBC computation by assembling a DBC as illustrated inFIG. 3busing information computed by the PA316or received from the flash loader308. Specifically, the completed DBC may comprise a Public Chip ID322, a Creator ID324, an Application ID326, a boot loader/common header hash328, reserved fields330and an HMAC332generated as described above. The reserved fields330may be filled with an IMEI certificate330if an IMEI certificate was downloaded in block204. The reserved fields330also may be filled with any other device-specific information. The PA316then may optionally encrypt the DBC with a random, secret key K, computed as:
K=SHA-1 (Chip Specific ID∥Creator ID∥Application ID).
Encrypting the DBC with a random, secret key K protects all of the contents of the DBC (e.g., the IMEI certificate330). Once the DBC is encrypted or the encryption step is bypassed, the PA316passes the DBC to the flash loader308for further processing.

The flash loader308receives the DBC from the PA316and inserts the DBC into the empty DBC field314(block214), thereby establishing a DBC314inside the boot image300. The flash loader308then completes the binding process by flashing (i.e., writing) the boot image300to the flash memory178of the mobile phone170(block216).

The boot image300comprising the DBC314and bound to the phone170cannot be used until the DBC314is authenticated at boot time (i.e., each time the phone is turned on) as illustrated inFIG. 4. That is, the operating system contained in the boot image300will not load unless the DBC314is first authenticated, thus preventing an end-user from using the phone170.

Referring now toFIGS. 3band4,FIG. 3billustrates a booting-time boot image300comprising a TOC field302, a KEYS header field304, a common header306, a boot loader308comprising a PA320, other fields310, a PA312and a DBC314. As described above, the DBC314comprises a Public Chip ID322, a Creator ID324, an Application ID326, a boot loader/common header hash328, reserved fields330that may comprise an IMEI certificate330, and the HMAC332.FIG. 4illustrates a flow diagram of the process for authenticating a boot image300at boot-time. Specifically, the boot-time authentication process may begin with the verification of the KEYS header304and the common header306by the on-chip ROM code176(block402). The boot loader318may load and call the PA320using various parameters comprising pointers to the DBC314, the common header306and boot loader318, and values of the Creator ID324and Application ID326from the common header306(block404) so the PA320may use these pointers and values as necessary.

The PA320then may verify the integrity of the DBC314and, if applicable, the IMEI certificate330(block406) by first unlocking (i.e., decrypting) the DBC314(if the DBC314was encrypted) using a key K1and verifying the IMEI certificate330using the OEMI public key that was downloaded onto the mobile phone170concurrently with the IMEI certificate330. The key K1is computed as follows:
K1=SHA-1 (Chip Specific ID∥Creator ID∥Application ID).
Although computed separately, the key K1used to decrypt the DBC314during the booting process is identical to the key K used to encrypt the DBC314during the flashing process. After the encrypted DBC314is unlocked (if applicable), the PA320computes:
HMAC1=HMACKEY1(SHA-1(Common Header 306+Boot Loader 318)∥Public Chip ID 322∥Creator ID 324∥Application ID 326∥Reserved Fields),
where the Creator ID324and the Application ID326are obtained from the DBC314and where KEY1is computed as:
KEY1=SHA-1(Chip Specific ID∥Creator ID∥Application ID).
The PA320subsequently compares the HMAC1calculated above to the HMAC stored in the DBC314to test for a match and passes the result of the comparison to the boot loader318(block408). A match indicates that the boot image300has not been copied or altered and may be used by the mobile phone170on which the boot image300is located. A match also indicates that the contents of boot image300(e.g., the IMEI certificate330) have not been copied or altered and are authentic. In such a case, the booting process would continue as normal. Conversely, a mismatch indicates that the boot image300may have been stolen, altered or copied. Thus, the integrity of the contents of the boot image300(e.g., the IMEI certificate330) may have been compromised. In such a case, the booting process would not continue. The boot loader318receives the results of this comparison from the PA320and proceeds accordingly (block410), thereby completing the boot-time authentication process.

Although the subject matter disclosed herein is described in terms of the OMAP161× platform, the OMAP 73×platform, the OMAP 171×platform or any of a variety of platforms may be used. The above discussion is meant to be illustrative of the principles and various embodiments of the present invention. While the technique for per-device binding of boot image contents is discussed in context of IMEI certificates, the technique may be applied to any device-specific data. Additionally, the scope of disclosure is not limited to the boot image contents as described above. The boot images described above may contain any of a variety of contents, such as R&D certificates used for debugging purposes, a primary protected application (“PPA”) that is present in secure random access memory after booting, a PPA certificate, and any other appropriate item. Also, while the above subject matter is primarily discussed in terms of applicability to mobile phones, the subject matter may be used with any mobile communication device. Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.