Initializing, maintaining, updating and recovering secure operation within an integrated system employing a data access control function6957335Abstract Techniques are provided for initializing, maintaining, updating and recovering secure operation within an integrated system. The techniques, which employ a data access control function within the integrated system, include authenticating by a current level of software a next level of software within an integrated system. The authenticating occurs before control is passed to the next level of software. Further, an ability of the next level of software to modify an operational characteristic of the integrated system can be selectively limited via the data access control function. Techniques are also provided for initializing secure operation of the integrated system, for migrating data encrypted using a first key set to data encrypted using a second key set, for updating software and keys within the integrated system, and for recovering integrated system functionality following a trigger event. Claims 1. A method of migrating data encrypted using a first key set to data encrypted using a second key set, said method comprising: Description TECHNICAL FIELD
Post-Storage
The integrity check function 245 may optionally be employed in combination with the enhanced, secure operation concepts for an integrated system described hereinbelow. FIG. 3 is a representation of the levels of software used in a typical integrated device. As shown, the hardware 300 of the device is the base on which the software levels operate. Boot code 310 runs when the device is first turned on and performs initialization functions using initialization data 312. The kernel 320, abstracted as level 1, is called by the boot code after initialization. Kernel 320 provides operating system services and resources, including general system settings 322 and registrations 324. One or more levels of software are then called in succession including middleware and service functions 330 such as network services, file management, media handling, etc. that work with software access controls or passwords 332 and keys 334. Application software 340 resides atop the middleware and service software level 330, and works with user data such as personal information 342 and other content 344. FIG. 3 illustrates one challenge in providing security for an integrated device or system. As a general rule, the closer the software level is to the underlying hardware, the more secure or trusted the software is. However, in contrast, the closer the software level is to a user, such as an application, the more valuable the data is. This leads to the least secure software protecting the most valuable data. FIG. 4 depicts an approach to providing security in an integrated system. Starting with the hardware 400, each level of software is authenticated by the underlying level. In the case of boot code 410, it is authenticated through the use of decryption and a master key set in the hardware, as defined in the above-incorporated applications, where boot code (or initialization code) is stored in encrypted form in external memory. Also, after authentication and prior to passing control to the next level of software 420, 430, 440, etc., each preceding level may limit the ability of the next level to control or modify the system. Therefore, as each level is loaded, each level is verified and the ability to effect the security of the system may be further restricted. FIG. 5 illustrates an implementation of the approach shown in FIG. 4 in the context of an integrated system such as described in FIG. 2. More particularly, this implementation is through the use of the access control function described above, and in the above-incorporated applications. The boot code 400 is authenticated by the hardware as described above, and so is considered the most trusted level of software. The boot code is able to fully configure the access control function, including the key sets used in decryption, the address table that defines how addresses are translated, the access level that specifies the allowed transactions based on master id and address range, and also the access parameters that define how the request is processed. Again, all of this information is maintained by the access control function described above. Prior to passing control to the next level of software, i.e., level one 410, the boot code, in this example, hides the key values so they are not directly visible to software and also locks the address table and the access level entries (both contained within the access table) so that they cannot be modified by the next level of software. However, in this example, the access parameters can still be updated at this next level. Note that hiding can be accomplished in hardware by preventing read access, and locking can be accomplished in hardware by preventing write access. Those skilled in the art will understand that there are multiple ways of controlling (or locking) access to the registers of the access control unit, such as enforcing the use of privileged instructions, connecting the registers to on-chip private busses only, memory-mapping the registers and limiting the access to the registers using existing settings in the access control unit, etc. As shown, prior to passing control to a least trusted software level 440, the last operational characteristics depicted of the access control function, i.e., the access parameters, are locked so that they cannot be modified. FIG. 6 depicts one embodiment of a process for initializing a secure operating environment for an integrated device that has been assembled into a computing system. As shown, the integrated device is assembled into a larger system 605, and power is applied 610. The entire system or computing environment is moved to a physically secure environment 600 associated with the system manufacturer where the integrated device undergoes configuration for secure operation. In particular, the security mode is advanced 612, secret keys are generated 615, and the keys and substitute boot address are loaded in persistent storage 620 associated with the data access control function of the device. Note that the secret keys can either be provided by the manufacturer or generated by the integrated device itself. In the latter case, the keys may be optimally held in escrow. The access table is next configured 625 so that data written to volatile memory will be encrypted with the master key set and use the non-volatile memory address for whitening, as described below in connection with FIGS. 7A & 7B. Data read from volatile memory will not be cryptographically processed and will remain unchanged. The access table is also configured so that data written to non-volatile memory will be unchanged. The boot code is then loaded through a debug interface (see FIGS. 7A & 7B) and encrypted by the data access control function using the master key set as the data is written to volatile memory 630. The code is then copied from volatile memory to non-volatile memory without decryption thereof 635, as explained further below. Lastly, the integrated device is configured for secured mode 640, as described in the above-incorporated applications. Note that the result of this processing is that the encryption is unique to the particular integrated system. At this point, the computing system can be removed from the physically secure location 600. The system is then re-booted using the loaded secure boot code 645, which can then be used to load additional code if desired in a secure manner through the use of encryption with self-generated key values 650. The final step in the process of FIG. 6 is to test and ship the computing system 655. FIG. 7A further depicts processing 630 of FIG. 6. (Note that FIG. 7A and certain subsequent figures are a simplified depiction of the integrated system of FIG. 2, wherein the bus control and slave elements are omitted for clarity.) As shown, a debug interface or integrated development environment (IDE) can be used to load unencrypted boot code into the integrated device, which has been configured for secure operation. Integrated device 200 encrypts the boot code 249 using the internal master key, stored in persistent storage 243 of access control function 240, and writes the encrypted boot code 700 to a defined location in volatile memory 280. Note that the encrypted boot code is first written to volatile memory because non-volatile memory, such as flash memory, requires multiple operations to write a given data value and so could not be implemented as a block operation. Since the encrypted boot code 700 is to be later copied to another location in external memory, the access table 248 entry associated with the encryption operation is configured to use the ultimate address location in non-volatile memory as the value for whitening. Whitening is described further in one or more of the above-incorporated applications. FIG. 7B illustrates process 635 for copying, for example, by processor 2101, the encrypted boot code from volatile memory to non-volatile memory 260. Since the boot code is already encrypted with the master key set and the non-volatile memory address for whitening, the boot code does not require any cryptographic transformation and is copied directly into the non-volatile memory without undergoing decryption. FIG. 8 depicts a flowchart of one initialization process in accordance with an aspect of the present invention. Beginning with the boot procedure 800, the integrated device turns on 805 and issues a boot request which is redirected by the data access control function using the substitute boot address 810. The encrypted code fetched from memory is decrypted by the data access control function using the master key set 815. Among the first instructions executed, a check is made to see if an updated boot code image is available 820. This check should be done during the boot procedure itself since no other level of software may be authorized to make changes to the boot code. If there is no update, the boot code generates the runtime keys to be used for the given session that is starting 825. Note that if there are data structures from previous sessions that must be used, the boot code can also retrieve encrypted key values that had been stored by the previous session. The boot code then authenticates the next level of software using established techniques to mathematically process the software image in memory to arrive at a unique digest or hash value and then compare the result to an expected value 830. This can be accomplished in software using the secure boot code. In addition to authorization, the boot code can also limit the ability of the next level of software to modify or even observe the security settings and the operational characteristics associated with the access control function. With both authentication and locking of security functions complete, control is passed to the next level of software 835. If this is a final level 840, then the process of loading software is complete and secure operation of the device can begin 845. If there are additional levels, the task of authenticating the next level and optionally locking security functions is performed again, and the loop continues until all levels are loaded. If there is an update for the boot code, then from inquiry 820 the boot update procedure 850 is followed. First, the current boot code (i.e., the code which was running when the device was first turned on) is used to authenticate and decrypt the new boot code image 855. Note that the new image may have been transmitted to the system in an encrypted form that is different than that used by the integrated device internally. In such a case, the boot code performs a decryption step in software. The running boot code then writes the new boot code to memory using the access control function to encrypt the new code with the master key set of the integrated device in the same manner as when the system was first assembled 860. However, the new boot code image is written to a separate location than the running boot code so that if the system is unexpectedly interrupted during the procedure, the running boot code is complete and operational in memory. Once the new boot code image is completely authenticated and written to non-volatile memory, the running boot code updates the substitute boot address to point to the new boot code image 865. Once the update is completed, the system is restarted 870 and goes back to the beginning of the boot procedure 800. In an extension of this process, one or more levels of code other than the boot or initialization code may be added as required by a level of software having a higher security privilege. For example, the boot code could be used to update the kernel. As an extension to the boot update procedure 850, a new version number can be associated with the new boot code image 860. This requires that a version number parameter be added to the values that are stored in on-chip persistent memory associated with the data access control function, as described in one or more of the above incorporated applications. Again, the version number is used to perform the whitening procedure as part of the decryption of the first instructions. The advantage of including a version number for the boot code image is that it prevents an attacker from reusing an older boot code image by merely making a copy and then replaying it. FIG. 9 depicts processing within an integrated system which is started using the boot processing of FIG. 8. When the main power for the integrated device is turned on, a first action is for processor 2101 to request data (boot code) from a predefined address. This external data request is passed to the data access control function 240, which identifies the request as a boot code request based on the address, and replaces all or part of the address with a substitute boot address contained in the control function's persistent storage 243. The modified request then continues to external memory 260. The substitute boot address is defined to point to a section of memory that contains code that has been previously encrypted using the master key set. This encrypted code 710 resides in a secure region of non-volatile memory 260. The encrypted code is returned to the access control unit which has been configured, based on the substitute boot address, to decrypt the returned data using the master key set. The decrypted (and secure) boot code is then returned to the processor for execution. The above steps are repeated as the processor executes the boot code sequence. FIG. 10 depicts a process for accepting code updates while the integrated system is running. This update check procedure 1000 starts with the system running in secure operation mode 1005. Based on a conditional event, such as an internal periodic time trigger or external notification, etc., the system checks 1010 to see if an update is available 1015. If "no", then the integrated system returns to the previous secure operation state and continues. If an update is available, then the update can be downloaded using secure network protocols 1020 as established in the industry. Alternatively, the update could be read from fixed media. The current level of software then determines whether it is authorized to make the update requested 1025. As described above, a given level of software can only be authenticated by software of equal or higher level of authority. If the current level of software is not authorized to make the update, then the software marks that an update is available and stores the update for use by the correct level of software when that level is next in control of the integrated device. Note that this generally requires storage in non-volatile memory so that the update is available for the next session. If the current level of software is authorized, then update procedure 1050 is followed. This procedure includes authenticating and decrypting the update using the processes described above for updating boot code. However, it is not required to encrypt the update with the master key set. Rather, a runtime key can be employed instead. Also, the version number for the update does not need to be stored in on-chip persistent memory, but could be encrypted and stored in external secure memory since it will be loaded by the boot code 1060. Next, the authentication values are updated for use in verifying the updated code before loading during system initialization. FIG. 11 depicts a process for managing keys and updating keys as required. In general, this process employs the data access control function as a means of migrating from one encryption form to another. Excessive usage of a secret key on a unique data block adds to the number of samples potentially available for cryptoanalysis. To protect a secret key, therefore, the number of samples employing the key should be limited. The limit depends upon the type of analysis an attacker may use and on the strength of the encryption algorithm, keys, and physical shielding employed. In today's technology, it is impractical to count accurately the number of times a secret key is used on unique data blocks. A close approximation to this counting, which would require the amount of storage per key set, would be to use a counter to record the number of write operations per key set, with the count being greater or equal to the number of unique samples created. As a less effective approximation, read and write operations could both be counted, but this would not mean that the count threshold could be increased. As shown for the key management procedure 1100, runtime keys are generated (as described above in connection with the boot procedure) for use during a single session or across sessions 1105. At the same time, a key usage counter is initialized with a given threshold. This counter can be implemented in software, but is more advantageously implemented in hardware as part of the access control function since the information needed to drive the counter is available. Further, the counter can be associated with the on-chip persistent storage so that the count is maintained between sessions, or software can be used to capture the result, encrypt it, and store the result when the system is turned off; and then reload the count when the system is started again. Control is optionally passed to the next level of software 1110. Note that the current level of software could alternatively continue and use the key directly. The key usage counter is incremented for each time the key is used to write encrypted data 1120. It could optionally be used to monitor read events but only in addition to write events, not in place of them. At some point, the key usage counter will exceed the threshold 1125. When this occurs, if the same level of software is operating as initially generated the key, then the key update procedure 1150 is called 1130. If the current level of software is different, then the system returns to the level of software that originally generated the key and from there calls the key update procedure 1135. The key update procedure 1150 employs the access control function to facilitate migrating from one key set to another. The access table of the access control function is first modified so that the current location of the data to be migrated is defined for decryption using the old key set, and the new location of the data is defined for encryption with the new key set 1155. Note that since the access table can be used to do address translation, the internal masters of the integrated system can see the current and new data locations as separate address ranges in memory, while the external requests after address translation could define both locations to be the same address range. This allows a given block to be read from its existing location, and then written back to the same location. Using the new access table definitions, the data is then read from its current location and written to its new location, effectively re-encrypting the data with the new key set 1160. The access table is then again modified so that the new location is defined for encryption and decryption with the new key set 1165, and all references to the old key set and associated data locations are deleted 1170. FIGS. 12A-12C illustrate a related technique for migrating data provided by an outside source from one encryption form to another. In this case, the outside encryption form could be a different algorithm and key set than the internal encryption approach. As shown in FIG. 12A, data is received, in this case through communication port 1200, from an outside source encrypted with an outside algorithm. The access control function 240 is defined to store this outside data directly in external memory 280 with no modifications. As shown in FIG. 12B, processor 2101 then reads the outside data into its cache in blocks, and decrypts a given block using software for the decryption. Once decrypted, the clear block is then written to external memory 280 as shown in FIG. 12C. However, the access control function is configured to encrypt the data using the internal algorithm and key set. The result of this process is that all data received from the outside is converted to an encrypted form that is unique and controlled by this one integrated device. This provides the advantage of preserving the security of encrypted data, while taking advantage of the hardware acceleration of the access control function. FIG. 13 depicts one embodiment of a process used to recover secure operation of an integrated system, after the integrated system is in use in the field and a tamper event has triggered the system to transition from secured state to a null state as described in one or more of the above-incorporated applications. As shown, by the boot procedure after being triggered 1300, the integrated system is turned on 1305 after the tamper event and the boot request is no longer redirected 1310. Unencrypted code is run from the standard boot address to initialize the system 1315. The initialized system operates with a reduced level of functionality such that access is no longer provided to secure data or applications 1325. Alternatively, an attempt to recover original integrated system functionality could be made 1320. If an integrated system owner chooses to attempt a full recovery, then the integrated system is taken to an authorized service center which comprises a secured physical location 1350. The service center uses debug tools (see FIG. 7A) to load unencrypted initialization code, which includes restoration boot code and also the manufacturer's public key 1355. The integrated system is then restarted to execute the initialization code, which will first generate a new master key set and then write the master key set into on-chip persistent storage associated with the data access control function 1360. The access control function is then configured to encrypt the restoration boot code using the master key set as described above in connection with FIG. 7A. The location of the new boot code is written into the substitute boot address field. The boot code then generates internally a public/private key pair, and securely stores the private key in non-volatile memory. The generated public key is encrypted using the manufacturer's public key (previously supplied with the initialization code), and returned to the service center, which then forwards it to the manufacturer 1365. At this point, the integrated system can be removed from the secured physical location 1350. The system is restarted and the restoration boot code is executed 1370. The initialized system will establish a secure network connection to the manufacturer 1375, and then using known techniques, the data and code needed to reestablish the original functionality of the system can be downloaded and installed on the integrated system 1380. To summarize, methods, systems and computer program products for initializing, maintaining, updating and recovering secure operation within an integrated system are described herein. These techniques employ a data access control function within the integrated system. The systems and computer program products may be broadly summarized as set forth below. Provided herein in one aspect is a system for facilitating secure operation of an integrated system having multiple levels of software. This system includes means for authenticating, by a current level of software, a next level of software of the multiple levels of software before passing control of the integrated system to the next level of software. A data access controller is also provided which includes means for limiting the ability of the next level of software to modify an operational characteristic of the integrated system. A system for initializing secure operation of an integrated system is also provided in another aspect. This system includes means for generating at least one key for the integrated system, and a data access control function within the integrated system. The data access control function receives initial code into the integrated system and encrypts the initial code using the at least one key. The initializing system further includes means for reinitializing the integrated system using the encrypted initial code. A system for migrating data encrypted using a first key set to data encrypted using a second key set is additionally provided. This system includes means for decrypting within the integrated system data encrypted using a first key set; and a data access control function within the integrated system, which includes means for re-encrypting the data using a second key set. In another aspect, a system for recovering integrated system functionality following a trigger event is described herein. This system includes means for automatically establishing a reduced level of functionality within the integrated system, as well as means for allowing full functional recovery of the integrated system through selective use of a designated recovery procedure. In another aspect, at least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine to perform a method of facilitating secure operation of an integrated system having multiple levels of software is provided. This method includes authenticating, by a current level of software, a next level of software of the multiple levels of software before passing control of the integrated system to the next level of software; and limiting ability of the next level of software to modify an operational characteristic of the integrated system, the limiting being implemented by a data access control function of the integrated system. In still another aspect, at least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine is provided to perform a method of initializing secure operation of an integrated system. The method includes generating at least one key for the integrated system; loading initial code into the integrated system, the loading including using the at least one key to encrypt the initial code via a data access control function of the integrated system; and reinitializing the integrated system using the encrypted initial code. In yet another aspect, at least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine is provided to perform a method of migrating data encrypted using a first key set to data encrypted using a second key set. The method includes: decrypting data encrypted using a first key set; and re-encrypting, by a data access control function within an integrated system, the data using a second key set. In a further aspect, at least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine is provided to perform a method of recovering integrated system functionality following a trigger event. This method includes: automatically establishing a reduced level of functionality within the integrated system; and allowing for full functional recovery of the integrated system by employing a selective recovery procedure. Those skilled in the art will note from the above discussion that the present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. The media has embodied therein, for instance, computer readable program code means for providing and facilitating the capabilities of the present invention. The article of manufacture can be included as a part of a computer system or sold separately. Additionally, at least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine to perform the capabilities of the present invention can be provided. The flow diagrams depicted herein are just examples. There may be many variations to these diagrams or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order, or steps may be added, deleted or modified. All of these variations are considered a part of the claimed invention. Although preferred embodiments have been depicted and described in detail herein, it will be apparent to those skilled in the relevant art that various modifications, additions, substitutions and the like can be made without departing from the spirit of the invention and these are therefore considered to be within the scope of the invention as defined in the following claims. The present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. The media has therein, for instance, computer readable program code means or logic (e.g., instructions, code, commands, etc.) to provide and facilitate the capabilities of the present invention. The article of manufacture can be included as a part of a computer system or sold separately. Additionally, at least one program storage device readable by a machine embodying at least one program of instructions executable by the machine to perform the capabilities of the present invention can be provided. The flow diagrams depicted herein are just examples. There may be many variations to these diagrams or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order, or steps may be added, deleted or modified. All of these variations are considered a part of the claimed invention. Although preferred embodiments have been depicted and described in detail herein, it will be apparent to those skilled in the relevant art that various modifications, additions, substitutions and the like can be made without departing from the spirit of the invention and these are therefore considered to be within the scope of the invention as defined in the following claims.
|
Same subclass Same class Consider this |
||||||||||
