Method for executing a binary code of a secure function with a microprocessor
US-2021004456-A1 · Jan 7, 2021 · US
US12174939B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-12174939-B2 |
| Application number | US-202217650885-A |
| Country | US |
| Kind code | B2 |
| Filing date | Feb 14, 2022 |
| Priority date | Mar 9, 2021 |
| Publication date | Dec 24, 2024 |
| Grant date | Dec 24, 2024 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A method for the execution of a binary code defining a data structure including a particular field to be read using a pointer, this method including writing, to the main memory, the value of the particular field associated with a first identifier of a pointer that points directly to this particular field, this identifier being determined from an identifier of the particular field that differs for all of the fields of the data structure that are adjacent to the particular field, and then constructing a pointer that points directly to this particular field, this construction including determining an identifier of this constructed pointer, and then checking that the identifier constructed in step b) corresponds to the identifier associated with this particular field in step a), and when these pointer identifiers do not match, triggering the signaling of an execution fault.
Opening claim text (preview).
The invention claimed is: 1. A method for execution of a binary code of a computer program by a microprocessor, said binary code defining a data structure comprising multiple fields able to be accessed independently of one another, including a particular field to be read using a pointer, said method comprising: (a) writing, to a main memory, a value of the particular field, which is associated with a first field pointer identifier, said first field pointer identifier identifying a field pointer to be used to read the value of said particular field, and (b) reading the value of said particular field of the data structure from the main memory, said reading step comprising the following operations: (b1) obtaining a data structure pointer that points to a start of the data structure, said data structure pointer containing a first range of bits containing a starting address of the data structure in an address space of the computer program, and a second, different range of bits containing a data structure pointer identifier, said data structure pointer identifier to uniquely identifying said data structure pointer among a set containing multiple different data structure pointers implemented in a same execution of the binary code by said microprocessor, (b2) constructing the field pointer that points directly to the particular field of the data structure to be read, said field pointer containing a first range of bits containing a starting address of the particular field in the address space of the computer program, and a second range of bits containing a second field pointer identifier, said constructing operation (b2) comprising the following sub-operations: (b2.1) determining the starting address of the particular field from the starting address contained in the first range of bits of the data structure pointer and a position of the particular field with respect to the start of the data structure, and (b2.2) determining the second field pointer identifier from the data structure pointer identifier contained in the second range of bits of the data structure pointer obtained in operation (b1), (b3) loading, from the main memory, the value of the particular field using the address contained in the first range of bits of the field pointer constructed in operation (b2), and (b4) checking that the second field identifier contained in the second range of bits of the field pointer constructed in operation (b2) corresponds to the first field pointer identifier associated with the particular field when said value is written to the main memory, and when the first and second field pointer identifiers do not match, triggering a signalling of an execution fault, and when the first and second field point identifiers match, suppressing the triggering of the signalling of an execution fault and processing, with the microprocessor, the loaded value of the particular field, wherein in step (a), the first field pointer identifier associated with the particular field is determined from the data structure pointer identifier and from an identifier of the particular field that differs for all fields of the data structure that are adjacent to the particular field to be read, and in operation (b2), the second field pointer identifier is additionally determined from the same identifier of the particular field in order to obtain the second field pointer identifier that systematically corresponds to the first field pointer identifier when the data structure pointer identifier is identical to one used to determine the first field pointer identifier. 2. The method according to claim 1 , wherein: structures of the data structure pointer and of the field pointers are identical, and locations of the first and second ranges of bits in the data structure pointer and in the field pointers are identical. 3. The method according to claim 2 , wherein: a data structure of higher rank is embedded within a data structure of lower rank, said data structure of higher rank corresponding to a first particular field of the data structure of lower rank and the data structure of higher rank comprising a second particular field to be read using a pointer, operations (b1) and (b2) are executed a first time for the data structure of lower rank and for said first particular field in order to obtain a first field pointer that points directly to a start of the first particular field, and then operations (b1) and (b2) are executed a second time for the data structure of higher rank and for the second particular field in order to obtain a second field pointer that points directly to a start of the second particular field, in the first execution of operation (b1), the data structure pointer points to the start of the data structure of lower rank, in the first execution of operation (b2), a first identifier of the first particular field is used to construct the first field pointer, in the second execution of operation (b1) for the data structure of lower rank, the data structure pointer that is obtained is identical to the first field pointer constructed in the first execution of operation (b2), in the second execution of operation (b2), a second identifier of the second field is used to construct the second field pointer, and operations (b3) and (b4) are executed using the starting address and the second field pointer identifier contained, respectively, in the first and second ranges of bits of the second field pointer constructed in the second execution of operation (b2). 4. The method according to claim 1 , wherein sub-operation (b2.2) comprises determining the second field identifier from the position of the particular field with respect to the start of the data structure. 5. The method according to claim 4 , wherein, when the particular field is a first field of the data structure, the second identifier of said particular field is systematically zero, such that the field pointer identifier constructed for said particular field is identical to the data structure pointer identifier contained in the second range of bits of the data structure pointer. 6. The method according to claim 1 , wherein step (a) comprises operations of: (a1) obtaining the data structure pointer that points to the start of the data structure, (a2) determining the first field pointer identifier from the data structure pointer identifier contained in the second range of bits of the data structure pointer obtained in operation (a1), and the identifier of the particular field, and (a3) storing, in the main memory, the value of the particular field associated with the first field pointer identifier determined in operation (a2). 7. The method according to claim 6 , wherein operation (a1) comprises: the microprocessor executing an instruction to dynamically allocate a memory area in order to store the data structure therein, said allocation instruction being contained in the binary code of the computer program, and in response: reserving, in the address space of the computer program, a memory area of a size equal to a size of the data structure, to and from which the microprocessor is able to write and read the values of the fields of said data structure, and generating the data structure pointer that contains, in the first range of bits, the starting address of the reserved memory area and, in the second range of bits, the data structure pointer identifier. 8. The method according to claim 6 , wherein: step (a) further comprises: constructing one or more cryptograms from the value of the particular field to be written, computing one or more first tags for checking an integrity of each of the constructed cryptograms, said first tag being computed from the constructed cryptogram and using the first field pointer identifier
Test or assess software · CPC title
Decompilation; Disassembly · CPC title
Pointers; Aliasing · CPC title
during program execution, e.g. stack integrity {; Preventing unwanted data erasure; Buffer overflow} · CPC title
by adding security routines or objects to programs · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.