Dynamic Cryptography Key Expansion
By introducing a keystore and a key expansion engine in an integrated circuit system, combining cache and arbitrator, the challenges of virtual machine confidentiality protection and data encryption at rest in a virtualized server environment are solved, and multiple virtual machines are realized. Efficient encryption and decryption operations to prevent physical attacks and data snooping.
Patent Information
- Application Number
- CN201980049867.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-08-02
- Filing Date
- 2019-07-05
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2039-07-05
AI Technical Summary
In a virtualized server environment, traditional cryptography systems are difficult to effectively manage and protect the confidentiality of each virtual machine (VM), especially when facing physical attacks such as DRAM detection and snooping, and static data protection static cryptography systems. There are challenges in separate encryption of multiple file systems.
An integrated circuit system is designed, including memory cryptography circuits, using a keystore and a key expansion engine to generate an extended cryptography key by receiving a key identifier, combining cache and arbitrator management keys, Implement efficient encryption and decryption operations for multiple PSEs.
It realizes security management of multiple virtual machines, prevents unauthorized physical attacks and data snooping, improves the efficiency and flexibility of static data protection, and supports parallel operation and efficient key management of multiple PSEs.
Smart Images

Figure CN112514320B_ABST
Abstract
Description
[0001] Priority claim
[0002] This patent application claims priority to U.S. non-provisional patent application No. 16 / 053,626, filed on August 2, 2018, entitled “DYNAMIC CRYPTOGRAPHIC KEYEXPANSION,” which is assigned to the assignee of the present application and is hereby expressly incorporated herein by reference in its entirety. Background Art
[0003] Embodiments of the present disclosure relate generally to integrated circuits (ICs), and more particularly, but not exclusively, to IC-implemented cryptographic systems.
[0004] Cryptography is used to keep a user's private data safe from unauthorized viewers by, for example, encrypting user data intended to remain private (referred to as plaintext) into ciphertext that is incomprehensible to unauthorized viewers. The encoded ciphertext (presented as gibberish) can then be securely stored and / or transmitted. The user or an authorized viewer can then decrypt the ciphertext back to plaintext when needed. This encryption and decryption process allows users to create and access private data in plaintext form while preventing unauthorized access to the private data when it is stored and / or transmitted in ciphertext form.
[0005] Traditionally, encryption and decryption are performed by processing an input (plaintext or ciphertext, respectively) using a cryptographic key to generate a corresponding output (ciphertext or plaintext, respectively). Cryptographic systems that use the same key for both encryption and decryption are classified as symmetric cryptographic systems. One popular symmetric cryptographic system is the Advanced Encryption Standard (AES) described in Federal Information Standard (FIPS) Publication 197.
[0006] The cryptographic system can be used, for example, in a virtualized server environment that allows a single physical server platform to be shared by multiple virtual machines (VMs). Note that a single physical server that may include multiple processor cores on multiple IC devices is operated as a single platform. The physical platform supports a hypervisor program that manages the operation of multiple VMs on the physical platform. Note that a specific VM managed by a hypervisor can be actively running on the physical platform, or can be stored in a suspended state in memory. An active VM can access multiple different memory types and / or locations, some of which can be accessed by other VMs and / or other programs (such as, for example, the hypervisor itself) running on the platform. A VM can also access the memory contents of another VM or the memory contents of a hypervisor, provided that access control permits such access. In order to protect the confidentiality of each VM from physical attacks (such as DRAM probing / snooping), a portion (up to all) of the contents of the VM can be encrypted. For effective security, each VM should use a unique (i.e., exclusive) corresponding cryptographic key. Systems and methods to manage keys used to encrypt and / or decrypt VM code and data may be useful.
[0007] Relatedly, cryptographic systems may also be used, for example, to separately encrypt each of multiple file systems that share a memory storage system. Data-at-rest cryptographic systems may be used for such file protection, whether the files are stored on magnetic storage media, RAM, or elsewhere. An example of a cryptographic system commonly used for data-at-rest protection is AES in XEX-based adjustable codebook mode with ciphertext stealing (XTS). Similar systems and methods for managing cryptographic keys for storing shared file systems may also be useful.
[0008] Overview
[0009] A brief summary of one or more aspects is given below to provide a basic understanding of such aspects. This summary is not an exhaustive overview of all conceived aspects, and is neither intended to identify the key elements of all aspects nor to define the scope of all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to a more detailed description that will be presented later.
[0010] In one embodiment, an integrated circuit (IC) system includes a first processor, a first memory controller, and a first random access memory (RAM). The first memory controller includes a memory cryptography circuit connected to the first processor and the first RAM. The memory cryptography circuit includes a key storehouse. The key storehouse includes a key expansion engine. The key storehouse is configured to receive a key identifier and provide a first key expansion input to the key expansion engine based on the key identifier. The key expansion engine is configured to perform a key expansion operation on the first key expansion input to generate an expanded cryptographic key.
[0011] In another embodiment, a method for an integrated circuit (IC) system having a first processor, a first memory controller, and a first random access memory (RAM), wherein the first memory controller includes a memory cryptography circuit connected to the first processor and the first RAM, the memory cryptography circuit having a key store, and the key store having a key expansion engine, the method comprising (a) receiving a key identifier by the key store; (b) providing a first key expansion input to the key expansion engine based on the key identifier by the key store; and (c) performing a key expansion operation on the first key expansion input by the key expansion engine to generate an expanded cryptographic key.
[0012] In yet another embodiment, a non-transitory computer-readable medium having stored thereon instructions for causing an IC system to perform a method, the IC system including a first processor, a first memory controller, and a first random access memory (RAM), wherein the first memory controller includes a memory cryptography circuit connected to the first processor and the first RAM, the memory cryptography circuit including a key store, and the key store including a key expansion engine. The method includes: receiving a key identifier by the key store; providing a first key expansion input to the key expansion engine by the key store based on the key identifier; and performing a key expansion operation on the first key expansion input by the key expansion engine to generate an expanded cryptographic key.
[0013] To achieve the foregoing and related ends, the one or more aspects include the features fully described below and particularly pointed out in the claims. The following description and drawings set forth in detail certain illustrative features of the one or more aspects. However, these features are merely indicative of several of the various ways in which the principles of the various aspects may be employed, and this description is intended to cover all such aspects and their equivalents. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The disclosed aspects will be described below in conjunction with the accompanying drawings, which are provided to illustrate rather than limit the disclosed aspects, wherein like reference numerals designate like elements, and wherein:
[0016] Figure 1 is a simplified schematic diagram of a computer system according to one embodiment of the present disclosure.
[0017] Figure 2 yes Figure 1 A simplified schematic diagram of a detailed portion of a computer system.
[0018] Figure 3 yes Figure 2 A simplified schematic diagram of the memory cryptography circuit.
[0019] Figure 4 is based on Figure 2 A schematic representation of exemplary data packets of one embodiment of a computer system.
[0020] Figure 5 is a flow diagram of a process according to one embodiment.
[0021] Figure 6 is a flow diagram of a process according to one embodiment.
[0022] Figure 7 is a simplified schematic diagram of a key store according to an alternative embodiment.
[0023] Figure 8 According to an embodiment of the present disclosure, Figure 7 Flowchart of the keystore process.
[0024] Fig. 9 is a simplified schematic diagram of a key store according to another alternative embodiment.
[0025] Fig.10 According to an embodiment of the present disclosure, Fig. 9 Flowchart of the keystore process.
[0026] Detailed Description
[0027] Various embodiments are now described with reference to the accompanying drawings. In the following description, numerous specific details are set forth for explanation purposes to provide a thorough understanding of one or more embodiments. However, it is apparent that such aspects may be practiced without these specific details. In addition, the term "component" as used herein may be one of the parts constituting a system, may be hardware, firmware and / or software stored on a computer-readable medium, and may be divided into other components.
[0028] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements discussed without departing from the scope of the present disclosure. Various examples may appropriately omit, replace, or add various procedures or components. For example, the described method may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to some examples may be combined in other examples. Note that, for ease of reference and increased clarity, only one instance of a plurality of substantially identical elements may be individually marked in each of the drawings.
[0029] In some embodiments, each VM runs in a corresponding protected software environment (PSE). The PSE is managed by the PSE management software. Note that cryptographic protection can be applied to any arbitrary software layer (e.g., firmware, hypervisor, VM / kernel, driver, application, process, subprocess, thread, etc.). Any such software can work inside the PSE. The hypervisor will usually be the PSE management software for the PSE that encapsulates the VM, and the OS kernel will usually be the PSE management software for the PSE that encapsulates the application. In general, the PSE management software role will usually be performed by software executed at the next higher privilege level from the software contained in the PSE.
[0030] Note that some cryptographic systems use unique key seeds to generate corresponding cryptographic keys for being associated with corresponding PSEs. For example, a 128-bit key seed can be used to generate a 256-bit cryptographic key (with a 128-bit security strength) by the following operations: providing the 128-bit key seed to a key expansion engine, which then outputs a corresponding 256-bit cryptographic key. Note that a cryptographic key can be a composite key including two or more subkeys. For example, a 256-bit cryptographic key can include two different 128-bit subkeys, where the overall security strength is 128 bits. These two subkeys can then be used in cryptographic systems (such as, for example, AES-XEX and AES-XTS) that require two different keys for cryptographic processing.
[0031] Some cryptographic systems use a shared or global key seed in combination with a one-time number to generate a corresponding cryptographic key for being associated with a corresponding PSE. For example, a 128-bit shared key seed can be used in combination with a unique instance counter to generate a unique 128-bit or 256-bit cryptographic key for a corresponding PSE. The instance counter is a counter that is incremented for each new PSE for which a cryptographic key is generated, and therefore should never be repeated. In general, a cryptographic key generated by a key expansion, derivation, or similar function is referred to herein as an extended cryptographic key. As used herein, a key seed may refer to any data input into a key expansion or key derivation function and / or a corresponding key expansion or key derivation module.
[0032] Embodiments of the present disclosure include systems and methods for efficient management of a first plurality of cryptographic keys. Cryptographic keys may be associated with a first plurality of corresponding PSEs (e.g., encapsulated virtual machines) supervised by PSE management software (e.g., a hypervisor) that runs on a computer system and is configured to supervise a superset of the first plurality of PSEs. The computer system stores at least currently unused keys and / or key seeds of the superset in encrypted form in a relatively remote, cheap, large, and slow memory (e.g., DDR SDRAM), and manages keys in the first plurality of keys using a key expansion engine in conjunction with a relatively close, fast, small, and expensive memory (e.g., on-chip SRAM). Note that, in addition to the currently unused keys and / or key seeds of the superset, the relatively remote memory may also store copies of currently used keys and / or key seeds of the first plurality of PSEs.
[0033] In some embodiments, the computer system includes one or more processors and is capable of parallel processing, and the computer system is configured to support secure and simultaneous (i.e., parallel) operation of multiple PSEs, wherein the multiple PSEs have corresponding multiple cryptographic keys, in other words, each PSE is associated with a corresponding cryptographic key. In addition, the computer system has a random access memory shared by multiple PSEs. The computer system has a memory cryptography circuit (MCC) connected to the one or more processors and the shared memory, wherein the MCC includes a cryptographic engine and a key library for managing a subset of the multiple cryptographic keys. Note that the term cryptographic engine can refer to an encryption engine, a decryption engine, or a combination engine.
[0034] During data transfer operations between the processor and the shared memory (e.g., when fetching processor instructions, data reads, and data writes—generally referred to herein as memory transaction requests), the cryptographic engine uses the corresponding cryptographic key provided by the keystore to encrypt or decrypt the transferred data (e.g., processor instructions). Implementing the MCC in hardware or firmware and managing the keys that may be used in the keystore helps allow cryptographic operations to be performed quickly and efficiently on the transferred data.
[0035] Figure 1 1 is a simplified schematic diagram of a computer system 100 according to one embodiment of the present disclosure. The computer system 100 includes a system on a chip (SoC) 101 and one or more SoC external random access memory (RAM) modules 102, which can be, for example, double data rate (DDR) synchronous dynamic RAM (SDRAM) or any other suitable RAM. The computer system 100 also includes a user interface 103 and a network interface 104. Note that, as will be understood by one of ordinary skill in the art, the computer system 100 and any of its components may further include any of a variety of suitable additional components (not shown), the description of which is not necessary for understanding the embodiment.
[0036] Figure 2 yes Figure 1 1 is a simplified schematic diagram of a detailed portion of a computer system 100 including an SoC 101 and a RAM module 102. The SoC 101 includes one or more central processing unit (CPU) cores 205, each of which can be a single-threaded or multi-threaded processor. Each CPU core 205 may include L1 and L2 caches (not shown). The SoC 101 may further include one or more L3 caches 206, one or more memory controllers 207, one or more physical layer (PHY) interfaces 208, and a system bus 209. The SoC 101 may further include a key management unit (KMU) 210, which may be implemented as a discrete stand-alone module (as shown), as a distributed module within two or more CPU cores 205, or in any suitable manner. The system bus 209 interconnects the CPU cores 205, the L3 caches 206, the KMU 210, and the memory controllers 207, along with any other peripherals that may be included within the SoC 101.
[0037] The memory controller 207 includes a memory cryptography circuit (MCC) 211, and may further include an interface module (not shown) (such as, for example, a bus interface) for interfacing between the MCC 211 and other components of the SoC 101. The memory controller 207 is communicatively coupled to a corresponding PHY interface 208, which in turn is communicatively coupled to a corresponding external RAM module 102.
[0038] The computer system 100 may support the management of multiple PSEs by the PSE management software, wherein subsets of the multiple PSEs may be run simultaneously as parallel processes. The computer system 100 supports parallel processing by multiple CPU cores 205. In some implementations, one or more of the CPU cores 205 may be configured to execute multiple threads in parallel. Note that in some alternative embodiments, the computer system 100 may have only one CPU core 205, however, the CPU core 205 supports multi-threaded processing and therefore supports parallel processing. Further note that in some alternative embodiments, the computer system 100 may include two or more SoCs, which are coherently connected via a chip-to-chip interface to form a multi-socket system.
[0039] The computer system 100 may support a large number of PSEs, each associated with a unique cryptographic key seed and its corresponding extended key, which allows the CPU cores 205 to securely share the RAM module 102 and allows the PSEs to operate securely without being snooped by other processes (such as, for example, other PSEs, PSE management software), and potential hacker attackers. The SoC 101 may be designed to use time slicing to support nearly simultaneous execution of several PSEs operating, the number of PSEs being greater than the number of parallel processes that can be simultaneously supported by the SoC 101 on the corresponding CPU core 205, but less than any larger total number of PSEs that can be supported by the computer system 100. As will be explained in more detail below, the KMU 210 manages the cryptographic key seeds and their corresponding key identifiers (KIDs) for the PSEs supported by the computer system 100. Note that the KIDs may also be viewed as PSE tags.
[0040] As will be explained in more detail below, in operation, when a first PSE running on a first CPU core 205 needs to write a block of data to RAM 102, the block of data is encrypted by the MC circuit 211 using a first extended cryptographic key that uniquely corresponds to the first PSE. The corresponding encrypted block of data is then written to the first RAM module 102. When the first PSE needs to read a block of data from the RAM module 102, the retrieved block of data encrypted on the RAM module 102 is decrypted by the MC circuit 211 using the first extended cryptographic key. The corresponding decrypted block of data is then transmitted to the CPU core 205 on which the first PSE is running. Note that writing to and reading from the RAM module 102 may be performed as part of a routine instruction execution by the CPU core 205.
[0041] Figure 3 yes Figure 2 3. A simplified schematic diagram of an embodiment of the memory cryptography circuit 211 of the MC circuit 211. The MC circuit 211 includes an encryption engine 312, a decryption engine 313, and a key store 314. The encryption engine 312 is a circuit configured to receive a plaintext block, for example, from the CPU core 205, and an extended cryptography key from the key store 314, encrypt the plaintext using an encryption algorithm (such as, for example, AES using an appropriate cryptographic operation mode) using the extended cryptography key, and output the corresponding ciphertext block, for example, to the RAM module 102. The decryption engine 313 is a circuit configured to receive a ciphertext block, for example, from the RAM module 102, and an extended cryptography key from the key store 314, decrypt the ciphertext using a decryption algorithm (such as, for example, AES using an appropriate cryptographic operation mode) using the extended cryptography key, and output the corresponding plaintext block, for example, to the CPU core 205.
[0042] The key storehouse 314 includes a seed storehouse 315, an expansion engine 316, a local cache 317, and an arbitrator 318. The seed storehouse 315 may be, for example, an SRAM module, a register file, or a similar fast access RAM configured to addressably store and update multiple key seeds using their corresponding KIDs. Similarly, the cache 317 may be an SRAM module or a similar fast access RAM configured to store and update a smaller number of multiple extended keys and their corresponding KIDs. In other words, the cache 317 may support the management of an associative array. The cache 317 may include a content addressable memory (CAM) for finding an extended key by its corresponding KID. The expansion engine 316 may receive one or more key seeds from the seed storehouse 315 and output a corresponding extended key, which is then provided to the arbitrator 318 (to possibly provide to the encryption engine 312 or the decryption engine 313) and the cache 317.
[0043] The seed repository 315 may be configured to store a relatively large number of multiple key seeds indexed by their corresponding KIDs. The KMU 210 is configured to manage the storage of key seeds and KIDs in the seed repository 315. For example, if the number of PSEs supported by the computer system 100 is greater than the number of key seeds that can be stored by the seed repository 315, the KMU 210 determines which PSEs' key seeds and their corresponding KIDs are to be stored by the seed repository 315.
[0044] The seed repository 315 is configured to receive key seeds and / or control commands from the KMU 210 via a configuration interface. The KMU 210 may provide, for example, a 128-bit key seed of the PSE and the KID of the PSE. In response, the seed repository 315 may store the received key seed at the seed repository address indicated by the KID. The seed repository 315 is also configured to output the seed stored at the key repository address indicated by the KID to the expansion engine 316 in response to receiving the KID as part of a memory transaction request (e.g., as a result of a cache miss). Note that both read and write memory transaction requests to the RAM 102 are transmitted via the system bus 209 and include the KID corresponding to the requesting PSE.
[0045] Note that in addition to being carried on the system bus 209, the KID may also be stored in the L1 / L2 / L3 cache, where each cache line carries the KID along with the memory address and data. As mentioned elsewhere herein, the KID is an index used to obtain the corresponding extended cryptographic key for the requesting PSE from the keystore 314.
[0046] When a memory transaction request is received by MC circuit 211, the KID is provided to keystore 314. The KID is provided to cache 317 and seedstore 315. If cache 317 has a valid record for the KID (in other words, if there is a cache hit, or the KID matches), cache 317 provides the corresponding extended key to arbitrator 318, which in turn provides the extended key as an output of keystore 314 to cryptographic engines 312 and 313 for corresponding cryptographic processing (i.e., encryption or decryption using the extended key).
[0047] If the cache 317 does not have a valid record for the KID (in other words, if there is a cache miss, or the KID does not match), the seed store 315 looks up the KID and provides the corresponding key seed located at the address corresponding to the KID to the expansion engine 316. The expansion engine 316 then uses the received key seed to perform a key expansion function and outputs the corresponding expanded key to the arbitrator 318 and the cache 317. The arbitrator 318 provides the expanded key to the cryptographic engines 312 and 313. At the same time, the expanded key and its corresponding KID are input into the cache 317 (to update the cache 317), thereby possibly retrieving another entry from the cache 317.
[0048] In some alternative embodiments, the keystore 314 lacks a cache 317 and an arbiter 318, and as a result, handles the memory transaction requests as if they all result in cache misses. Therefore, whenever a memory transaction request is received by the MC circuit 211, the seedstore 315 provides the key seed corresponding to the received KID to the expansion engine 316, which in turn performs key expansion on the key seed to generate a corresponding expanded key to provide to the cryptographic engines 312 and 313.
[0049] Note that processing of a read request from CPU core 205 may involve buffering of the corresponding extended key by MC circuit 211 until the corresponding ciphertext block located at the requested memory address is retrieved from RAM 102, at which point the ciphertext block and extended key are provided to the decryption engine 313 for decryption.
[0050] In one example implementation, the SoC 101 may include sixteen single-threaded CPU cores 205, thereby allowing sixteen unique PSEs to run simultaneously. The PSE management software may be a program that runs distributed across one, some, or all of the CPU cores 205. The SoC 101 may be configured to support thousands of PSEs and support time slicing of up to 128 PSEs at any one time. In other words, during normal operation, thousands of PSEs are suspended (in other words, semi-dormant), while dozens of PSEs may be executing through time slices sharing the 16 CPU cores 205 of the SoC 101. The cache 317 may be configured to store 128 extended keys, and the seed library 315 may be configured to store 4,096 key seeds, where the address of a key seed in the seed library 315 is the KID of the key seed. Thus, the KID may be a 12-bit number (e.g., 2 12 =4,096). In an alternative embodiment, cache 317 may be configured to store only 32 extended keys, which would likely require more frequent cache evictions but provide cost and power savings.
[0051] If the computer system 100 supports more than 4,096 PSEs, the KMU 210 can manage key seeds for excluded PSEs that are operationally dormant and do not have corresponding KIDs. If the computer system 100 determines that a dormant PSE is to be activated, the KMU 210 assigns a KID to the PSE and provides the KID and corresponding key seed to the seed library 315, thereby potentially reclaiming the key seed of another PSE from the seed library 315. The KMU 210 appropriately handles the situation where the reclaimed PSE has a corresponding encryption block remaining in the RAM module 102 at the time of revocation. The KMU 210 can store the key seeds of the excluded / dormant PSEs (as well as copies of the key seeds of the included / semi-dormant and / or active PSEs) in encrypted form in a relatively remote, cheap, large and slow memory (e.g., DDR SDRAM) and retrieve them on demand.
[0052] Figure 4 is based on Figure 2 Schematic representation of an exemplary data packet 400 of one embodiment of the computer system 100 of FIG. Data packet 400 includes a data payload 401, a KID 402, and a header 403. In one example implementation, (i) the data payload field 401 is at least 128 bits to be able to contain an entire 128-bit standard AES block, and (ii) the KID field is at least 12 bits to support addressing 4,096 cryptographic key locations in the key store 314. Header 403 may include any suitable header information, such as, for example, attribute information used to transmit data packet 400 on system bus 209 (e.g., memory address, read / write indicator, source address for routing responses, etc.). Note that a read request packet may include only KID 402 and header 403, including a memory address, but not a payload. Relatedly, a read response packet may include only data payload 401 and header 403, but not a KID. It is further noted that, when used, KID 402 need not be a dedicated segment of a data packet, and may be, for example, part of a header and / or used for purposes other than identifying the location of a key in seedstore 315 .
[0053] Figure 55 is a flow chart of a process 500 according to one embodiment. The process 500 begins when a determination is made by a write module that a block of data needs to be written to the RAM module 102 (step 501). The write determination may be made, for example, by a first PSE executing on a first CPU 205 that needs to write the block directly to memory or by a first cache that needs to evict a cache line. Note that, in general, write requests from a PSE executing on a CPU 205 may be cached, and when in the cache hierarchy of the SoC 101, the data block is associated with the KID of the PSE. The write module provides the corresponding data packet 400 to the MC circuit 211 via the system bus 209, the data packet 400 including the plaintext data block in the data payload 401 and the KID corresponding to the first PSE in the KID field 402 (step 502). Note that the data payload 401 may include suffix and / or prefix padding bits along with the data block. The data payload 401 is provided to the encryption engine 312 and the KID is provided to the keystore 314 and cache 317 (step 503).
[0054] The cache 317 searches for the KID (step 504). If the KID is found in the cache 317 (i.e., a cache hit in step 504), the cache 317 provides the corresponding extended key to the encryption engine via the arbiter 318 (step 505). If the KID is not found in the cache 317 (i.e., a cache miss in step 504), the seed library 315 looks up the KID to find the corresponding key seed (step 506). The seed library 315 then provides the corresponding key seed to the expansion engine 316 (step 507). The expansion engine 316 uses the received key seed to perform an expansion function to generate an extended key (step 508). The expansion engine 316 provides the resulting extended key to the cache 317 and to the encryption engine 312 via the arbiter 318 (step 509). The cache 317 stores the extended key and the corresponding KID, which may require reclaiming the least used, randomly selected, or otherwise selected cache line. After providing the extended key to the encryption engine in step 505 or step 509, the encryption engine 312 uses the received extended key to perform an encryption algorithm (e.g., AES encryption) on the received plaintext data, and outputs a corresponding ciphertext data block provided to the RAM module 102 (step 510).
[0055] Figure 66 is a flow chart of a process 600 according to one embodiment. The process 600 begins when the memory controller 207 receives a data packet via a bus interface and determines that a data block needs to be read (i.e., retrieved) from the RAM module 102 using an address and a KID provided in the data packet (step 601). The data packet may be received from, for example, the CPU core 205, the L2 cache, or the L3 cache 206. The memory controller 207 initiates reading of the corresponding data block from the RAM module 102 (step 602), and in parallel obtains the corresponding extended key (steps 604, 605, and / or 606). Obtaining the extended key includes: determining whether the KID is in the cache 317 (step 604); if so, obtaining the extended key from the cache 317 (step 606); if not, looking up the KID in the seed library 315 to locate the corresponding key seed, providing the corresponding seed to the expansion engine 316, and performing an expansion function using the key seed to obtain the extended key (step 605). The expansion engine 316 provides the resulting expanded key to the cache 317 and buffers the expanded key until the MC circuit 211 receives the requested encrypted data block from the RAM module 102 (step 603). The cache 317 stores the expanded key and the corresponding KID, which may require retrieving the least used, randomly selected or otherwise selected cache line.
[0056] The decryption engine 313 is provided with (1) the retrieved encrypted data block and (2) the extended key (step 607). The decryption engine 313 uses the received extended key to perform a decryption algorithm (e.g., AES decryption) on the received encrypted data block and outputs a corresponding plaintext data block (step 608). The memory controller 207 provides a response data packet containing the plaintext data block for routing back to the requesting CPU core or cache (step 609).
[0057] Figure 7 is a simplified schematic diagram of a keystore 714 according to an alternative embodiment. A keystore 714 may be used instead of Figure 3The key storehouse 314 of the present invention is a key storehouse 314 of the present invention. The key storehouse 714 includes a local cache 717, an expansion engine 716, a counter storehouse 721, a global seed storage 720, and an arbitrator 718. The cache 717 and the arbitrator 718 operate in substantially the same manner as the cache 317 and the arbitrator 318 of the key storehouse 314, respectively. A computer system (not shown) incorporated into the key storehouse 714 uses a shared key seed stored in the global seed storehouse 720 and a unique counter value for each PSE to generate a corresponding extended key for the PSE. As described above, when a new PSE is instantiated, it receives a new incrementing counter value used as a one-time number. The corresponding KMU (not shown) manages the maintenance of the counter values and their association with the corresponding PSE, and updates the counter storehouse 721 accordingly.
[0058] Figure 8 According to an embodiment of the present disclosure, Figure 7 Flowchart of process 800 of key storehouse 714 of the present invention. When key storehouse 714 receives KID together with memory access request (step 801), cache 717 searches for KID (802). If the KID is found in cache 717, the corresponding extended key is provided to arbitrator 718 to be provided as output of key storehouse 714 (step 803). If the KID is not found in cache 717 (step 802), counter storehouse searches for KID (step 804) to obtain the corresponding counter value, which is provided to expansion engine 716 (step 805). Note that the counter value is a key extension value based on KID. Expansion engine 716 then uses the counter value and the global seed obtained from global seed storehouse 720 to perform an extension operation to generate an extended cryptographic key (step 806). Expansion engine 716 provides the obtained extended key to key cache 717, which stores the extended key and the corresponding KID (step 807). It is worth noting that this cache update may require reclaiming an existing cache line storing the KID and the corresponding extended key (step 807). The extended key is also provided to the arbitrator 718 to be provided as an output of the keystore 714 (step 803).
[0059] Fig. 9 is a simplified schematic diagram of a key store 914 according to another alternative embodiment. A key store 914 may be used instead of Figure 3The key store 914 includes a local cache 917, an expansion engine 916, a global seed store 920, and an arbitrator 918. The cache 917 and the arbitrator 918 operate in substantially the same manner as the cache 317 and the arbitrator 318 of the key store 314, respectively. A computer system (not shown) incorporated into the key store 914 uses the shared key seed stored in the global seed store 920 and the KID of each PSE to generate a corresponding extended key for the PSE. A corresponding KMU (not shown) can manage the association of each KID with a corresponding PSE.
[0060] Fig.10 According to an embodiment of the present disclosure, Fig. 9 Flowchart of process 1000 of key store 914 of the present invention. When key store 914 receives a KID together with a memory access request (step 1001), cache 917 looks up the KID (1002). If the KID is found in cache 917, the corresponding extended key is provided to arbitrator 918 to be provided as an output of key store 914 (step 1003). If the KID is not found in cache 917 (step 1002), expansion engine 916 uses the KID and the global seed obtained from global seed library 920 to perform an expansion operation to generate an extended cryptographic key (step 1004). Note that the counter value is a key expansion value based on the KID. Expansion engine 916 provides the obtained extended key to key cache 917, which stores the extended key and the corresponding KID (step 1005). It is worth noting that the cache update may require the eviction of an existing cache line storing the KID and the corresponding extended key (step 1005). The expanded key is also provided to the arbitrator 918 to be provided as an output of the keystore 914 (step 1003).
[0061] In which a 128-bit seed is used to generate a 256-bit extended key Figure 3 In one exemplary implementation of the MC circuit 211 of FIG. 1 , the key store 314 can simulate the storage of 4,096 256-bit keys using slightly more than half the storage space required to actually store 4,096 256-bit keys. In the embodiment in which the instance counter is stored in the counter store 721 addressed by the KID and the instance counter is used in conjunction with the global key seed to derive the key Figure 7In an exemplary implementation of the keystore 714 of FIG. 5 , the keystore 714 can emulate the storage of 4,096 256-bit keys using slightly more than one-fifth of the storage space required to actually store 4,096 256-bit keys - assuming a 56-bit counter, this would allow a new and unique counter value to be provided every 10 nanoseconds for over 20 years. Note that when a PSE is instantiated, the PSE acquires a new counter value. In a system where the total number of keys supported is limited to the number of possible values of the KID (e.g., 4,096 keys for a total of 12-bit KIDs), the PSE may be configured to store 4,096 256-bit keys using a 56-bit counter. Fig. 9 In an exemplary implementation of the keystore 914, the KID can be used directly with the global key seed to derive keys, and the keystore 914 can simulate the storage of 4,096 keys using only the storage space of the local cache 917 and the global seed 920.
[0062] It should be noted that the above-described memory cryptography circuitry can be used in systems other than computer system 100. For example, MC circuitry 211 can be used to manage encryption of so-called static data stored by multiple file systems on a shared non-volatile memory, where each file system has a corresponding key seed and an extended key similar to the above-described PSE. The memory cryptography circuitry can be used in any suitable system that manages a relatively large number of multiple clients and corresponding cryptographic seeds. In addition, it is noted that embodiments of the present disclosure are not limited to systems for running multiple PSEs. On the contrary, in general, MC circuitry can be used in any system that uses multiple extended cryptographic keys with corresponding key seeds, which can be extended to extended cryptographic keys when necessary.
[0063] General terms may be used to describe the steps of the above-described read process 500 and write process 600. Determining that data needs to be written or read is determining that data needs to be transferred between the first PSE and the RAM module 102. Ciphertext and plaintext are data. Encryption and decryption are cryptographic operations that take a first data block and output a first cryptographic corresponding data block.
[0064] The above detailed description set forth above in conjunction with the accompanying drawings describes examples and does not represent the only examples that can be implemented or fall within the scope of the claims. The term "example" when used in this description means "used as an example, instance, or illustration", and does not mean "better than" or "better than other examples". This detailed description includes specific details to provide an understanding of the described techniques. However, these techniques can be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form to avoid obscuring the concepts of the described examples.
[0065] Information and signals may be represented using any of a variety of different techniques and technologies. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be mentioned throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or magnetic particles, optical fields or optical particles, computer executable codes or instructions stored on computer-readable media, or any combination thereof.
[0066] The various illustrative blocks and components described in conjunction with the disclosure herein may be implemented or executed with a specially programmed device, such as, but not limited to, a processor designed to perform the functions described herein, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The specially programmed processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The specially programmed processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
[0067] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, each function may be stored as one or more instructions or codes on a non-transient computer-readable medium or transmitted by it. Other examples and implementations fall within the scope and spirit of the present disclosure and the appended claims. For example, due to the nature of software, each of the above functions may be implemented using software, hardware, firmware, hard wiring, or any combination thereof executed by a specially programmed processor. The features that implement the functions may also be physically located in various locations, including being distributed so that the various parts of the functions are implemented at different physical locations. In addition, as used herein (including in the claims), the "or" used in the enumeration of items followed by "at least one of" indicates a disjunctive enumeration, so that, for example, the enumeration of "at least one of A, B, or C" represents A or B or C or AB or AC or BC or ABC (i.e., A and B and C).
[0068] Computer-readable media include both computer storage media and communication media, including any media that facilitates a computer program to be transferred from one place to another. Storage media can be any available media that can be accessed by a general or special-purpose computer. As an example and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, or any other media that can be used to carry or store the desired program code means in the form of instructions or data structures and can be accessed by a general or special-purpose computer or a general or special-purpose processor. Any connection is also properly referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, wherein disk usually reproduces data magnetically, while disc reproduces data optically with laser. Combinations of the above media are also included in the scope of computer-readable media.
[0069] The previous description of the disclosure is provided to enable those skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the common principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. In addition, although the elements of the described aspects may be described or claimed in the singular, the plural is also contemplated unless explicitly stated to be limited to the singular. In addition, all or part of any aspect may be used in conjunction with all or part of any other party, unless otherwise stated. Thus, the disclosure is not limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A memory cryptography circuit, the memory cryptography circuit comprising a key store and a key expansion engine, wherein: The memory cryptography circuit is connected to the processor and a random access memory (RAM); The keystore is configured as: receiving a key identifier; as well as providing a first key expansion input to the key expansion engine based on the key identifier; The key expansion engine is configured to perform a key expansion operation on the first key expansion input to generate a stretched cryptography key; The memory cryptography circuit includes a first cryptography engine configured to receive the extended cryptography key and an input block; The first cryptographic engine is configured to process the input block using the extended cryptographic key to output a corresponding output block; and The memory cryptography circuit is configured to perform one of: receiving the input block from the RAM and transmitting the output block to the RAM; The input block is one of a plaintext block and a ciphertext block; If the input block is a plaintext block, then: The corresponding output block is a ciphertext block; and The first cryptographic engine is an encryption engine configured to: receiving the extended cryptography key and the input block; as well as encrypting the input block using the extended cryptography key to output a corresponding output block for transfer to the RAM; and If the input block is a ciphertext block, then: The ciphertext block is received from the RAM; The corresponding output block is a plaintext block; and The first cryptographic engine is a decryption engine, the decryption engine being configured to: receiving the extended cryptography key and the input block; and The input block is decrypted using the extended cryptography key to output a corresponding output block.
2. The circuit of claim 1, wherein: The keystore further comprises a local cache configured to: storing a plurality of key identifiers and corresponding extended cryptography keys; as well as looking up the received key identifier; If the received key identifier is matched by the local cache, the local cache is configured to subsequently provide the corresponding extended cryptography key to the first cryptography engine in response to matching the received key identifier; If the received key identifier is not matched by the local cache, the key store is configured to subsequently update the local cache using the received key identifier and a corresponding extended cryptographic key generated by the key expansion engine, wherein the key expansion engine is configured to provide the corresponding extended cryptographic key to both the local cache and the first cryptographic engine.
3. The circuit of claim 1, wherein: The keystore further comprises a seedstore, wherein the seedstore is configured to: storing a plurality of key seeds indexed by their corresponding key identifiers; and In response to receiving the key identifier, a corresponding key seed is provided to the key expansion engine as the first key expansion input.
4. The circuit of claim 1, wherein: The key store includes a counter store, and the counter store is configured to: storing a plurality of counter values indexed by their corresponding key identifiers; providing a corresponding counter value as the first key expansion input to the key expansion engine in response to receiving a key identifier; The key expansion engine is configured to perform the key expansion operation on the first key expansion input and a global seed value to generate the expanded cryptography key.
5. The circuit of claim 1, wherein: The first key expansion input is the received key identifier; The key expansion engine is configured to perform the key expansion operation on the first key expansion input and a global seed value to generate the expanded cryptography key.
6. The circuit of claim 2, wherein each of the plurality of key identifiers and corresponding extended cryptography keys corresponds to a different protected software environment, the protected software environment comprising at least one of a virtual machine, a driver, an application, a subprocess, and a thread.
7. The circuit of claim 2, wherein the local cache comprises static random access memory (SRAM).
8. A method for an integrated circuit system, the integrated circuit system comprising a memory cryptography circuit, the memory cryptography circuit connected to a processor and a random access memory (RAM), the memory cryptography circuit comprising a key store, a key expansion engine, and a first cryptography engine, the method comprising: receiving, by the key store, a key identifier; as well as providing, by the key store, a first key expansion input to the key expansion engine based on the key identifier; performing, by the key expansion engine, a key expansion operation on the first key expansion input to generate an expanded cryptography key; receiving, by the first cryptographic engine, the extended cryptographic key and an input block; processing, by the first cryptographic engine, an input block using the extended cryptographic key; as well as outputting, by the first cryptography engine, a corresponding output block, wherein the memory cryptography circuit is configured to perform one of: receiving the input block from the RAM and transmitting the output block to the RAM; The input block is one of a plaintext block and a ciphertext block; If the input block is a plaintext block, then: The corresponding output block is a ciphertext block; and The first cryptographic engine is an encryption engine configured to: receiving the extended cryptography key and the input block; as well as encrypting the input block using the extended cryptography key to output a corresponding output block for transfer to the RAM; and If the input block is a ciphertext block, then: The ciphertext block is received from the RAM; The corresponding output block is a plaintext block; and The first cryptographic engine is a decryption engine, the decryption engine being configured to: receiving the extended cryptography key and the input block; and The input block is decrypted using the extended cryptography key to output a corresponding output block.
9. The method of claim 8, wherein: The keystore further comprises a local cache configured to store a plurality of key identifiers and corresponding extended cryptography keys; and The method further comprises: searching the local cache for the received key identifier; If the received key identifier is found in the local cache, providing, by the local cache, a corresponding extended cryptography key to the first cryptography engine in response to matching the received key identifier; and If the received key identifier is not found in the local cache, the local cache is updated using the received key identifier and a corresponding extended cryptographic key generated by the key expansion engine, wherein the key expansion engine provides the corresponding extended cryptographic key to both the local cache and the first cryptographic engine.
10. The method of claim 8, wherein: The keystore further includes a seedstore; and The method further comprises: storing a plurality of key seeds indexed by their corresponding key identifiers in the seed repository; and The seed repository provides a corresponding key seed as the first key expansion input to the key expansion engine in response to receiving the key identifier.
11. The method of claim 8, wherein: The key store includes a counter store; and The method further comprises: storing in the counter store a plurality of counter values indexed by their corresponding key identifiers; providing, by the counter store in response to receiving a key identifier, a corresponding counter value to the key expansion engine as the first key expansion input; The key expansion operation is performed by the key expansion engine on the first key expansion input and a global seed value to generate the expanded cryptography key.
12. The method of claim 8, wherein: The first key expansion input is the received key identifier; and The method further includes performing, by the key expansion engine, the key expansion operation on the first key expansion input and a global seed value to generate the expanded cryptography key.
13. An integrated circuit (IC) system comprising a first processor, a first random access memory (RAM), and a memory cryptography circuit, wherein: The memory cryptography circuit is connected to the first processor and the first RAM; The memory cryptography circuit includes a key store; The key store includes a key expansion engine; The keystore is configured as: receiving a key identifier; as well as providing a first key expansion input to the key expansion engine based on the key identifier; The key expansion engine is configured to perform a key expansion operation on the first key expansion input to generate a stretched cryptography key; The memory cryptography circuit includes a first cryptography engine configured to receive the extended cryptography key and an input block; The first cryptographic engine is configured to process the input block using the extended cryptographic key to output a corresponding output block; and The memory cryptography circuit is configured to perform one of: receiving the input block from the RAM and transmitting the output block to the RAM; The input block is one of a plaintext block and a ciphertext block; If the input block is a plaintext block, then: The corresponding output block is a ciphertext block; and The first cryptographic engine is an encryption engine configured to: receiving the extended cryptography key and the input block; as well as encrypting the input block using the extended cryptography key to output a corresponding output block for transfer to the RAM; and If the input block is a ciphertext block, then: The ciphertext block is received from the RAM; The corresponding output block is a plaintext block; and The first cryptographic engine is a decryption engine, the decryption engine being configured to: receiving the extended cryptography key and the input block; and The input block is decrypted using the extended cryptography key to output a corresponding output block.
14. The IC system of claim 13, further comprising: A data cache is configured to provide a data packet to the memory cryptography circuit, the data packet including a received key identifier, a memory address, and a data payload.
Citation Information
Patent Citations
Dynamic cryptographic key expansion
US20200042746A1
Memory system and information processing system
US20160203342A1
Key management for secure memory address spaces
US20170277898A1
Virtual machine memory compartmentalization in multi-core architectures
WO2011149986A1
