WO2010012678A1 - Method and apparatus for enforcing a predetermined memory mapping - Google Patents
Method and apparatus for enforcing a predetermined memory mapping Download PDFInfo
- Publication number
- WO2010012678A1 WO2010012678A1 PCT/EP2009/059648 EP2009059648W WO2010012678A1 WO 2010012678 A1 WO2010012678 A1 WO 2010012678A1 EP 2009059648 W EP2009059648 W EP 2009059648W WO 2010012678 A1 WO2010012678 A1 WO 2010012678A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- address
- virtual address
- virtual
- physical address
- memory
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1408—Protection against unauthorised use of memory or access to memory by using cryptography
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/1009—Address translation using page tables, e.g. page table structures
Definitions
- the present invention relates to the fields of cryptography and memory management in a data processing system. More particularly, the present invention addresses the problem of security in a memory management unit and provides a means for preventing a potential hacker from being able to use a memory management unit's contents to be able to predict a physical address from a given virtual address.
- a data processing system may include hardware resources such as a processing unit (CPU), volatile memory (RAM) and non-volatile memory (ROM).
- the data processing system may operate under the control of at least one operating system and may perform routines according to one or several software resources or applications.
- Modern data processing systems generally include a memory management unit (MMU) in order to be able to map addresses from a virtual address space to a physical address space.
- the physical address space is generally smaller than the virtual address space and it is with the judicial use of such a memory management unit that several processes may be run concurrently on the data processing system.
- malware software designed to take over a data processing system's operating system or otherwise interfere with the normal processing sequence of the data processing system without the user's knowledge or approval.
- software is generally known as malware.
- the presence of malware in a data processing system is generally difficult to remedy and can lead to complete system failure or even to irreparable damage to the system.
- malware Computer viruses, worms, Trojan horses, spyware etc. are all different types of malware.
- the different types of malware can attack the processing system in various ways such as by intercepting data which was meant for another application or by monitoring key strokes in order to steal passwords or other information which is meant to be kept secret, modifying or otherwise altering data or corrupting files, modifying a program in order to cause it to crash or to execute some function which was not originally intended by the user.
- a typical memory management unit maps addresses in a virtual address space to addresses in a physical address space. In some cases the mapping can be predictable. In other cases a user may be able to obtain the mapping from the MMU . In this way a potential hacker can use this information to store some previously written malicious code at a certain location in an appropriate place in the physical address space and cause the data processing system to jump to the location where the malicious code resides thereby disrupting the system in some way.
- Another possible way to modify the operation of a data processing system is to modify the mapping directly, such that the virtual address maps to a new physical address where the malicious software resides. It is the aim of the present invention to circumvent the possibility of a potential hacker being able to properly predict the mapping of the virtual address space to the physical address space.
- the system specifically comprises two separate devices, one for encrypting memory addresses during write operations and the other for decrypting addresses during read operations.
- the goal of the system described in the document is to prevent unauthorised access to the memory. Someone who cannot be authenticated, i.e. who does not have access to the key to descramble the addresses during read, will not be able to access data from the memory in a predictable fashion.
- the aim of the present invention on the other hand is to introduce a safeguard against the introduction of malicious code into a memory and the subsequent recall of the malicious code through corruption of the virtual to physical address mapping made within a memory management unit (MMU). The present invention therefore does not have to prevent an authorised user from reading from the memory.
- MMU memory management unit
- the present invention only professes to provide a means to enforce the intended mapping made within the MMU by providing a double check. If it can be assumed, as it is in the present invention, that a hacker can modify the mapping in the MMU, then the prior art as described in the referenced document will not counter such an attack.
- the present invention provides a method for the enforcement of a predefined mapping of at least one virtual address to at least one physical address in a digital processing system comprising at least a processor and a memory, said processor using the virtual address to access the memory, said memory being accessed using the physical address, said enforcement method comprising the following steps:
- the invention further provides a system for enforcing said predefined mapping, said enforcement system comprising a second mapping table for mapping the virtual address to the corresponding intermediate address, said second mapping describing a first cryptographic function wherein the intermediate address is equal to the physical address encrypted under all or part of the virtual address, said enforcement system further comprising hardware to perform a second cryptographic function wherein the physical address is equal to the intermediate address encrypted under all or part of the virtual address, said second cryptographic function being the inverse of the first cryptographic function.
- FIG.1 shows an example representative of the current state of the art wherein several addresses (VA) corresponding to addressable entities (M1 , M2, M3) in a virtual address space (VAS) are mapped (MP) to corresponding addresses (PA) in a physical address (PAS).
- VA addressable entities
- M1 , M2, M3 virtual address space
- MP mapped
- PA physical address
- FIG.2 shows an embodiment of the present invention.
- FIG.3 shows the method used in the present invention for calculating the intermediate address.
- FIG.4 shows a detailed view of an embodiment of the present invention illustrating the mapping of pages from a virtual address space to pages in a physical address space.
- FIG.5 shows an embodiment of the present invention where a software key is used as a third parameter in the cryptographic function used to calculate the physical address.
- FIG.6 shows a further embodiment of the present invention using the software key applied at different places.
- FIG.7 shows an example of scrambled mapping of pages as applied to the present invention.
- F I G .8 shows an embod iment of the present invention wherein a second cryptographic function is used to further scramble some of the physical addresses.
- the present invention provides a system and a method for obfuscating the mapping of a virtual address space to a physical address space by providing an intermediate address space.
- the intermediate address space is a cryptographic function of the physical address space and the virtual address space.
- the method used in the present invention applies to a data processing system comprising (FIG.2) a processor unit (CP) in a virtual address space (VAS) and a memory (MM) in a physical address space (PAS).
- the data processing system further comprises a means for mapping addresses (MP1 ) from the virtual address space to an intermediate address space (IAS) and hardware for real izing a cryptographic function (CF1 ) based on two parameters, those two parameters being an intermediate address (IA) and a virtual address (VA).
- the hardware for realizing the cryptographic function (CF1 ) converts addresses from the intermediate address space to addresses in the physical address space.
- the means for mapping addresses (MP1 ) will usually be comprised in a memory management unit (MMU), said means generally being in the form of a mapping table.
- MMU memory management unit
- the calculation of the intermediate addresses is a two step process (FIG.3).
- the first step is to generate a first mapping table (MPO), known as a predetermined mapping table, where virtual addresses are mapped to physical addresses. This is usually part of the normal processes involved in compiling, linking and mapping an application - the process is known as dynamic address translation.
- the second step is to generate a second mapping table (MP1 ) where virtual addresses are mapped to intermediate addresses, said intermediate addresses being calculated using a cryptographic function (CFO) of the virtual addresses (VA) and their corresponding physical addresses (PA), where CFO is the inverse of the cryptographic function CF1 i.e. the inverse of the cryptographic function which is carried out by hardware in the data processing system.
- CFO cryptographic function
- VA virtual addresses
- PA physical addresses
- the cryptographic function is applied to the physical address and the virtual address is used as a key.
- the memory management unit does not contain any information linking virtual addresses to physical addresses. Instead, the memory management unit merely maps virtual addresses to intermediate addresses. Indeed, according to an embodiment of the present invention, the calculation of the intermediate addresses, using the predetermined mapping table of virtual and physical addresses, is done outside of the data processing system, for example in a remote management centre. The thus generated second mapping table linking the virtual addresses to the intermediate addresses is then loaded into the data processing system's memory management unit and the compiled, linked and mapped application is loaded into the appropriate place in the data processing system's memory.
- only part of the virtual address may be used as the key to the cryptographic function. This allows for a reduction in the entropy of the result of the cryptographic function. For example, only the lower or higher 16 bits can be used for the cryptographic function.
- the data processing system comprises cryptographic hardware to realize the cryptographic function CF1 (the inverse of CFO, the cryptographic function which was used to calculate the intermediate addresses).
- the processor unit issues a current virtual address corresponding to the part of the memory to be accessed.
- the current virtual address is mapped to a current intermediate address using the second mapping table in the MMU and the current intermediate address is converted to a current physical address using the cryptographic hardware applied to the current intermediate address and the current virtual address.
- the memory module is then accessed using the thus calculated current physical address.
- the cryptographic function could be an encryption, with the inverse of the cryptographic function being a decryption. Conversely, the cryptographic function could be a decryption with the inverse of the cryptographic function being an encryption. Other functions can be used such as an XOR function. According to an embodiment, the encryption function is a proprietary function having parameters specific to the application for which it is intended, e.g. in IDEA Nxt, the substitution (SBox) table will be specific for this application.
- the present invention therefore provides a double-check mechanism or an enforcement mechanism such that once the mapping of virtual addresses to physical addresses has been decided upon, no further modification is possible.
- the mapping of virtual to physical addresses is decided off-chip; the decision is recorded by encrypting the physical addresses under their corresponding virtual addresses to provide intermediate addresses; the link between the virtual and the intermediate addresses is provided on-chip in the form of a mapping table; hardware means to reverse the encryption are provided on-chip to convert the intermediate addresses back to physical addresses using the corresponding virtual address as a key, thus enforcing the previously decided mapping from virtual addresses to physical addresses. Any attempt made by a hacker to modify an intermediate address will therefore lead to an unpredictable physical address since only the correct intermediate address, corresponding to the virtual address which is used as a key, will decrypt to give the desired physical address.
- the addresses referred to in the present invention relate to a range of addresses in an address space. Indeed a given address is in fact a pointer to the beginning of a range of consecutive addresses, said range being a page or a plurality of pages or a segment etc.
- a 4 kilobyte random access memory has a virtual address of 7000H and therefore occupies a virtual address range of 7000H to 7FFFH.
- a page within the RAM comprising a predefined number of bytes of digital information has a virtual address of 7400H.
- the page of the RAM may be mapped to a physical address of 2400H for example.
- the intermediate address of the page of RAM would be calculated as a cryptographic function of 2400H and 7400H giving say 9132H. When referring to a location within the page of RAM by its virtual address of say 7410H, this would give a corresponding intermediate address of 9132H plus an offset of 001 OH i.e. 9142H.
- FIG.4 illustrates an embodiment of the present invention in more detail.
- Two memories (M1 , M2) comprise a plurality of pages, said pages having virtual addresses VM1 P1 through VM1 P5 and VM2P1 through VM2P4.
- a mapping table (MP) has been loaded which links the virtual addresses (VA) of pages in the virtual address space (VAS) to intermediate addresses (IA) of pages in the intermediate addresses space (IAS).
- the cryptographic function (CF1 ) is appl ied to the intermediate addresses using the corresponding virtual addresses as keys to give physical addresses (PA).
- Each page in the virtual address space (VMnPm) is thus mapped to a page in the physical address space (PMnPm) in a secure manner since knowledge of either or both of virtual addresses or intermediate addresses does not allow for a third party to predict physical addresses.
- the management centre determines the intermediate address by a cryptographic function of the virtual address, the physical address and the software key.
- the physical address is the inverse cryptographic function of the virtual address, the intermediate address and a software key corresponding to the aforementioned software key.
- FIG.5 shows an example of a practical application of such a scheme, whereby a software key (SK) is used to diversify (D) the virtual address (VA) before applying the cryptographic function (CF1 ) to the intermediate address (IA) using the diversified virtual address (VA') as a key.
- the intermediate address would have been generated from the inverse of the cryptographic function (CFO) applied to the physical address and the virtual address diversified by a corresponding software key.
- FIG.6 shows an example wherein a first software key (K1 ) is used to diversify (D) the virtual address while a second software key (K2) is used to diversify the intermediate address.
- K1 a first software key
- K2 a second software key
- the first and second software keys could be the same key.
- An example of a diversifying function as mentioned above could be a simple XOR function, an encryption scheme such as DES or any cryptographic function.
- the software key can of course be bypassed when desired. This would be useful for example if there were a requirement to add a layer of security in software, which would be bypassed under normal circumstances and switched on whenever the integrity of the cryptographic hardware has been compromised, at which times the software key would be used to execute the software security layer.
- the software key can be stored in a volatile memory so that at each power-on, the security software, or part of the software zone, is not accessible until the software key is loaded.
- the switching on or off of the software key can be managed directly by the virtual address, i.e. some of the bits of the virtual address can enable or disable the diversifying function (D).
- D diversifying function
- the program in charge of waiting for the software key (in a suitable message) will reside in a zone for which the software key is disabled.
- the other memory zones are automatically software key enabled so that if the processor tries to access these zones without having loaded the software key, the intermediate address will be wrong.
- the message containing the software key can be encrypted by a unique key pertaining to the memory management unit, or a global key pertaining to the data processing system.
- the pages within the address range of the ROM may be scrambled (FIG.7). This is done after the ROM physical address range is generated by the compiler at the management center by such known means such as a pseudo random function to give the predetermined mapping (MPO). An additional step of splitting the ROM range into pages is carried out and the pages are scrambled while keeping track of the virtual address related for each page.
- the scrambling function could be random, pseudo random or initialized by a key.
- a scrambled predetermined mapping table is generated (MPS). This scrambled predetermined mapping table (MPS) is then used to generate the second mapping table (MP1 ) according to the explanations given above.
- a second cryptographic hardware is used to scramble the physical addresses (PA) at the output of the first cryptographic hardware (CR). This scrambling could be done for parts of the memory which would be written to and read from, for example parts of the memory where random access memory (RA) or read/writable non-volatile memory (NM) etc is mapped.
- RA random access memory
- NM read/writable non-volatile memory
- K key for the second cryptographic function could be used, for example a key which is stored at the time of manufacture in a nonvolatile memory or on the other hand a key which can change between system resets.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
The present invention provides a system and a method for enforcing a predetermined mapping of addresses in a physical address space to addresses in a virtual address space in a data processing system comprising a processor in the virtual address space and a memory in a physical address space. During the compilation and linking of an application to be run on the data processing system, the predetermined mapping table is generated linking the virtual addresses to physical addresses. This predetermined mapping table is kept secret. A second mapping table is generated using a cryptographic function of the physical address with the virtual address as a key to link virtual addresses to intermediate addresses. The second mapping table is loaded into the memory management unit. The data processing system further comprises cryptographic hardware to convert the intermediate address to the physical address using the inverse of the cryptographic function which was used to calculate the intermediate address.
Description
METHOD AND APPARATUS FOR ENFORCING A PREDETERMINED MEMORY
MAPPING
INTRODUCTION
The present invention relates to the fields of cryptography and memory management in a data processing system. More particularly, the present invention addresses the problem of security in a memory management unit and provides a means for preventing a potential hacker from being able to use a memory management unit's contents to be able to predict a physical address from a given virtual address.
BACKGROUND OF THE INVENTION
A data processing system may include hardware resources such as a processing unit (CPU), volatile memory (RAM) and non-volatile memory (ROM). The data processing system may operate under the control of at least one operating system and may perform routines according to one or several software resources or applications. Modern data processing systems generally include a memory management unit (MMU) in order to be able to map addresses from a virtual address space to a physical address space. The physical address space is generally smaller than the virtual address space and it is with the judicial use of such a memory management unit that several processes may be run concurrently on the data processing system.
With the advent of multiple connectivity options for data processing systems, including wireless connectivity, and with the huge growth in the use of mobile data processing systems, the need to protect these systems from malicious attacks has become increasingly important. Malicious attacks can be aimed at interfering with system booting, modifying the operating system, intercepting and/or modifying data produced by or utilized by some application.
Indeed, it has now become a necessary requirement to protect data processing systems against fraudulent manipulations and attacks on their integrity. Such malicious attacks may come in the form of software designed to take over a data processing system's operating system or otherwise interfere with the normal processing sequence of the data processing system without the user's knowledge or approval. Such software is generally known as malware. The presence of malware in
a data processing system is generally difficult to remedy and can lead to complete system failure or even to irreparable damage to the system.
Computer viruses, worms, Trojan horses, spyware etc. are all different types of malware. The different types of malware can attack the processing system in various ways such as by intercepting data which was meant for another application or by monitoring key strokes in order to steal passwords or other information which is meant to be kept secret, modifying or otherwise altering data or corrupting files, modifying a program in order to cause it to crash or to execute some function which was not originally intended by the user.
One of many ways in which the security of a data processing system may be compromised is via the system's memory management unit. A typical memory management unit maps addresses in a virtual address space to addresses in a physical address space. In some cases the mapping can be predictable. In other cases a user may be able to obtain the mapping from the MMU . In this way a potential hacker can use this information to store some previously written malicious code at a certain location in an appropriate place in the physical address space and cause the data processing system to jump to the location where the malicious code resides thereby disrupting the system in some way. Another possible way to modify the operation of a data processing system is to modify the mapping directly, such that the virtual address maps to a new physical address where the malicious software resides. It is the aim of the present invention to circumvent the possibility of a potential hacker being able to properly predict the mapping of the virtual address space to the physical address space.
PRIOR ART
An International Patent Application published under the Patent Cooperation Treaty as International Publication Number WO 2005/015818 A1 describes a system and a method for enhancing data security in a broad number of electronic systems through encryption and decryption of addresses in physical memory to which data is written and from which data is read. The system utilises encryption of addresses during write operations and decryption of addresses during read operations, provided the initiator of the read operation is correctly authenticated, i.e. by using a password, a key or
other appropriate authentication means. The description refers to the use of adding an offset to an address to obtain the encryption and further mentions other encryption techniques such as address table look-up, left shift, right shift, barrel shift and address fragmentation. The system specifically comprises two separate devices, one for encrypting memory addresses during write operations and the other for decrypting addresses during read operations. The goal of the system described in the document is to prevent unauthorised access to the memory. Someone who cannot be authenticated, i.e. who does not have access to the key to descramble the addresses during read, will not be able to access data from the memory in a predictable fashion. The aim of the present invention on the other hand is to introduce a safeguard against the introduction of malicious code into a memory and the subsequent recall of the malicious code through corruption of the virtual to physical address mapping made within a memory management unit (MMU). The present invention therefore does not have to prevent an authorised user from reading from the memory. Rather, the present invention only professes to provide a means to enforce the intended mapping made within the MMU by providing a double check. If it can be assumed, as it is in the present invention, that a hacker can modify the mapping in the MMU, then the prior art as described in the referenced document will not counter such an attack.
Similarly, in an International Patent Appl ication publ ished under the Patent Cooperation Treaty as Publication Number WO 02/093387 A2, a method is described for protecting data transmission between a central processor and a memory, in which virtual addresses supplied by the processor are encoded with an unchangeable first key and then further encoded with a changeable second key thus giving physical addresses used to access the memory. The purpose of the method described is to limit the possible damage resulting in the discovery of the first key whereby all systems using the same encryption system would be compromised. This is achieved by adding a second, changeable key. In this way, when one system is compromised, it is sufficient to change the second key in all other such systems to render them once again secure, thus limiting the damage to the sole system whose security has been compromised. Again, this system is aimed merely at preventing unauthorised users form accessing the data in the memory whereas the present invention aims at enforcing the predetermined mapping between virtual and physical addresses, as described above.
SUMMARY OF THE INVENTION
The present invention provides a method for the enforcement of a predefined mapping of at least one virtual address to at least one physical address in a digital processing system comprising at least a processor and a memory, said processor using the virtual address to access the memory, said memory being accessed using the physical address, said enforcement method comprising the following steps:
- generating the predefined mapping table comprising at least part of the virtual address and the corresponding physical address,
- calculating an intermediate address corresponding to said virtual address, said calculation using a cryptographic function of at least two parameters, said at least two parameters being said physical address and all or part of said virtual address,
- generating a second mapping table comprising the virtual address and its corresponding intermediate address,
- receiving a request to access the memory, said request comprising at least part of the virtual address,
- using the second mapping table to give the intermediate address corresponding to said at least part of the virtual address,
- generating the physical address corresponding to the intermediate address by using the inverse of the cryptographic function of at least two parameters, said at least two parameters being the intermediate address and all or part of the virtual address,
- accessing the memory using the physical address.
The invention further provides a system for enforcing said predefined mapping, said enforcement system comprising a second mapping table for mapping the virtual address to the corresponding intermediate address, said second mapping describing a first cryptographic function wherein the intermediate address is equal to the physical address encrypted under all or part of the virtual address, said enforcement system further comprising hardware to perform a second cryptographic function wherein the physical address is equal to the intermediate address encrypted under all or part of the virtual address, said second cryptographic function being the inverse of the first cryptographic function.
BRIEF DESCRIPTION OF THE DRAWINGS
The invention will best be understood by reference to the following detailed description of a preferred embodiment when read in conjunction with the accompanying drawings, wherein:
FIG.1 shows an example representative of the current state of the art wherein several addresses (VA) corresponding to addressable entities (M1 , M2, M3) in a virtual address space (VAS) are mapped (MP) to corresponding addresses (PA) in a physical address (PAS).
FIG.2 shows an embodiment of the present invention.
FIG.3 shows the method used in the present invention for calculating the intermediate address.
FIG.4 shows a detailed view of an embodiment of the present invention illustrating the mapping of pages from a virtual address space to pages in a physical address space.
FIG.5 shows an embodiment of the present invention where a software key is used as a third parameter in the cryptographic function used to calculate the physical address.
FIG.6 shows a further embodiment of the present invention using the software key applied at different places.
FIG.7 shows an example of scrambled mapping of pages as applied to the present invention.
F I G .8 shows an embod iment of the present invention wherein a second cryptographic function is used to further scramble some of the physical addresses.
DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT
In view of the problems described above with respect to typical memory management units (MMU) within data processing systems, the present invention provides a system and a method for obfuscating the mapping of a virtual address space to a physical
address space by providing an intermediate address space. The intermediate address space is a cryptographic function of the physical address space and the virtual address space. In this way, any possible attempt to compromise the security of such a data processing system by modifying the mapping of the virtual address space (VAS) to the physical address space (PAS) is thwarted since the creation of the i ntermediate address space (IAS) provides a means for enforcing the predetermined relationship between the virtual address space (VAS) and the physical address space (PAS).
The method used in the present invention applies to a data processing system comprising (FIG.2) a processor unit (CP) in a virtual address space (VAS) and a memory (MM) in a physical address space (PAS). The data processing system further comprises a means for mapping addresses (MP1 ) from the virtual address space to an intermediate address space (IAS) and hardware for real izing a cryptographic function (CF1 ) based on two parameters, those two parameters being an intermediate address (IA) and a virtual address (VA). The hardware for realizing the cryptographic function (CF1 ) converts addresses from the intermediate address space to addresses in the physical address space. The means for mapping addresses (MP1 ) will usually be comprised in a memory management unit (MMU), said means generally being in the form of a mapping table.
The calculation of the intermediate addresses is a two step process (FIG.3). The first step is to generate a first mapping table (MPO), known as a predetermined mapping table, where virtual addresses are mapped to physical addresses. This is usually part of the normal processes involved in compiling, linking and mapping an application - the process is known as dynamic address translation. The second step is to generate a second mapping table (MP1 ) where virtual addresses are mapped to intermediate addresses, said intermediate addresses being calculated using a cryptographic function (CFO) of the virtual addresses (VA) and their corresponding physical addresses (PA), where CFO is the inverse of the cryptographic function CF1 i.e. the inverse of the cryptographic function which is carried out by hardware in the data processing system. According to an embodiment of the present invention, the cryptographic function is applied to the physical address and the virtual address is used as a key.
In order to prevent a potential hacker from gaining knowledge of the link between virtual and physical addresses thereby having the knowledge to effectively introduce malicious code, the memory management unit does not contain any information linking virtual addresses to physical addresses. Instead, the memory management unit merely maps virtual addresses to intermediate addresses. Indeed, according to an embodiment of the present invention, the calculation of the intermediate addresses, using the predetermined mapping table of virtual and physical addresses, is done outside of the data processing system, for example in a remote management centre. The thus generated second mapping table linking the virtual addresses to the intermediate addresses is then loaded into the data processing system's memory management unit and the compiled, linked and mapped application is loaded into the appropriate place in the data processing system's memory.
In one embodiment of the present invention only part of the virtual address may be used as the key to the cryptographic function. This allows for a reduction in the entropy of the result of the cryptographic function. For example, only the lower or higher 16 bits can be used for the cryptographic function.
The data processing system comprises cryptographic hardware to realize the cryptographic function CF1 (the inverse of CFO, the cryptographic function which was used to calculate the intermediate addresses). When the processor unit needs to access a part of the memory, the processor unit issues a current virtual address corresponding to the part of the memory to be accessed. The current virtual address is mapped to a current intermediate address using the second mapping table in the MMU and the current intermediate address is converted to a current physical address using the cryptographic hardware applied to the current intermediate address and the current virtual address. The memory module is then accessed using the thus calculated current physical address.
The cryptographic function could be an encryption, with the inverse of the cryptographic function being a decryption. Conversely, the cryptographic function could be a decryption with the inverse of the cryptographic function being an encryption. Other functions can be used such as an XOR function.
According to an embodiment, the encryption function is a proprietary function having parameters specific to the application for which it is intended, e.g. in IDEA Nxt, the substitution (SBox) table will be specific for this application.
The present invention therefore provides a double-check mechanism or an enforcement mechanism such that once the mapping of virtual addresses to physical addresses has been decided upon, no further modification is possible. The mapping of virtual to physical addresses is decided off-chip; the decision is recorded by encrypting the physical addresses under their corresponding virtual addresses to provide intermediate addresses; the link between the virtual and the intermediate addresses is provided on-chip in the form of a mapping table; hardware means to reverse the encryption are provided on-chip to convert the intermediate addresses back to physical addresses using the corresponding virtual address as a key, thus enforcing the previously decided mapping from virtual addresses to physical addresses. Any attempt made by a hacker to modify an intermediate address will therefore lead to an unpredictable physical address since only the correct intermediate address, corresponding to the virtual address which is used as a key, will decrypt to give the desired physical address.
The addresses referred to in the present invention relate to a range of addresses in an address space. Indeed a given address is in fact a pointer to the beginning of a range of consecutive addresses, said range being a page or a plurality of pages or a segment etc. For example a 4 kilobyte random access memory (RAM) has a virtual address of 7000H and therefore occupies a virtual address range of 7000H to 7FFFH. A page within the RAM, comprising a predefined number of bytes of digital information has a virtual address of 7400H. The page of the RAM may be mapped to a physical address of 2400H for example. The intermediate address of the page of RAM would be calculated as a cryptographic function of 2400H and 7400H giving say 9132H. When referring to a location within the page of RAM by its virtual address of say 7410H, this would give a corresponding intermediate address of 9132H plus an offset of 001 OH i.e. 9142H.
FIG.4 illustrates an embodiment of the present invention in more detail. Two memories (M1 , M2) comprise a plurality of pages, said pages having virtual addresses VM1 P1 through VM1 P5 and VM2P1 through VM2P4. A mapping table
(MP) has been loaded which links the virtual addresses (VA) of pages in the virtual address space (VAS) to intermediate addresses (IA) of pages in the intermediate addresses space (IAS). The cryptographic function (CF1 ) is appl ied to the intermediate addresses using the corresponding virtual addresses as keys to give physical addresses (PA). Each page in the virtual address space (VMnPm) is thus mapped to a page in the physical address space (PMnPm) in a secure manner since knowledge of either or both of virtual addresses or intermediate addresses does not allow for a third party to predict physical addresses.
In yet another embodiment of the present invention, a further level of security could be added by introducing a software key. In this embodiment, the management centre determines the intermediate address by a cryptographic function of the virtual address, the physical address and the software key. In the data processing system, the physical address is the inverse cryptographic function of the virtual address, the intermediate address and a software key corresponding to the aforementioned software key. FIG.5 shows an example of a practical application of such a scheme, whereby a software key (SK) is used to diversify (D) the virtual address (VA) before applying the cryptographic function (CF1 ) to the intermediate address (IA) using the diversified virtual address (VA') as a key. In this case, the intermediate address would have been generated from the inverse of the cryptographic function (CFO) applied to the physical address and the virtual address diversified by a corresponding software key.
The above description refers to one example with the use of a software key. In another embodiment the software key could be used to diversify the intermediate address instead of the virtual address. In yet another embodiment a plurality of software keys could be used. FIG.6 shows an example wherein a first software key (K1 ) is used to diversify (D) the virtual address while a second software key (K2) is used to diversify the intermediate address. The first and second software keys could be the same key. An example of a diversifying function as mentioned above could be a simple XOR function, an encryption scheme such as DES or any cryptographic function.
The software key can of course be bypassed when desired. This would be useful for example if there were a requirement to add a layer of security in software, which
would be bypassed under normal circumstances and switched on whenever the integrity of the cryptographic hardware has been compromised, at which times the software key would be used to execute the software security layer.
The software key can be stored in a volatile memory so that at each power-on, the security software, or part of the software zone, is not accessible until the software key is loaded. The switching on or off of the software key can be managed directly by the virtual address, i.e. some of the bits of the virtual address can enable or disable the diversifying function (D). As a consequence, the program in charge of waiting for the software key (in a suitable message) will reside in a zone for which the software key is disabled. The other memory zones are automatically software key enabled so that if the processor tries to access these zones without having loaded the software key, the intermediate address will be wrong. The message containing the software key can be encrypted by a unique key pertaining to the memory management unit, or a global key pertaining to the data processing system.
To prevent the possibility of a hacker being able to reconstitute information obtained from a memory dump, especially in the case where a segment of the physical address space is mapped to a ROM, the pages within the address range of the ROM may be scrambled (FIG.7). This is done after the ROM physical address range is generated by the compiler at the management center by such known means such as a pseudo random function to give the predetermined mapping (MPO). An additional step of splitting the ROM range into pages is carried out and the pages are scrambled while keeping track of the virtual address related for each page. The scrambling function could be random, pseudo random or initialized by a key.
Now taking into account the new physical address for a given virtual address, a scrambled predetermined mapping table is generated (MPS). This scrambled predetermined mapping table (MPS) is then used to generate the second mapping table (MP1 ) according to the explanations given above.
In another embodiment of the present invention (FIG.8) a second cryptographic hardware (SCR) is used to scramble the physical addresses (PA) at the output of the first cryptographic hardware (CR). This scrambling could be done for parts of the memory which would be written to and read from, for example parts of the memory
where random access memory (RA) or read/writable non-volatile memory (NM) etc is mapped. Furthermore, different types of key (K) for the second cryptographic function could be used, for example a key which is stored at the time of manufacture in a nonvolatile memory or on the other hand a key which can change between system resets.
Claims
1. Method for enforcing a predefined mapping of at least one virtual address (VA) to at least one physical address (PA) in a digital processing system comprising at least a processor (CP) and a memory (MM), said processor (CP) using the virtual address (VA) to access the memory (MM), said memory (MM) being accessed using the physical address (PA), said enforcement method comprising the following steps:
- generating the predefined mapping table (MPO) comprising at least part of the virtual address (VA) and the corresponding physical address (PA),
- calculating an intermediate address (IA) corresponding to said virtual address (VA), said calculation using a cryptographic function (CFO) of at least two parameters, said at least two parameters being said physical address (PA) and all or part of said virtual address (VA),
- generating a second mapping table (MP1 ) comprising the virtual address (VA) and its corresponding intermediate address (IA),
- receiving a request to access the memory (MM), said request comprising at least part of the virtual address (VA),
- using the second mapping table (MP1 ) to give the intermediate address (IA) corresponding to said at least part of the virtual address (VA),
- generating the physical address (PA) corresponding to the intermediate address (IA) by using the inverse (CF1 ) of the cryptographic function (CFO) of at least two parameters, said at least two parameters being the intermediate address (IA) and all or part of the virtual address (VA), accessing the memory (MM) using the physical address (PA).
2. Method according to claim 1 , characterised in that the cryptographic function (CFO) is an encryption of a parameter by a key, said parameter being the physical address (PA) and said key being all or part of the virtual address (VA).
3. Method according to claim 1 , characterised in that the cryptographic function (CFO) is a decryption of a parameter by a key, said parameter being the physical address (PA) and said key being all or part of the virtual address (VA).
4. Method according to any of claims 1 to 3, characterised in that at least part of the virtual address (VA) is used to address a range of consecutive addresses in the physical address space (PAS), said range of consecutive addresses being known as a page, said predetermined mapping table (MPO) comprising a virtual address (VA) of at least one page and a corresponding physical address (PA) of said page.
5. Method according to claim 4, characterised in that said pages are scrambled while keeping trace of the virtual address (VA) related to each page, the pair of virtual (VA) and physical addresses (PA) in a scrambled predetermined mapping table (MPS) being generated using the virtual address (VA) and the scrambled physical address (SPA), said scrambled predetermined mapping table (MPS) being used to generate the second mapping table (MP1 ).
6. Method according to claim 5, characterised in that the at least part of the virtual address space (VAS) maps to a read-only memory containing a program.
7. Method according to either of claims 5 or 6, characterised in that it further comprises the step of scrambling the physical address (PA) using a further cryptographic function (SCR) of at least part of the physical address and a scramble key (K), said scrambled physical address being used to access a volatile memory.
8. Method according to claim 7, characterised in that the scramble key (K) is stored in a non-volatile memory.
9. Method according to claim 7, characterised in that the scramble key (K) is changed frequently.
10. Method according to any of claims 1 to 9, characterised in that the inverse (CF1 ) of the cryptographic function (CFO) is realized in hardware.
11. Method accord ing to any of claims 1 to 1 0, characterised in that the predetermined mapping table (MPO) and the second mapping table (MP1 ) are generated remotely from the data processing system and the second mapping table (MP1 ) is loaded into a memory management module (MMU) local to the data processing system.
12. Method according to any of claims 1 to 1 1 , characterised in that it further comprises the following steps: - using at least one software key (SK1 ) as a further parameter in the cryptographic function, said further parameter being used to diversify all or part of the virtual address (VA) and/or the physical address (PA), and
- using the at least one further software key (SK2) as a further parameter in the inverse cryptographic function, said further parameter being used to diversify all or part of the virtual address (VA) and/or the intermediate address (IA).
13. System for enforcing a predefined mapping (MPO) of a virtual address (VA) to a physical address (PA) in a digital processing system comprising at least a processor (CP) and a memory (MM), said processor (CP) using the virtual address (VA) to access the memory (MM), said memory (MM) being accessed using the physical address (PA), said enforcement system characterised in that it comprises a second mapping table (MP1 ) for mapping the virtual address (VA) to a corresponding intermediate address (IA), said second mapping describing a first cryptographic function (CFO) wherein the intermediate address (IA) is equal to the physical address (PA) encrypted under all or part of the virtual address (VA), said enforcement system further comprising hardware to perform a second cryptographic function (CF1 ) wherein the physical address (PA) is equal to the intermediate address (IA) encrypted under all or part of the virtual address (VA), said second cryptographic function (CF1 ) being the inverse of the first cryptographic function (CFO).
14. System according to claim 13, characterised in that the second cryptographic function (CF1 ) is realised in hardware.
15. System according to either of claims 13 or 14, characterised in that a further cryptographic module (D) is used to further scramble the physical address (VA) to give a scrambled physical address (VA') using a key (SK) which is unique to said system.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP09781112A EP2318934A1 (en) | 2008-07-28 | 2009-07-27 | Method and apparatus for enforcing a predetermined memory mapping |
US12/737,244 US8347114B2 (en) | 2008-07-28 | 2009-07-27 | Method and apparatus for enforcing a predetermined memory mapping |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP08161284A EP2151763A1 (en) | 2008-07-28 | 2008-07-28 | Method and apparatus for obfuscating virtual to physical memory mapping |
EP08161284.8 | 2008-07-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2010012678A1 true WO2010012678A1 (en) | 2010-02-04 |
Family
ID=40040167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/EP2009/059648 WO2010012678A1 (en) | 2008-07-28 | 2009-07-27 | Method and apparatus for enforcing a predetermined memory mapping |
Country Status (3)
Country | Link |
---|---|
US (1) | US8347114B2 (en) |
EP (2) | EP2151763A1 (en) |
WO (1) | WO2010012678A1 (en) |
Families Citing this family (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8438401B2 (en) * | 2009-09-22 | 2013-05-07 | Raytheon BBN Technologies, Corp. | Device and method for securely storing data |
US9298550B2 (en) * | 2011-05-09 | 2016-03-29 | Cleversafe, Inc. | Assigning a dispersed storage network address range in a maintenance free storage container |
US20160019161A1 (en) * | 2013-03-12 | 2016-01-21 | Hewlett-Packard Development Company, L.P. | Programmable address mapping and memory access operations |
US10169076B2 (en) * | 2014-03-21 | 2019-01-01 | International Business Machines Corporation | Distributed batch job promotion within enterprise computing environments |
US9251090B1 (en) * | 2014-06-03 | 2016-02-02 | Amazon Technologies, Inc. | Hypervisor assisted virtual memory obfuscation |
US10311228B2 (en) | 2014-09-30 | 2019-06-04 | Apple Inc. | Using a fine-grained address space layout randomization to mitigate potential security exploits |
US10311227B2 (en) | 2014-09-30 | 2019-06-04 | Apple Inc. | Obfuscation of an address space layout randomization mapping in a data processing system |
US10671542B2 (en) * | 2016-07-01 | 2020-06-02 | Intel Corporation | Application execution enclave memory method and apparatus |
US10289847B2 (en) | 2016-07-29 | 2019-05-14 | Qualcomm Incorporated | Updating virtual memory addresses of target application functionalities for an updated version of application binary code |
US10740466B1 (en) * | 2016-09-29 | 2020-08-11 | Amazon Technologies, Inc. | Securing interfaces of a compute node |
US10901627B1 (en) | 2017-02-28 | 2021-01-26 | Amazon Technologies, Inc. | Tracking persistent memory usage |
US10404674B1 (en) | 2017-02-28 | 2019-09-03 | Amazon Technologies, Inc. | Efficient memory management in multi-tenant virtualized environment |
US10474359B1 (en) | 2017-02-28 | 2019-11-12 | Amazon Technologies, Inc. | Write minimization for de-allocated memory |
US10540291B2 (en) | 2017-05-10 | 2020-01-21 | Intel Corporation | Tracking and managing translation lookaside buffers |
US10579410B2 (en) | 2018-02-28 | 2020-03-03 | Red Hat, Inc. | Guest intermediate address tagging for guest applications |
US10789174B2 (en) * | 2018-02-28 | 2020-09-29 | Red Hat, Inc. | Guest intermediate address translation for virtual machines |
US20220277072A1 (en) * | 2019-08-16 | 2022-09-01 | Regents Of The University Of Michigan | Thwarting control plane attacks with displaced and dilated address spaces |
CN112597071B (en) * | 2020-12-09 | 2024-03-26 | 北京地平线机器人技术研发有限公司 | Data storage method, data acquisition device, electronic equipment and medium |
US11556482B1 (en) * | 2021-09-30 | 2023-01-17 | International Business Machines Corporation | Security for address translation services |
US12013970B2 (en) | 2022-05-16 | 2024-06-18 | Bank Of America Corporation | System and method for detecting and obfuscating confidential information in task logs |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002093387A2 (en) * | 2001-05-17 | 2002-11-21 | Koninklijke Philips Electronics N.V. | Method and device for protecting data transmission between a central processor and a memory |
WO2005015818A1 (en) * | 2003-08-07 | 2005-02-17 | Rao Mohan G R | Data security and digital rights management system |
WO2007034184A2 (en) * | 2005-09-21 | 2007-03-29 | Level 5 Networks Incorporated | Address encryption/rate pacing |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6986052B1 (en) * | 2000-06-30 | 2006-01-10 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
EP1320796A2 (en) * | 2000-09-15 | 2003-06-25 | Koninklijke Philips Electronics N.V. | Protect by data chunk address as encryption key |
US7010125B2 (en) * | 2001-01-26 | 2006-03-07 | Interntional Business Machines Corporation | Method for tracing traitor receivers in a broadcast encryption system |
US7921300B2 (en) * | 2003-10-10 | 2011-04-05 | Via Technologies, Inc. | Apparatus and method for secure hash algorithm |
US8255655B2 (en) * | 2009-10-02 | 2012-08-28 | Sandisk Technologies Inc. | Authentication and securing of write-once, read-many (WORM) memory devices |
-
2008
- 2008-07-28 EP EP08161284A patent/EP2151763A1/en not_active Withdrawn
-
2009
- 2009-07-27 EP EP09781112A patent/EP2318934A1/en not_active Ceased
- 2009-07-27 US US12/737,244 patent/US8347114B2/en active Active
- 2009-07-27 WO PCT/EP2009/059648 patent/WO2010012678A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002093387A2 (en) * | 2001-05-17 | 2002-11-21 | Koninklijke Philips Electronics N.V. | Method and device for protecting data transmission between a central processor and a memory |
WO2005015818A1 (en) * | 2003-08-07 | 2005-02-17 | Rao Mohan G R | Data security and digital rights management system |
WO2007034184A2 (en) * | 2005-09-21 | 2007-03-29 | Level 5 Networks Incorporated | Address encryption/rate pacing |
Non-Patent Citations (1)
Title |
---|
See also references of EP2318934A1 * |
Also Published As
Publication number | Publication date |
---|---|
US20110099387A1 (en) | 2011-04-28 |
EP2318934A1 (en) | 2011-05-11 |
US8347114B2 (en) | 2013-01-01 |
EP2151763A1 (en) | 2010-02-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8347114B2 (en) | Method and apparatus for enforcing a predetermined memory mapping | |
US7734932B2 (en) | System and method for securing executable code | |
US9607177B2 (en) | Method for securing content in dynamically allocated memory using different domain-specific keys | |
US8281115B2 (en) | Security method using self-generated encryption key, and security apparatus using the same | |
US9432184B2 (en) | Provisioning of secure storage for both static and dynamic rules for cryptographic key information | |
US9317449B2 (en) | Secure key access with one-time programmable memory and applications thereof | |
JP5113169B2 (en) | Method and system for obfuscating cryptographic functions | |
US9501429B2 (en) | Dynamic key and rule storage protection | |
US9081724B2 (en) | Method and device for protecting memory content using first and second addressable storage regions and first and second encryption keys | |
KR100678927B1 (en) | Method and portable storage device for allocating secure area in insecure area | |
US20060107047A1 (en) | Method, device, and system of securely storing data | |
US20210334381A1 (en) | Method and electronic device capable of securely storing and loading firmware | |
US20060294370A1 (en) | Method, device, and system of maintaining a context of a secure execution environment | |
WO2009073863A1 (en) | Secure software download | |
NZ555998A (en) | Method and portable storage device for allocating secure area in insecure area | |
CN106209346B (en) | White-box cryptography interleaving lookup table | |
CN107563226B (en) | Memory controller, processor module and key updating method | |
US20230409700A1 (en) | Systems and methods for managing state | |
US20080022371A1 (en) | Method and System for Improved Fault Tolerance in Distributed Customization Controls Using Non-Volatile Memory | |
WO2010070506A1 (en) | Establishing a secure memory path in a unitary memory architecture | |
KR101236991B1 (en) | Apparatus and method for encrypting hard disk |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 09781112 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 12737244 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2009781112 Country of ref document: EP |