Key management in computer processors
By scrambling and descrambling the data items in the computer processor, the security vulnerability problem in the processor is solved and the balance between data security protection and performance is achieved.
Patent Information
- Application Number
- CN201980058026.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-09-18
- Filing Date
- 2019-09-11
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-09-11
AI Technical Summary
Security vulnerabilities exist in computer processors, such as Meltdown and Specter, which lead to unauthorized data access and make it difficult to effectively protect data security.
By scrambling the data items so that the original data cannot be recovered without the key, using a descrambler to recover the data items inside the processor, allowing only applications holding the descrambling key to access the descrambled data , prevent side channel attacks.
It effectively improves data security in computer processors, prevents unauthorized data access, reduces performance impact, and avoids risks caused by security vulnerabilities.
Smart Images

Figure CN112654990B_ABST
Abstract
Description
[0001] Related Applications
[0002] This application claims the benefit of the filing date of U.S. Patent Application No. 16 / 134,387, filed on September 18, 2018, and entitled “Key Management in Computer Processors,” the entire disclosure of which is hereby incorporated herein by reference.
[0003] This application is related to U.S. Patent Application No. 16 / 054,913, filed on August 3, 2018 and entitled “Data Protection in Computer Processors,” the entire disclosure of which is hereby incorporated by reference herein. Technical Field
[0004] At least some embodiments disclosed herein relate generally to computer architecture, and more particularly, but not limited to, to key management for data security in computer processors and / or data transfer in computing systems. Background Art
[0005] A typical computer processor receives instructions and / or data from the main memory of a computer system for processing. Instructions and / or data may be cached for use by the processor. In some cases, unauthorized access to the contents of the main memory or processor cache may be made. For example, multiple processors or processing cores formed on the same die may share the main memory. One processor or processing core may access the contents of another processor or processing core via a shared main memory and / or processor cache memory via a memory sharing and / or cache coherency protocol.
[0006] For example, speculative execution is a computing technique in which a processor executes one or more instructions before a determination is available as to whether such instructions should be executed, based on speculation that such instructions need to be executed under certain conditions. Speculative execution may lead to security vulnerabilities in which unauthorized access to content may be made. Examples of security vulnerabilities in computer processors include Meltdown and Spectre, which were disclosed in 2018. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.
[0008] Figure 1 A processor having a descrambler in accordance with at least some embodiments is shown.
[0009] Figure 2 The operation of the descrambler to recover bits from the scrambled data is shown.
[0010] Figure 3 Describe the processor's descrambler.
[0011] Figure 4 The structure of a processor with different data security zones according to one embodiment is shown.
[0012] Figure 5 A key storage area for data security in a processor is shown according to one embodiment.
[0013] Figure 6 A technique for locating a key based on a virtual memory address according to one embodiment is described.
[0014] Figure 7 Describe the relationship between the scrambling key and the corresponding descrambling key.
[0015] Figure 8 Describes techniques for adding user-specific data protection.
[0016] Fig. 9 A key management method for data protection in a computer processor is presented. DETAILED DESCRIPTION
[0017] The present disclosure includes techniques for protecting data in a computer processor via data scrambling. For example, an original data item may be scrambled by rearranging the order of portions of the original data item according to a random key to produce a scrambled data item, such that the scrambled data item with the reordered portions does not represent the original data item as a whole, and the original data item and the correct order of the portions cannot be derived from the scrambled data item without the key. In a descrambling operation, the portions of the scrambled data item are reordered according to the key to restore the original data item.
[0018] For example, a data item that can be addressed using an address in a computer processor can be stored in a scrambled form before it is used for instruction execution. The scrambled data item can be an instruction, an address, or an operand to be operated by an instruction. The data item can be cached in an internal cache and / or an external cache in a scrambled form; and / or the data item can be stored in a main memory in a scrambled form. Descrambling can be performed inside the processor to restore the data item just when the data item is to be used in the processor. When the data item is scrambled, it may be difficult or impossible to restore the data item from the scrambled form without a key. The processor descrambles the data item using a secret key to execute the data item. Therefore, data security in the processor is improved. For example, in a side channel attack, an application running at the same time may attempt to gain unauthorized access to data. Because only an application holding a descrambling key can recover the descrambled data, the side channel attack can be thwarted. Preferably, the key or secret used for scrambling and therefore for the corresponding descrambling operation is a random number; and the scrambling / descrambling operation does not involve computationally intensive operations such as those required in asymmetric cryptography. Preferably, the key or secret used for scrambling / descrambling operations in the processor is not a mathematical / numerical representation of an entity, such as a public or private key pair in asymmetric cryptography.
[0019] Figure 1 A processor 101 is shown with a descrambler 113 in accordance with at least some embodiments.
[0020] exist Figure 1 In the embodiment of the present invention, the processor 101 is coupled to a memory 105, which supplies instructions and data to the processor 101 for execution. The memory 105 stores scrambled data 109 that needs to be descrambled using a secret key. In general, the memory 105 can be the main memory of the computer system or the storage device of the computer system or a hybrid memory and storage device. The memory 105 can include volatile memory and / or non-volatile memory.
[0021] The processor 101 may load the scrambled data 109 into the external cache 103 and / or the internal cache 107. Because the content in the external cache 103 and / or the internal cache 107 is scrambled using a secret key, the content is protected from unauthorized access.
[0022] The descrambler 113 is coupled between the internal cache 107 and the registers 111 and / or the execution unit 115. The descrambler 113 generates descrambled data 117 only when used in the registers 111 or the execution unit 115.
[0023] For example, the scrambled data 109 may be instructions to be executed in the processor 101. The instructions may be stored in scrambled form in the internal cache 107, the external cache 103, and / or the memory 105. Just before executing the instructions, the descrambler 113 converts them into descrambled form. The execution unit 115 then executes the instructions.
[0024] In some cases, processor 101 also includes a scrambler that scrambles the result of the execution to produce a scrambled result, which is then stored in internal cache 107 , external cache 103 , and / or memory 105 .
[0025] In another example, the scrambled data 109 is an operand to be operated on by an instruction in the processor 101. The item may be stored in scrambled form in the internal cache 107, the external cache 103, and / or the memory 105. The descrambler 113 converts the item to descrambled form just before the item is loaded into the register 111 or the execution unit 115 for operation. The execution unit 115 then uses the item to execute the instruction. For example, the execution unit 115 may be an arithmetic logic unit; and the item may be an operand to be operated on during execution of the instruction in the arithmetic logic unit, or the instruction itself.
[0026] Because the data item is in scrambled form in memory 105, external cache 103, and internal cache 107, another processor 102 with access to memory 105, external cache 103, and internal cache 107 cannot recover the descrambled data item without the key or secret used for descrambling.
[0027] Preferably, the scrambling / descrambling operations are configured such that the performance impact in the processor 101 is reduced / minimized.
[0028] For example, scrambling / descrambling may be performed by reordering bits in the data item. The data item has a predetermined width corresponding to the number of bits in the data item and / or the width of register 111 of processor 101. The operation of reordering bits within the data item may be performed using Figure 2 and 3 The multiplexer is described in detail to perform efficiently.
[0029] Figure 2 The operation of the descrambler 113 to recover bits 113 of the descrambled data 117 from the scrambled data 109 is shown.
[0030] exist Figure 2, the bit j 133 at a particular position in the descrambled data 117 is recovered by applying the corresponding key j 153 to the multiplexer 143. The multiplexer 143 receives the n bits 121, ..., 123, ..., 125 of the scrambled data 109 as input. The key j 153 specifies which of the input bits 121, ..., 125 (e.g., 123) the multiplexer 143 selects as the output bit 133 at a given position j in the descrambled data 117. The order of the bits 121, ..., 123, ..., 125 in the scrambled data 109 has been changed from the order of the bits in the descrambled data 109. The key j 153 is used to select the correct bit (e.g., 123) from the scrambled data 109 as the bit at a particular position j in the descrambled data 117. Without the secret / key j 153, the random scrambled ordering of the bits 121, ..., 123, ..., 125 in the scrambled data 109 masks the true value of the descrambled data 117. Therefore, direct interpretation of the scrambled data 109 is useless. The scrambled data 109 appears to be a random number.
[0031] Logic circuits may be used in processor 101 to efficiently implement the operation of multiplexer 143 with minimal delay in the execution pipeline. No numerical or complex cryptographic algorithmic operations (e.g., integer or floating point multiplication or division) are required to descramble the data. Figure 2 The operation of the descrambler 113 has minimal impact on the operational performance of the processor 101.
[0032] Figure 3 Describe the processor's descrambler.
[0033] exist Figure 3 In the embodiment, the scrambled data 109 and the descrambled data 117 have the same number (n) of bits. The same number (n) of multiplexers 141, ..., 143, ..., 145 are used to operate on the input bits 121, ..., 123, ..., 125 of the scrambled data 109 to output corresponding output bits 131, ..., 133, ..., 135 of the descrambled data 117. The multiplexers 141, ..., 143, ..., 145 change the order of the bits 121, ..., 123, ..., 125 of the scrambled data 109 to the order of the bits 131, ..., 133, ..., 135 of the descrambled data 117.
[0034] Preferably, multiplexers 141, ..., 143, ..., 145 operate simultaneously to minimize the delay caused by descrambling. Alternatively, a reduced number of multiplexers can be used to reduce the logic circuits used to implement descrambling; and a reduced set of multiplexers can be used to operate iteratively to generate different subsets of output bits 131, ..., 133, ..., 135, so that a complete set of output bits 131, ..., 133, ..., 135 can be calculated through iteration.
[0035] like Figure 3 , the scrambled data 109 and the descrambled data 117 have the same number (n) of bits and the same values of the corresponding bits. For example, bit i 123 in the scrambled data 109 corresponds to bit j 133 in the descrambled data 117. Therefore, the scrambled data 109 and the descrambled data 117 are different from each other in their bit order; and the descrambled data 117 can be regarded as a scrambled version of the scrambled data 109. Therefore, the set of multiplexers 141, ..., 143, ..., 145 of the descrambler 113 can be used with a set of complementary keys to select to generate bits 131, ..., 133, ..., 135 of the descrambled data 171, thereby generating bits 121, ..., 123, ..., 125 of the scrambled data 109. For example, because the descrambling key j 153 identifies the selected input bit i 123 from position i of the scrambled data 109 as the output bit j 133 at position j of the descrambled data 117, the complementary scrambling key i identifies position j in the descrambled data 117 for selection as the bit i 123 at position i in the scrambled data 109. Thus, the scrambling key can be calculated from the descrambling keys 151, ..., 153, ..., 155. By applying a set of complementary scrambling keys in the descrambler 113 to operate on the descrambled data 117, the descrambler 113 can act as a scrambler to produce the scrambled data 109. Similarly, the descrambling keys 151, ..., 153, ..., 155 can be calculated from the scrambling keys. Thus, the scrambler can be Figure 3 and the descrambler 113 can be reconfigured as the scrambler 113 by loading a set of scrambling keys to replace the descrambling keys 151, 153, ..., 155.
[0036] like Figure 3 As explained in , the scrambling / descrambling operation does not change the data size (n) before and after the operation. The storage capacity requirement of the scrambled data 109 is the same as the storage capacity requirement of the descrambled data 117. No additional memory / storage capacity is required for the scrambled data 109.
[0037] Figure 2 and 3 The preferred descrambler 113 is illustrated. In general, other descramblers may also be used in the processor 101.
[0038] For example, a scrambler / descrambler may be implemented by selectively inverting a bit according to the value of a corresponding bit in a key. If the corresponding bit in the key has a predetermined value (e.g., 1), the bit of the input data is inverted to produce the corresponding bit of the output data; otherwise, the bit of the output data is the same as the bit of the input data.
[0039] For example, the bit reversal operation can be used with Figure 2and 3 The bits in the are repositioned in combination for scrambling / descrambling.
[0040] Figure 4 The structure of a processor 101 with different data security zones according to one embodiment is shown.
[0041] The processor 101 may have a scrambling area 161 and a descrambling area 163. The scrambling area 161 includes an internal cache 107. The descrambling area 163 includes an execution unit 115. Therefore, the execution unit 115 does not operate on any scrambled data (e.g., 109). The register 111 may be in the scrambling area 161 or the descrambling area 163. The descrambler 113 and the scrambler 112 interface or connect the scrambling area 161 and the descrambling area 163. The content in the scrambling area 161 is in a scrambled form; and the content in the descrambling area 163 is in a descrambled form. The processor 101 descrambles the content in the scrambling area 161 to perform calculations in the descrambling area 163, and scrambles the calculation results before the calculation results leave the descrambling area 163 and enter the scrambling area 161. For example, in response to a load instruction, the descrambler 113 converts the scrambled data 109 into the descrambled data 117 (e.g., for the arithmetic logic unit of the processor 101); and the descrambler 113 does not use the arithmetic logic unit for the descrambling operation. In response to a storage instruction, the scrambler 112 converts the data item to be stored from the descrambled form to the scrambled form. The scrambled result may be initially cached in the scrambled area 161 and then stored in the scrambled form in the external cache 103, the main memory 105, and / or the peripheral storage device. Optionally, the descrambler 113 and the scrambler 112 may share a portion of the logic circuit (e.g., multiplexers 141, ..., 143, ..., 145). For example, the descrambler 113 is configured to load data from the scrambled area 161 to the descrambled area 163 in response to a load instruction, and can be reconfigured as the scrambler 112 by changing the keys 151, ..., 153, ..., 155 used to scramble the output data from the descrambled area 163 to the scrambled area 161 in response to a store instruction.
[0042] Figure 1 The storage of data in scrambled form in the main memory 105 and caches 103 and 107 of the processor 101 is illustrated. The data may also be in scrambled form in a storage device (e.g., a disk or flash drive coupled to a peripheral bus of the computer system). Thus, when the data is transferred from the storage device to the main memory 105 and / or caches 103 and 107, it is already in scrambled form.
[0043] The use of the descrambler 113 in the processor 101 limits the unencrypted descrambled content available only to a portion of the processor 101 and thus improves data security in the computer system.
[0044] Figure 5 A key storage area 167 for data security in processor 101 is shown according to one embodiment.
[0045] exist Figure 5 , processor 101 has a descrambled region 163 for performing computations on data 117 in descrambled form. Other processors (e.g., 102) are able to access certain resources of processor 101, such as storage 104, memory 105, external cache 103, and / or internal cache 107. However, these processors (e.g., 102) are prevented from accessing the descrambled region 163 of processor 101. For example, processors 101 and 102 may be different processing cores formed on the same silicon die and / or packaged in the same integrated circuit chip. In other examples, processors 101 and 102 may be packaged in different integrated circuit chips and connected via a communication connection such as a bus, an interconnect, a network, etc.
[0046] For example, a malicious program may be running in processor 102 and attempting to gain unauthorized access to content to be processed by processor 101 (e.g., using security vulnerabilities such as Meltdown and Spectre). To prevent such unauthorized access from occurring, data 109 may be stored in a scrambled form in a location outside of descrambled area 163. For example, data 109 is stored in a scrambled form in storage device 104, main memory 105 of the computer, and an external cache 103 shared between processors 101 and 102. Additionally, data 109 may be stored in a scrambled form in a scrambled area 161 of processor 101 (e.g., internal cache 107 of processor 101) when processor 102 can access internal cache 107 via a cache coherency protocol.
[0047] exist Figure 5 , when the processor 101 executes instructions authorized to process the scrambled data 109, the descrambler 113 of the processor 101 converts the scrambled data 109 into the descrambled data 117. The existence of the descrambled data 117 is confined within the descrambled area 163. Because another processor 102 is prevented from accessing the descrambled area 163 of the processor 101, a malicious program running in the processor 102 can be prevented from gaining unauthorized access to the descrambled data 117 (e.g., via security vulnerabilities such as Meltdown and Spectre).
[0048] exist Figure 5In the embodiment, processor 101 has a secure area 165 including a key storage area 167. Key storage area 167 has keys for descrambler 113 and scrambler 112 for various data objects. Processors 101 and 102 cannot recover descrambled data 117 from scrambled data 109 without access to the corresponding keys for the objects.
[0049] exist Figure 5 , access to the key storage area 167 is based at least in part on a virtual address 195 used to load scrambled data 109 for operations to be performed within the descrambling area 163.
[0050] For example, virtual address 195 may include fields such as object ID 199 , object type 198 , and / or offset 196 .
[0051] For example, virtual address 195 may have a predetermined width (predetermined bits) and be stored in memory address register 169 of processor 101. Virtual address 195 may include a portion representing object ID 199 and a portion representing offset 196 within the object represented by object ID 199.
[0052] For example, the object located at virtual address 195 may be an instruction set or a routine; and object ID 199 of virtual address 195 may be used to identify specific characteristics of the instructions and / or routine, such as access rights.
[0053] For example, the object at virtual address 195 may be a data file, a data set, or a data item; and the object ID 199 of virtual address 195 may be used to identify access rights to the data.
[0054] In some cases, the object name server is configured to store attributes of objects identified via object ID 199. Processors 101 and 102 may query the object name server to obtain the attributes for access control.
[0055] In some cases, a static object ID of a predetermined value (e.g., 0) may be used to represent a kernel object of an operating system. Thus, a static object ID specified in a memory address may be used to identify a specific access restriction without communicating with an object name server. Some details and examples of static object IDs in memory addresses used by a computer processor to load instructions for execution may be found in U.S. Patent Application No. 16 / 028,840, filed on July 6, 2018, entitled “Static Identifications in Object-based Memory Access,” the entire disclosure of which is hereby incorporated by reference herein.
[0056] In some cases, the virtual address 195 and / or the object ID (e.g., 199) of the memory address may include a portion representing an object type 198. For example, an object type 198 value from 0 to 3 may be used to identify a kernel object of an operating system. For example, an object type 198 value of 4 to 5 may be used to specify that an offset is an address of different widths (e.g., a 64-bit address or a 32-bit address contained within a memory address having 128 bits). For example, an object type 198 value of 6 to 7 may be used to specify that a predetermined portion of the object ID should be interpreted as an identifier of a local object or an object in a partitioned global address space (PGAS). For example, an object type 198 value of 32 may be used to specify that the remainder of the object ID should be interpreted as an identifier of an object defined in a server (e.g., 197).
[0057] Object type 198 and / or object ID 199 may optionally be used to determine access rights.
[0058] exist Figure 5 199 can be used to access the key storage area 167 to retrieve the key for the object represented by the object ID 199. Therefore, when the descrambler 113 is authorized to load the scrambled data 109 into the descrambler 113 via the virtual address 195 for processing, the key for the descrambler 113 to generate the descrambled data 117 from the scrambled data 109 can be retrieved or obtained from the key storage area 167.
[0059] When descrambled data 117 leaves descrambled area 163 (e.g., to be stored at virtual address 195 as a result of a calculation and / or as part of an object represented by object ID 199), scrambler 112 converts descrambled data 117 to scrambled data 109. By reducing the locations and durations in which descrambled data 117 exists, data security of the computer system is improved.
[0060] In general, the descrambled data 117 may be instructions, operands, and / or the result of the execution of instructions by the execution unit 115. The descrambled area 163 may include registers for storing virtual addresses for loading scrambled operands into the descrambled area 163, registers for storing virtual addresses for deriving scrambled results from the descrambled area 163, and / or registers (e.g., program counters) for storing virtual addresses for loading scrambled instructions into the descrambled area 163. For example, the descrambled area 163 may include a program counter, a programmer-visible register set, and / or a memory address register. Programs running outside the descrambled area 163 of the processor 101 (e.g., in another processor 102, such as a separate processing core) are generally blocked from accessing the descrambled area 163 of the processor 101, but such external programs may access caches (e.g., 103 and / or 107) and main memory (e.g., 105) whose contents are in scrambled form. An execution unit (e.g., 115) may perform operations (e.g., arithmetic operations) on operands stored in registers and produce results in registers. Such registers for operands and results may be configured in the descrambled area 163 so that the execution unit (e.g., 115) operates and produces data in a descrambled form; and therefore, scrambling outside the descrambled area 163 does not affect the operation and / or efficiency of the execution unit (e.g., 115). The program counter may increase the address stored therein by one to execute the next instruction, or be assigned a branch address to execute the instruction at a given branch address. The program counter may also be configured in the descrambled area 163 so that its operation is based on the descrambled address. Therefore, the contents of the program counter and / or the address used to identify the operand in the main memory (e.g., 105) may be the descrambled address in the descrambled area 163.
[0061] Figure 6 A technique for locating key 255 based on virtual address 195 according to one embodiment is described.
[0062] Figure 6 199, an object type 198, and / or an offset 196. For example, virtual address 195 may have a width of 128 bits; a number of bits (e.g., 59 or 58) of virtual address 195 may be used to store object ID 199, another number of bits (e.g., 5 or 6) of virtual address 195 may be used to store object type 198, and the remaining bits (e.g., 64) of the virtual address may be used to store offset 196 relative to the object having type 198 and ID 199. For example, virtual address 195 may be an address stored in memory 105 as configured, programmed, and / or seen by a programmer or user of the routine.
[0063] exist Figure 6, hash 181 is applied to object ID 199 to produce index 185. Index 185 has fewer bits than object ID 199 and thus reduces the size of key store 167 used to look up entries (e.g., 213, ..., 215) from key store 167.
[0064] However, when multiple items hash to the same index, hash collisions may occur. Chaining is one of the techniques for resolving hash collisions. The index resulting from the collision can be used to retrieve a list / chain of key-value pairs. Each item hashed to the index can be configured as a key in a corresponding key-value pair in the list; and the search result for the item can be configured as a value in the corresponding key-value pair. To retrieve a search result for one of the items hashed to the same index, the list / chain of key-value pairs identified via the index can be searched to find a key-value pair whose key matches the item. The value of the matching key-value pair provides the search result.
[0065] When there is no hash collision for index 185 , the entry at index 185 in key store 167 (eg, 213 , . . . , or 215 ) may be retrieved as resulting entry 250 .
[0066] When there is a hash collision for index 185, the entry (e.g., 213, ..., or 215) at index 185 in key store 167 identifies a collision chain 260. Collision chain 260 has a list / chain of entries (e.g., 262, 264, ...) showing object IDs (e.g., 261, 263) that hash 181 to the same index 185. Collision chain 260 may be searched to locate an entry (e.g., 262 or 264) that specifies an object ID (e.g., 261 or 263) that matches object ID 199 before hash 181. The located entry (e.g., 262 or 264) is illustrated as the resulting entry 250.
[0067] In general, hash 181 may be applied to a combination of a portion of object ID 199 (and optionally object type 198) and / or offset 196. Additionally, scrambling may be specific to different virtual machines, different processes, and / or different users. Thus, hash 181 may be applied to a combination of a portion of virtual address 195, an identifier of the current virtual machine whose instructions processor 101 is executing, a processor ID of the current process of a running instance of a program, an identifier of a user account and / or user whose instructions processor 101 is currently executing, and / or the like.
[0068] Alternatively, security for isolating different virtual machines, different processes, and / or different users may be implemented by scrambling using keys for different virtual machines, keys for different processes, and / or keys for different users. Different layers of scrambling protection for virtual machines, running instances / processes, and / or users / user accounts may be combined by scrambling the keys, as described below in conjunction with Figure 8 Further explanation: The size of key store 167 can be reduced when keys for different combinations of objects, virtual machines, running instances / processes, and / or users / user accounts are derived based on combining individual keys for objects, keys for virtual machines, keys for instances / processes, and / or keys for users / user accounts.
[0069] A typical entry 250 looked up from the key store 167 using the index 185 may have a number of fields 251, 253, 255, ..., 257 used for subsequent security operations. The values of the fields may be adjusted when necessary in a manner independent of the virtual address 195 itself. Thus, the values of the fields are not hard-coded into the virtual address 195.
[0070] For example, the value of status field 251 may indicate whether the object represented by object ID 199 is currently in a scrambled form outside of descrambled area 163, such as scrambled in scrambled area 161 of storage device 104, main memory 105, external cache 103 and / or processor 101.
[0071] For example, the value of type field 253 may indicate the type of scrambling applied to the object represented by object ID 199. For example, the scrambling may be in the form of reallocating / relocating data content in different data fields (e.g., bits, bytes, words) in a data item of a predetermined width (e.g., as measured via a count of bits), such as Figure 2 and 3 In other cases, scrambling or encryption may be performed using other cryptographic algorithms that may involve symmetric key cryptography and / or public key cryptography.
[0072] For example, the value stored by key field 255 may represent a key used to secure the object represented by object ID 199 according to type 253.
[0073] For example, optional address field 257 may provide an address from which attributes or properties of the object represented by object ID 199 may be retrieved. For example, address field 257 may be used to retrieve parameters related to the implementation of type 253 of data protection, such as data field size, scrambled data field. For example, address field 257 may be used to retrieve a set of attributes and / or access control parameters of the object represented by object ID 199 from memory 105. For example, address field 257 may be used to query an object name server for the attributes and / or access control parameters of the object represented by object ID 199. For example, address field 257 may be used to load a page table / page directory for translating the virtual address (e.g., 195) of the object represented by object ID 199.
[0074] In some cases, an address translation table separate from key store 167 is used to provide an entry specifying a physical address of a page table / page directory used to translate virtual address 195 into a physical address. At least a portion of virtual address 195 may be hashed to index into the address translation table in a manner similar to the identification of key entry 250.
[0075] In general, hashing 181 and indexing 185 into key store 167 for retrieving key 250 may be different than hashing and indexing into address translation table for loading page table / page directory to convert virtual address 195 to physical address. For example, object ID 199 may combine virtual machine identifier with user identifier to hash into index for address translation table; and object ID 199, virtual machine identifier and user identifier may be used to retrieve individual keys for object, virtual machine and user, where the individual keys are combined via calculation (e.g., key scrambling) to produce a combined key for object used by user in virtual machine.
[0076] Figure 7 The relationship between the scrambling key 221 and the corresponding descrambling key 223 will be described.
[0077] exist Figure 7 In , a data item is divided into N fields 1, 2, ..., N. The scrambling key 221 has corresponding N fields identifying the destination fields for redistributing the contents of the N source fields.
[0078] For example, Figure 7 Illustrate scrambling key 221, which specifies N-1 as the destination field for the content in source field 1. Therefore, the content in source field 1 is shuffled into destination field N-1 during the scrambling operation. Similarly, Figure 7The scrambling key 221 illustrated in specifies 1 as the destination field for the content in source field 2, specifies N as the destination field for the content in source field 3, ..., and specifies N-2 as the destination field for the content in source field N.
[0079] Thus, when source fields 1, 2, 3, ..., N contain identifiers of the corresponding fields and scrambling key 221 is applied to scramble a data item having a sequence of positions of said fields, the scrambled data item contains the identifiers of source fields 2, ..., N, 1, 3. Thus, this particular scrambled data produced by applying scrambling key 221 to the sequence of positions 1, 2, 3, ..., N provides descrambling key 223.
[0080] Similarly, when scrambling is performed according to the descrambling key 223 to scramble the position sequence 1, 2, 3, . . . , N, the scrambling result provides the scrambling key 221.
[0081] Therefore, the scramble key 221 can be calculated from the descramble key 223 ; and the descramble key 223 can be calculated from the scramble key 221 .
[0082] A random number generator may be used to generate a scrambling key (e.g., 221). For example, the random number generator may be configured to randomly generate a number between 1 and N. The random number generator may be used to generate a first random number as a destination field identifier for source field 1 (e.g., N-1). Subsequently, the random number generator may be used to generate a second random number as a candidate for a destination field identifier for source field 2. If the candidate is the same as any of the destination field identifiers already selected for the scrambling key (e.g., 221), the candidate is discarded and another random candidate is generated by the random number generator; otherwise, the candidate may be used as the destination field identifier for source field 2 (e.g., 1). Destination field identifiers for subsequent fields (e.g., 3, ..., N) may be selected in a similar manner so that the sequence in the scrambling key 221 (e.g., N-1, 1, N, ..., N2) is random but contains non-repeating identifiers.
[0083] In some cases, the scrambling key 221 has the same size as the data item containing the fields 1, 2, 3, ..., N to be scrambled. For example, to scramble a 64-bit data item where each field has 4 bits and there are 16 4-bit fields (e.g., N=16), the scrambling key 221 may also be stored as a 64-bit data item. In this case, the scrambling key 221 may be scrambled using the same scrambler 112 used to scramble the data item.
[0084] Alternatively, scrambling key 221 may have a different size than the data item scrambled using scrambling key 221. For example, a data item may have 64 1-bit fields; scrambling key 221 has 64 6-bit destination field identifiers; and therefore, scrambling key 221 is 6 times the size of a 64-bit data item.
[0085] In some embodiments, a scrambling key (e.g., 221) is generated by rearranging the order of the destination field identifiers according to the order of the output from the random number generator. For example, a position sequence of 1, 2, 3, ..., N may be used as an initial candidate for the scrambling key. In response to the random number generator providing a random number i between 1 and N, the key generator extracts the i-th destination field identifier from the sequence and inserts it into a predetermined position (e.g., at the beginning of the sequence, at the end of the sequence, at another predetermined position, or at a position identified by the next random number generated by the random number generator). After shuffling the sequence of destination field identifiers multiple times, the resulting random sequence of destination field identifiers may be used as a scrambling key (e.g., 221), or as a descrambling key (e.g., 223).
[0086] Figure 8 Describes techniques for adding user-specific data protection.
[0087] For example, the object may be scrambled using a scrambling key 230. When different users use instances of the object, the user-specific instances may be further scrambled based on user keys 231, ..., 233.
[0088] Multiple layers of scrambling using multiple keys may be performed and / or descrambled using a composite key. For example, scrambling key 230 may be combined with user key A 231 to produce scrambling key 241 for user A; and scrambling key 230 may be combined with user key X 233 to produce scrambling key 243 for user X. User X cannot derive scrambling key 241 for user A from scrambling key 230 and user key X 233; and user X cannot descramble an object instance scrambled using scrambling key 241 for user A without user key A 231.
[0089] For example, each user key (e.g., 231 or 233) may be a random number specific to the respective user. The random number may be added to each of the N destination field identifiers in the scrambling key 231, modulo N, to obtain a user-specific scrambling key (e.g., 241 or 243).
[0090] For example, each user key (eg, 231 or 233) may be a separate scrambling key used to scramble the common scrambling key 230 to generate a user-specific scrambling key (eg, 241 or 243).
[0091] For example, Figure 7 It is illustrated that the position sequence 1, 2, 3, ..., N is scrambled using the scrambling key 221 to produce the descrambling key 223. The descrambling key 223 can be further scrambled using the user key (e.g., 241 or 243) to produce a user-specific descrambling key for descrambling the result of scrambling initially using the scrambling key 221 and then using the user key (e.g., 241 or 243). The user-specific scrambling key can be calculated by scrambling the position sequence 1, ..., N-2, N-1, N according to the user-specific descrambling key. Scrambling using the user-specific scrambling key produces the same result as the result of scrambling initially using the scrambling key 221 and then further scrambling the result thereof using the user key (e.g., 241 or 243).
[0092] In general, a multi-layer scrambling operation using multiple keys can be reduced to scrambling using a single composite key; and the single composite key can be calculated from the multiple keys.
[0093] For example, an object may be protected by scrambling with an object key assigned to the object. A virtual machine may be protected by scrambling with a virtual machine key assigned to the virtual machine. A user or user account may be protected by scrambling with a user key assigned to the user or user account. A running process may be protected by scrambling with a process key assigned to the running process. Rather than using the object key, virtual machine key, user key, and process key separately for descrambling data items of an object used in a process running in a virtual machine for a user or user account, a single combined descrambling key may be generated from the object key, virtual machine key, user key, and process key; and the combined descrambling key may be used to descramble scrambled data items protected by the object key, virtual machine key, user key, and process key. The combined descrambling key may be derived from a subset of the object key, virtual machine key, user key, and process key. Similarly, a single combined scrambling key can be calculated from the object key, virtual machine key, user key, and process key to be used to scramble unencrypted data into a scrambled form protected by the object key, virtual machine key, user key, and process key, so that a malicious program that possesses some but not all of the keys cannot descramble the data.
[0094] The processor 101 may be configured to dynamically calculate a combined key from multiple layers of keys (e.g., keys used to protect objects, virtual machines, users / user accounts, and running processes). Thus, the size of the key store 167 for different combinations of objects, virtual machines, users / user accounts, and / or running processes may be reduced.
[0095] Fig. 9A key management method for data protection in a computer processor is presented. For example, Fig. 9 The method can be found in Figure 1 , 4 or 5 with Figure 3 The descrambler 113 is implemented in a computer system.
[0096] At block 201 , the computer system stores scrambled data 109 in memory 105 .
[0097] For example, a computer system may have multiple processors (eg, 101 and 102) that share the same memory 105. It may be desirable to prevent a malicious program running in one processor (eg, 102) from accessing the contents of another processor (eg, 101) by exploiting a particular security vulnerability.
[0098] At block 203 , the first processor 101 of the computer system stores the key (eg, 255 ) in a secure zone 165 of the first processor 101 coupled to a memory in the computer system.
[0099] At block 205 , the first processor 101 converts the scrambled data 109 to descrambled data 117 in the descrambled area 163 of the first processor 101 using the key retrieved from the secure area 165 in response to execution of instructions configured to operate on the descrambled data 117 .
[0100] At block 207, the first processor 101 operates on the descrambled data 117 in the descrambling zone.
[0101] At block 209 , the first processor 101 blocks the second processor 102 , which is coupled to the memory 105 in the computer system, from accessing the descrambled data 117 in the descrambled area 163 of the first processor 101 .
[0102] The first processor 101 and the second processor 102 may further share a storage device 104 storing scrambled data 109 and / or an external cache 103 storing scrambled data. The second processor 102 may even be able to access the scrambled area 161 internal to the first processor 101, such as accessing the internal cache 107 of the processor 101 via a cache coherency protocol. In some cases, the first processor 101 and the second processor 102 may be processing cores packaged in the same integrated circuit chip.
[0103] For example, the descrambled area 163 may include a memory address register 169 configured to store a virtual memory address 169 identifying a location for loading the scrambled data 109 into the descrambled area 163. The first processor 101 is configured to descramble the scrambled data 109 in response to an instruction to load the scrambled data 109 using the virtual address 195 for operation within the descrambled area 163.
[0104] For example, the descrambling section may include an execution unit 115 configured to perform an operation on a data item located at a virtual address 195 during execution of an instruction.
[0105] The virtual address 195 may include a field containing an object identifier 199 ; and the first processor 101 is configured to retrieve, generate and / or obtain the descrambling key 223 based on the object identifier 199 .
[0106] For example, you can use Figure 6 Technology from Figure 5 The key 255 is retrieved from the key storage area 167 described in FIG.
[0107] For example, the secure zone 165 has a key store 167. The first processor 101 is configured to hash 181 at least the object identifier 199 into an index 185 and retrieve an entry 250 from the key store 167 using the index 185.
[0108] For example, entry 250 may include at least one of: a status field 251 indicating whether the object represented by the object identifier is scrambled, a scrambling type 253 or a key 255 of the object, or any combination thereof.
[0109] For example, the key storage area 167 in the secure area 165 may further include a collision chain 260 configured to identify different entries (e.g., 262 and 264) for different object identifiers (e.g., 261 and 263) that hash to the same index (e.g., 185). If there is a hash collision for the index 185, the first processor 101 may use the collision chain 260 to identify the entry 250.
[0110] For example, the first processor 101 may further store at least one of the following: a key for a virtual machine hosted in the computer system, a key for a user account, or a key for a running process, or any combination thereof. The scrambled data may be protected via multiple scrambling layers corresponding to multiple keys (e.g., keys for objects, keys for virtual machines, keys for user accounts, and / or keys for running processes whose instructions the first processor 101 is currently executing). The first processor 101 may calculate a combined key from the multiple keys to implement scrambling or descrambling corresponding to the multiple keys. The combined key may be calculated by scrambling one key with another key. The combined key may be specifically for an object, a user using an object, a process running a user's program, and / or a virtual machine that is using the first processor 101 to execute a program.
[0111] In general, the descrambled data 117 may be an instruction, an address, or an operand of an instruction. The scrambled data 109 and the descrambled data 117 may have the same set of bits in a different order than one another.
[0112] The techniques disclosed herein may be implemented in a computer system (e.g., in FIG. 104 ) having at least one processor (e.g., 101 ) coupled to a memory system (e.g., 104 , 105 , and / or 103 ) via one or more buses. Figure 1 and 3 The memory system may have multiple memory components.
[0113] For example, the bus may include a memory bus connected to one or more memory modules and / or include a peripheral Internet connected to one or more storage devices. Some of the memory components (e.g., 103 and / or 105) may provide random access; and some of the memory components (e.g., 104) may provide permanent storage capabilities. Some of the memory components (e.g., 103 and / or 105) may be volatile, because when the power supply to the memory component is temporarily disconnected, the data stored in the memory component will be damaged and / or erased. Some of the memory components (e.g., 104) may be non-volatile, because the memory component is able to retain the contents stored therein for a long period of time without power.
[0114] In general, a memory system may also be referred to as a memory device. An example of a memory device is a memory module (e.g., 105) connected to a central processing unit (CPU) via a memory bus. Examples of memory modules include dual in-line memory modules (DIMMs), small outline DIMMs (SO-DIMMs), or non-volatile dual in-line memory modules (NVDIMMs), etc. Another example of a memory device is a storage device 104 connected to a central processing unit (CPU) via a peripheral interconnect (e.g., an input / output bus, a storage area network). Examples of storage devices include solid-state drives (SSDs), flash drives, universal serial bus (USB) flash drives, and hard disk drives (HDDs). In some cases, the memory device is a hybrid memory / storage system that provides both memory functions and storage functions.
[0115] The memory component may include any combination of different types of non-volatile memory components and / or volatile memory components. Examples of non-volatile memory components include NAND-type flash memory having one or more arrays of memory cells, such as single-level cells (SLC) or multi-level cells (MLC) (e.g., triple-level cells (TLC) or quad-level cells (QLC)). In some cases, a particular memory component may include both an SLC portion and an MLC portion of memory cells. Each of the memory cells may store one or more bits of data (e.g., a data block) used by a processor (e.g., 101 or 102). Alternatively or in combination, the memory component may include one type of volatile memory. In some cases, the memory component may include, but is not limited to, random access memory (RAM), read-only memory (ROM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), phase change memory (PCM), magnetic random access memory (MRAM), spin transfer torque (STT)-MRAM, ferroelectric random access memory (FeTRAM), ferroelectric RAM (FeRAM), conductive bridging RAM (CBRAM), resistive random access memory (RRAM), oxide-based RRAM (OxRAM), "NOR" (NOR) flash memory, electrically erasable programmable read-only memory (EEPROM), nanowire-based nonvolatile memory, memory incorporating memristor technology, and / or a cross-point array of nonvolatile memory cells. The cross-point array of nonvolatile memory can be combined with a stackable crossbar grid data access array to store bits based on changes in bulk resistance. Additionally, in contrast to many flash-based memories, cross-point non-volatile memories can perform write-in-place operations, where non-volatile memory cells can be programmed without previously erasing the non-volatile memory cells.
[0116] In general, a processor (e.g., 101 or 102) can utilize a memory system (e.g., 103, 104, and / or 105) as physical memory including one or more memory components. A processor (e.g., 101 or 102) can load instructions from a memory system (e.g., 103, 104, and / or 105) for execution, provide data to be stored at a memory system (e.g., 103, 104, and / or 105), and request data to be retrieved from a memory system (e.g., 103, 104, and / or 105).
[0117] The processor (e.g., 101 or 102) may include a memory management unit (MMU), an execution unit such as an arithmetic logic unit (e.g., 115), and / or a register (e.g., 133) for holding instructions for execution, data as operands of instructions, instruction execution results, and / or addresses (e.g., 195) for loading instructions from a memory system (e.g., 103, 104, and / or 105), retrieving data from a memory system (e.g., 103, 104, and / or 105), and / or storing results in a memory system (e.g., 103, 104, and / or 105). The processor (e.g., 101) may have an internal cache 107 and / or an external cache 103 as a proxy for a portion of a memory module (e.g., 105) and / or a storage device (e.g., 104).
[0118] Scrambled data 109 for processing and / or execution in processor 101 may initially be stored in a storage device (e.g., 104) or a memory module (e.g., 105). Scrambled data 109 may include instructions for execution in an execution unit (e.g., 115) of processor 101 and / or operands for processing during execution of instructions. Scrambled data 109 may include results generated by processing operands during execution of instructions by an execution unit (e.g., 115). Scrambled data 109 routines initially stored in memory 105 or storage device 104 may be loaded into external cache 103 and / or internal cache 187 in scrambled form and subsequently descrambled into descrambled data 117 for processing in descrambled form in an execution unit (e.g., 115).
[0119] The technology disclosed herein is at least applicable to a computer system in which the processor is separated from the memory and the processor communicates with the memory and storage device via a communication bus and / or a computer network. In addition, the technology disclosed herein can be applied to a computer system in which the processing capability is integrated into the memory / storage device. For example, a processing circuit including an execution unit and / or a register of a typical processor can be implemented in an integrated circuit and / or an integrated circuit package of a memory medium to perform processing in a memory device. Therefore, the processor (e.g., 101) as discussed above and illustrated in the figures does not have to be a central processing unit in a von Neumann architecture. The processor can be a unit integrated into the memory to overcome the von Neumann bottleneck, that is, the limitation of the processing volume caused by the delay when the data moves between the central processing unit and the memory separately configured according to the von Neumann architecture and the computing performance is limited.
[0120] The description and drawings of the present disclosure are illustrative and should not be construed as limiting. Many specific details are described to provide a thorough understanding. However, in some cases, well-known or conventional details are not described to avoid obscuring the description. References to one or an embodiment in the present disclosure do not necessarily refer to the same embodiment; and such references mean at least one.
[0121] In the foregoing description, the present disclosure has been described with reference to specific exemplary embodiments of the present disclosure. It will be apparent that various modifications may be made thereto without departing from the broader spirit and scope set forth in the appended claims. Therefore, the description and drawings should be viewed in an illustrative rather than a restrictive sense.
Claims
1. A computer system comprising: a memory configured to store the scrambled data; A first processor is coupled to the memory, wherein the first processor has: a secure zone configured to store cryptographic keys; as well as a descrambling zone configured to operate on descrambled data, wherein the first processor is configured to convert the scrambled data to the descrambled data in the descrambling zone using the key retrieved from the secure zone in response to execution of instructions configured to operate on the descrambled data; a second processor coupled to the memory, wherein the second processor is blocked from accessing the descrambled data in the descrambled region of the first processor; Wherein the first processor includes a scrambled region having an internal cache configured to store the scrambled data, and the second processor is capable of accessing the scrambled region via a cache coherency protocol.
2. The computer system of claim 1 , wherein the descrambling area comprises a memory address register configured to store a virtual memory address; and the first processor is configured to descramble the scrambled data in response to an instruction to load the scrambled data using the virtual memory address to operate within the descrambling area.
3. The computer system of claim 2, wherein the descrambling section includes an execution unit configured to perform the operation on a data item located at the virtual memory address stored in the memory address register.
4. The computer system of claim 2, wherein the virtual memory address includes a field containing an object identifier; and the first processor is configured to retrieve a descrambling key based on the object identifier.
5. The computer system of claim 4, wherein the secure zone includes a key store; and the first processor is configured to at least hash the object identifier into an index and retrieve an entry from the key store using the index; wherein the descrambling key is based on the entry.
6. The computer system of claim 5, wherein the entry includes at least one of: an indication of whether the object represented by the object identifier is scrambled, a scrambling type of the object, a scrambling key corresponding to the descrambling key, or the descrambling key, or any combination thereof.
7. The computer system of claim 5, wherein the security zone further comprises a collision chain configured to identify different entries for different object identifiers that hash into the same index; and the first processor is configured to use the collision chain to identify the entry.
8. The computer system of claim 4, wherein the first processor is further configured to store at least one of: a key for a virtual machine hosted in the computer system, a key for a user account, or a key for a running process, or any combination thereof.
9. A computer system according to claim 4, wherein the encrypted data is protected by at least one of an object key and a virtual machine key, a user key or a process key, or any combination thereof, wherein the object key is associated with an object among multiple objects, the virtual machine key is associated with a virtual machine among multiple virtual machines, the user key is associated with a user account among multiple user accounts; and the process key is associated with a running process among multiple running processes.
10. The computer system of claim 9, wherein the first processor is configured to generate the descrambling key for the scrambled data from: the object key retrieved from the secure zone using the object identifier; and The at least one of the virtual machine key, the user key, or the process key, or any combination thereof.
11. A computer system according to claim 9, wherein the first processor is configured to generate the descrambling key by scrambling the object key according to at least one of the virtual machine key, the user key, or the process key, or any combination thereof.
12. The computer system of claim 1, further comprising: A storage device is configured to store the scrambled data, wherein the scrambled data in the memory is loaded from the storage device.
13. The computer system of claim 1, wherein the first processor and the second processor are packaged in a same integrated circuit chip.
14. A method for operating a computer system, comprising: storing the scrambled data in a memory of the computer system; storing a key in a secure area of a first processor coupled to the memory in the computer system; converting, by the first processor in response to execution of instructions configured to operate on the descrambled data, the scrambled data to the descrambled data in a descrambled zone using the key retrieved from the secure zone; as well as operating, by the first processor, on the descrambled data in the descrambling zone; wherein a second processor coupled to the memory in the computer system is blocked from accessing the descrambled data in the descrambled region of the first processor, Wherein the first processor includes a scrambled region having an internal cache configured to store the scrambled data, and the second processor is capable of accessing the scrambled region via a cache coherency protocol.
15. The method according to claim 14, further comprising: loading the scrambled data from the memory into the processor according to a virtual memory address, wherein the virtual memory address contains an object identification code; as well as A descrambling key is obtained from the secure zone using the object identification code.
16. The method of claim 15, wherein the descrambling key is specific to a user for whom the first processor is executing the instruction.
17. A computer processor comprising: a scrambling zone having an internal cache configured to store scrambled data; a secure zone configured to store cryptographic keys; as well as a descrambling zone configured to operate on descrambled data, wherein the computer processor is configured to convert the scrambled data to the descrambled data in the descrambling zone using the key retrieved from the secure zone in response to execution of instructions configured to operate on the descrambled data, Wherein the descrambled data in the descrambled region of the computer processor is inaccessible to a second computer processor, while the scrambled data in the scrambled region is accessible to the second computer processor via a cache coherency protocol.
18. The computer processor of claim 17, wherein the descrambled data is an instruction, an address, or an operand of an instruction.
19. The computer processor of claim 18, wherein the scrambled data and the descrambled data have a same set of bits in a different order from each other.
