The disclosure relates generally to on-chip encryption and decryption techniques.
In the area of information security, bad actors have proved to be very persistent in their attempts to circumvent protection schemes. For example, sophisticated malfeasors have resorted to observing and analyzing executable code while it is still resident on external (non-integrated) memory devices. Such techniques make it possible to insert malicious code in order to gain access to financial, safety-related, or security-related information. Encryption of executable code remains one of the most effective ways to protect the code from tampering. However, encryption and decryption take up computing resources on devices using them and can potentially slow down operating system and application programs of such devices.
While the appended claims set forth the features of the present techniques with particularity, these techniques may be best understood from the following detailed description taken in conjunction with the accompanying drawings of which:
The disclosure is generally directed to a method and apparatus for encrypting and decrypting data on an integrated circuit. In various embodiments, the apparatus includes an on-chip high performance bus bridge that transparently encrypts and decrypts data between the embedded microprocessor(s) and off-chip system memory. An embodiment of the apparatus is suited for execution of applications on secure systems and protecting software from unauthorized copying or alteration.
In an embodiment, the apparatus is optimized to the transactions generated by the processor's cache controller (e.g., optimized for cache line size) and optimized to the bus protocol being used. This provides code protection with minimal effect on system performance latency and throughput. The implementation of multiple cryptographic engines allows for encryption of a complete cache line while incurring only a single latency for the first cipher rounds to be completed.
According to an embodiment, a method for encrypting data on an integrated circuit involves receiving an instruction to write data to an address of a memory external to the IC; while the data is on the IC, encrypting the data based on a cryptographic function of the address and a nonce; and writing the encrypted data to the memory at the address.
According to an embodiment, a method for decrypting data involves reading encrypted data from an address of a memory external to the IC; generating a counter value based on a first nonce and the address; using the counter value to generate a first operand; using the first operand in a logical operation on the encrypted data to obtain a result; generating an initial value based on a second nonce and the address; using the initial value to generate a second operand; and using the second operand in a logical operation on the result to obtain decrypted data.
In an embodiment, an integrated circuit comprises: a counter value generator that generates a counter value based on a first nonce and a memory address; an initial vector generator that generates an initial vector based on a second nonce and the memory address; an encryption block that processes the counter value to generate a first operand; a linear feedback shift register that processes the initial vector in parallel with the encryption block processing the counter value to generate a second operand; logic elements that carry out logical operations on the data using the first operand and the second operand to generate encrypted data; and a bus that carries the encrypted data to the memory at the memory address, wherein the memory is outside of the integrated circuit.
In the architecture depicted in
Turning to
The processor complex 202 and the encryption bus bridge 216 communicate with one another via a second bus 218. The second bus 218 includes a write data path 218a, a read data path 218b, and an address and control path 218c. The first memory controller 204 and the processor complex 202 communicate with one another via a third bus 220. In an embodiment, one or more of the buses 207, 212, 218, and 220 are split transaction buses (e.g., that use the ARM AXI protocol).
Turning to
Continuing with
Still referring to
To read encrypted data back in from the volatile memory 102b, the IC 102 uses the read portion 216b. Turning to
In parallel with this process, the IV generator 306 generates an initial value based on the nonce that it receives from the configuration registers 301 and on the address that it receives from the counter value generator 302, provides the initial value to LFSRs 308a and 308b, which use the initial value to generate a split (i.e., the second operand).
The XOR block 322 XORs the incoming encrypted data to generate a result, which is passed on to the XOR block 324. The XOR block 324 XORs the result with the second operand, resulting in unencrypted data.
A process by which encrypted code is initially stored on the device 100 according to an embodiment will now be described. The process starts when the device 100 is in a manufacturing facility, at which a factory application image (e.g., an application that performs security for internet communications (such as IPSec) or financial transaction processing within a secure server) (“factory image”) is loaded into the non-volatile memory 104a via the test and download interfaces 110. At this point, the factory image is plaintext (unencrypted). Next, the IC 102 reads in the plaintext factory image, encrypts the plaintext factory image to create a ciphertext factory image, and writes the ciphertext factory image back out to the non-volatile memory 104a. Subsequently, (e.g., during normal operation of the device 100), the IC 102 carries out a system boot in which it initializes and keys the encryption bridge 216, copies the ciphertext factory image into temporary memory (e.g., cache memory), which it may do all at once or a certain number of bytes at a time, and decrypts the factory image (all at once or a certain number of bytes at a time) into plaintext. The IC 102 then (either subsequently or in parallel with reading in and decrypting the ciphertext) encrypts the plaintext (using the encryption bus bridge 216) and writes the resulting ciphertext out to the volatile memory 102b.
In an embodiment, the system boot in which the IC 102 initializes and keys the encryption bus bridge 216 occurs as follows: The IC 102 re-generates the key to decrypt the flash image using key material stored within the IC 102 or within devices in communication with the IC 102, such as one-time programmable (“OTP”) bits, values held in battery-backed memories, etc. The IC 102 re-generates the key for the flash image, decrypts the image, then stores the image to high-performance memory using the encryption bus bridge 216. Another possible implementation would be to share the encryption/decryption bus bridges between the two data flows, using different keys for each memory.
Turning to
At 410, the IV generator 306 receives the initial counter value from the cipher initial counter value generator 302, and generates a cipher output by encrypting the initial counter value. Examples of reference equations for transforms that could be used to accomplish this can be found in section 6.5 of the NIST Recommendation for Block Cipher Modes of Operation published by the Computer Security Division of the Information Technology Laboratory, which is part of the National Institute of Standards and Technology and are reproduced here:
At 412, the cipher blocks 304a-304d read the cipher key from the configuration registers 301 and generate ciphertext based on the initial counter value and the cipher key (for example, by using an AES algorithm). In parallel with the cipher blocks generating ciphertext, at 414 the LFSRs 308a and 308b generates an unrelated cipher split value based on the cipher output received from the IV generator 306. The LFSRs 308a and 308b advance for each cycle of the cipher round calculation, resulting in 10 advances to match the 10 rounds for the first ciphertext result. The actual code coming in from the cache memory 203 is received by the ingress buffer 318. At 416, the first XOR block 322 carries out an XOR operation on the value output by the cipher block 304a with the first 16 bytes of the data from the ingress buffer 318. At 418, the second XOR block 324 carries out an XOR operation on the split received from the LFSRs 308a and 308b (e.g., in a staggered manner) and the output of the first XOR block 322. The result is a ciphertext version of the data originally received by the ingress buffer 318. At 420, the egress buffer 326 writes out the ciphertext version of the data to the volatile memory 104b. The flow set forth in
It should be noted that the process described above in conjunction with
Turning to
Possible applications of the apparatus and method described herein include a network encryption device, where the device encrypts Ethernet packets at a trusted initiator on one end of a connection, traverses the untrusted internet as encrypted, and is decrypted at the trusted terminal device. For this application, the Ethernet ports on the device would include an additional encryption/decryption block dedicated to the Ethernet interfaces. Another possible application is a secure smart phone. Still another application is data-at-rest, where an external high density storage drive (local or remote) stores data in encrypted form. This would entail a storage fabric with dedicated encryption/decryption and with, for example, serial ATA, SAS, or PCIe connectivity.
It should be understood that the exemplary embodiments described herein should be considered in a descriptive sense only and not for purposes of limitation. Descriptions of features or aspects within each embodiment should typically be considered as available for other similar features or aspects in other embodiments. It will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from their spirit and scope as set forth in the following claims. For example, the actions described herein can be reordered in ways that will be apparent to those of skill in the art.
Number | Name | Date | Kind |
---|---|---|---|
6694430 | Zegelin et al. | Feb 2004 | B1 |
7127616 | Kaneko | Oct 2006 | B2 |
7203842 | Kean | Apr 2007 | B2 |
7303136 | Tsunoda et al. | Dec 2007 | B2 |
7328335 | Sundararajan et al. | Feb 2008 | B1 |
7333613 | Courcambeck et al. | Feb 2008 | B2 |
7774619 | Paaske et al. | Aug 2010 | B2 |
7975151 | Coenen | Jul 2011 | B2 |
8045712 | Daemen | Oct 2011 | B2 |
8181023 | Sugiyama | May 2012 | B2 |
8234504 | Cheung et al. | Jul 2012 | B2 |
8356188 | Kudelski | Jan 2013 | B2 |
8555082 | Bibikar et al. | Oct 2013 | B1 |
8560863 | Munguia | Oct 2013 | B2 |
8615799 | Henry et al. | Dec 2013 | B2 |
8930714 | Glew et al. | Jan 2015 | B2 |
9825920 | Yung | Nov 2017 | B1 |
9846788 | Oshida | Dec 2017 | B2 |
9846789 | Boivie et al. | Dec 2017 | B2 |
9881161 | Jang et al. | Jan 2018 | B2 |
9954681 | Case et al. | Apr 2018 | B2 |
9989043 | Lee et al. | Jun 2018 | B2 |
10025956 | Basak et al. | Jul 2018 | B2 |
10031861 | Chhabra et al. | Jul 2018 | B2 |
10169616 | Nertney | Jan 2019 | B1 |
10169618 | Van Antwerpen et al. | Jan 2019 | B2 |
20060059369 | Fayad et al. | Mar 2006 | A1 |
20100115286 | Hawkes | May 2010 | A1 |
20100299538 | Miller | Nov 2010 | A1 |
20110286596 | Gressel | Nov 2011 | A1 |
20130080790 | Pean | Mar 2013 | A1 |
20130117577 | Hars | May 2013 | A1 |
20130129079 | Swaminathan | May 2013 | A1 |
20130254906 | Kessler et al. | Sep 2013 | A1 |
20140310536 | Shacham | Oct 2014 | A1 |
20150074426 | Jean | Mar 2015 | A1 |
20160171249 | Circello | Jun 2016 | A1 |
20160283748 | Oh | Sep 2016 | A1 |
20160378687 | Durham | Dec 2016 | A1 |
20170230338 | Loprieno | Aug 2017 | A1 |
20180183581 | Elbaz et al. | Jun 2018 | A1 |
20180210858 | Chu | Jul 2018 | A1 |
20180294968 | Johnson | Oct 2018 | A1 |
20180365451 | Ndu | Dec 2018 | A1 |
20190050347 | Bolotov | Feb 2019 | A1 |
Number | Date | Country |
---|---|---|
3214567 | Sep 2017 | EP |
WO-2017139010 | Aug 2017 | WO |
Entry |
---|
Fletcher, C., Ascend: An Architecture for Performing Secure Computation on Encrypted Data. MS Dissertation, Massachusetts Institute of Technology, Cambridge, MA, 2013. |
Hou, F., et al., “Bus and memory protection through chain-generated and tree-verified IV for multiprocessors systems”, Future Generation Computer Systems, vol. 29, (2013), pp. 901-912. |
Number | Date | Country | |
---|---|---|---|
20210004495 A1 | Jan 2021 | US |