IP Library Granted Patent US 11,256,786
Granted Patent B2
US 11,256,786 · App. 16/481,428 · Granted Feb 22, 2022

Method to secure a software code

Inventors: Eric Garreau (Meudon, FR); Sébastien Volpe (Meudon, FR); Peter Garba (Munich, DE)
Assignees: THALES DIS FRANCE SAS; THALES DIS CPL Deutschland GmbH
G06F21/125G06F21/14G06F2221/0724G06F2221/0748
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,256,786
App. No.
16/481,428
Granted
Feb 22, 2022
Kind
B2
Abstract

The present invention relates to method of securing a software code comprising at least one constant value, said method generating a secure software code and comprising the steps of: —determining (S 1 ) by a processor in the software code a constant value to be protected, —inserting (S 2 ) by the processor in the software code an indexed array of values such that the constant value to be protected can be determined from one value of the array, —replacing (S 3 ) by the processor in the software code the constant value to be protected by a replacement variable, —inserting (S 4 ) by the processor in the software code a first sequence of instructions which, when executed at runtime: •computes the index in the array of the value from which the constant value to be protected can be determined, •extracts from said array the value located at said computed index in said array, •from said extracted value, determines the constant value to be protected, •sets the value of said replacement variable equal to the determined constant value.

Claims (40)

1. A method of securing a software code (SC) comprising at least one constant value, said method generating a secure software code (SSC) and comprising the steps of:

determining (S 1 ) by a processor ( 21 ) in the software code a constant value to be protected,

inserting (S 2 ) by the processor in the software code an indexed array of values such that the constant value to be protected can be determined from one value of the array (X),

replacing (S 3 ) by the processor in the software code the constant value to be protected by a replacement variable,

inserting (S 4 ) by the processor in the software code a first sequence of instructions which, when executed at runtime:

computes (E 1 ) the index (i) in the array of the value (X) from which the constant value to be protected can be determined,

extracts (E 2 ) from said array the value (X) located at said computed index (i) in said array,

from said extracted value (X), determines (E 3 ) the constant value to be protected,

sets (E 4 ) the value of said replacement variable equal to the determined constant value;

wherein the first sequence of instructions comprises a second sequence of instructions which, when executed at runtime, returns a first intermediate value (v), and a third sequence of instructions which, when executed at runtime, applies a first transformation function (f) to said first intermediate value (v) to compute said index (i), and

wherein the first transformation function (f) is selected at random in a first set of predetermined transformation functions.

2. The method of claim 1 wherein said value (X) in the array from which the constant value to be protected can be determined is equal to the constant value to be protected.

3. The method of claim 1 wherein the constant value to be protected is a memory address and values in said array are valid memory addresses when the software code is executed by a processor.

4. The method of claim 1 wherein the first sequence of instructions includes:

a fourth sequence of instructions which, when executed at runtime, determines a second intermediate value (m) by applying a second transformation function (g) to said first intermediate value (v),

a fifth sequence of instructions which, when executed at runtime, determines the constant value to be protected based on the extracted value (X) and the second intermediate value (m).

5. The method of claim 4 wherein the second transformation function (g) is selected at random in a second set of predetermined transformation functions.

6. The method of claim 4 wherein the constant value to be protected is determined by applying a third transformation function to the extracted value and the second intermediate value.

7. The method of claim 4 wherein a third transformation function (h) is selected at random in a third set of predetermined transformation functions.

8. The method of claim 1 wherein the constant value to be protected is a memory address and values in said array are invalid memory addresses when the software code is executed by a processor.

9. A non-transitory machine-readable storage medium encoded with instructions of a secure software code for execution by a processor ( 31 ), wherein:

said secure software code is a modified version of an unsecure software code comprising a constant value to be protected,

said constant value to be protected is replaced in the secure code by a replacement variable,

the non-transitory machine-readable storage medium is also encoded with:

an indexed array of values such that said constant value to be protected can be determined from one value (X) of the array,

a first sequence of instructions which, when executed at runtime:

computes (E 1 ) the index (i) in the array of the value (X) from which said constant value to be protected can be determined,

extracts (E 2 ) from said array the value (X) located at said computed index (i) in said array,

from said extracted value (X), determines (E 3 ) said constant value to be protected,

sets (E 4 ) the value of said replacement variable equal to said determined constant value,

said first sequence of instructions comprising a second sequence of instructions which, when executed at runtime, returns a first intermediate value (v), and a third sequence of instructions which, when executed at runtime, applies a first transformation function (f) to said first intermediate value (v) to compute said index (i), said first transformation function (f) being selected at random in a first set of predetermined transformation functions.

10. A method of executing instructions of a secure software code for execution by a processor ( 31 ), wherein:

said secure software code is a modified version of an unsecure software code comprising a constant value to be protected,

said constant value to be protected is replaced in the secure code by a replacement variable,

said secure software code also comprises an indexed array of values such that said constant value to be protected can be determined from one value (X) of the array,

said method comprising the steps of:

computing (E 1 ) the index (i) in the array of the value (X) from which said constant value to be protected can be determined by applying a first transformation function (f) to a first intermediate result (v), said first transformation function (f) being selected at random in a first set of predetermined transformation functions,

extracting (E 2 ) from said array the value (X) located at said computed index (i) in said array,

from said extracted value (X), determining (E 3 ) said constant value to be protected,

setting (E 4 ) the value of said replacement variable equal to said determined constant value.

Assignments (3)
CHANGE OF NAME Recorded Feb 10, 2022
From: SFNT GERMANY GMBH
To: THALES DIS CPL DEUTSCHLAND GMBH
Reel/Frame 059010/0263 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 17, 2020
From: GARREAU, ERIC; VOLPE, SÉBASTIEN
To: THALES DIS FRANCE SA
Reel/Frame 054391/0496 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 17, 2020
From: PETER, GARBA
To: SFNT GERMANY GMBH
Reel/Frame 054391/0684 →
Priority Claims (1)
EP 17153413 · Jan 26, 2017 · regional
Continuity (1)
Related Publication 20210133299A1 · May 6, 2021