Patent Description:
The present invention is notably applicable to a first processor that may be included in a first device, like e.g., a Personal Computer (or PC), and a second processor that may be included in a second device, like e.g., a server or a HardWare (or HW) token.

The chip, such as a chip included within a Smart Card (or SC), a Universal Serial Bus (or USB) dongle or a HW token, may be embedded in or removable from the first device.

The chip may be included within a Secure Element (or SE).

Within the present description, an SE is a smart object including a chip(s) that protect(s), as a tamper resistant HW component(s), access to stored and processed data and is intended to communicate data with one or several devices, such as a PC, a Machine to Machine (or M2M), an Internet of Things (or IoT) device, a server and/or the like.

The present invention is applicable to a first processor and a second processor that are both included in one and the same device, like e.g., a PC, a tablet or a mobile (tele)phone, or any computing device.

<CIT> describes a solution in which a portion of a SW application code is converted into a code and the converted code is sent to a HW token and executed exclusively by the HW token. Such a solution allows protecting a corresponding function of the SW application that is supported by a PC from being reverse-engineered.

There is a need to provide an alternative solution that allows protecting a SW application during its execution.

<CIT> discloses a supervisor processor monitoring the execution of a program to detect anomalies with respect to the benign control flow and takes a security action if necessary.

The invention proposes a solution for satisfying the just herein above specified need by supplying a method for managing an execution of a program relating to at least a part of a first application, as a first application program.

According to the invention, the method comprises:.

The first processor and the second processor may be separated from each other.

It is noteworthy that the invention method may be implemented by a single processor that is able to carry out several threads, as a multi-thread processor that is able to execute multiple processes (or threads) concurrently, namely the process relating to the first control flow and the other process relating to the second application(s).

The second processor plays, when executing the second application(s), a role of a checker of a normal or right flow of an execution, by a first processor, of a program relating to a part or a whole first application, as a first application program.

The second processor uses, on its own, when executing the second application(s), the predefined variable(s) during the running of the first application flow. In other words, the first processor does not know what and how the second processor processes in parallel during the running of the first application program.

The control of the predefined variable(s) only by the second processor allows determining, when executing by the second processor the concerned second application, whether the first processor is or is not executing the right first control flow.

The invention solution allows, based on a use, by the second processor, of a predefined variable(s), detecting, dynamically, i.e. during an execution of a first application program, by executing all of the second application(s), a normal or an abnormal behaviour of the first processor that is executing the first application program.

The invention solution allows, based on a tracking by the second processor, controlling a flow of an execution of at least a part of the first application.

The invention solution allows improving notably the protection of an execution of the first application program.

According to a further aspect, the invention is a system for managing an execution of a program relating to at least a part of a first application, as a first application program.

According to the invention, the system comprises a first device and a second device. The first device comprises a first processor. The second device comprises a second processor. The first processor is configured to execute a first control flow. The second processor is configured to execute, in synchronization with the first control flow execution, at least one second application, the at least one second application comprising, each, when executed in synchronization with the first control flow execution, at least one predetermined variable and at least one expected value that the at least one predetermined variable has to have or at least one predetermined condition that the at least one predetermined variable has to satisfy to authorize an execution of the right first control flow by the first processor. The second processor is configured to determine, when executing the at least one second application, at least one transition decision between at least two first nodes of the at least two separated branches. Each of the at least two branches is associated with a corresponding predetermined condition. To determine the at least one transition decision, the second processor is configured to determine a branch, among the at least two separated branches, to be executed when the corresponding predetermined condition associated with the branch is satisfied. The at least one transition decision is conditional (<NUM> or <NUM>) to continue from an execution of the current node to an execution of a first node of the determined branch of the at least two separated branches. The second processor is configured to control, when executing the at least one second application, based on the determined at least one transition decision, the first node of the determined branch to be executed by the first processor.

The second processor is configured to verify, by executing each of the at least one second application, whether the at least one predetermined variable has or has not the at least one expected value or whether the at least one predetermined variable does or does not satisfy the at least one predetermined condition. And the second processor is configured to infer, if, for all of the at least one second application executed by the second processor, the at least one predetermined variable has the at least one expected value or the at least one predetermined variable satisfies the at least one predetermined condition, that the first processor is executing the right first control flow. Or the second processor is configured to infer, if, for at least one of the at least one second application executed by the second processor, the at least one predetermined variable has not the at least one expected value or the at least one predetermined variable does not satisfy the at least one predetermined condition, that the first processor is not executing the right first control flow.

As to the first processor, it may be included in a mobile phone, a laptop, a tablet, a netbook, a vehicle (like e.g., a car, a van or a truck), a Personal Digital Assistant (or PDA), a server or any computing device, as a first device.

As to the second processor, it may be included in a mobile phone, a laptop, a tablet, a netbook, a vehicle, a PDA, a HW token, a server or any computing device, as a second device that is distinct from the first device.

According to a further aspect, the invention is a device for managing an execution of a program relating to at least a part of a first application, as a first application program.

According to the invention, the device comprises a first processor and a second processor. The first processor is configured to execute a first control flow. The second processor is configured to execute, in synchronization with the first control flow execution, at least one second application, the at least one second application comprising, each, when executed in synchronization with the first control flow execution, at least one predetermined variable and at least one expected value that the at least one predetermined variable has to have or at least one predetermined condition that the at least one predetermined variable has to satisfy to authorize an execution of the right first control flow by the first processor.

The second processor is configured to determine, when executing the at least one second application, at least one transition decision between at least two first nodes of the at least two separated branches. Each of the at least two branches is associated with a corresponding predetermined condition. To determine the at least one transition decision, the second processor is configured to determine a branch, among the at least two separated branches, to be executed when the corresponding predetermined condition associated with the branch is satisfied. The at least one transition decision is conditional (<NUM> or <NUM>) to continue from an execution of the current node to an execution of a first node of the determined branch of the at least two separated branches. The second processor is configured to control, when executing the at least one second application, based on the determined at least one transition decision, the first node of the determined branch to be executed by the first processor.

The second processor is configured to verify, by executing each of the at least one second application, whether the at least one predetermined variable has or has not the at least one expected value or whether the at least one predetermined variable does or does not satisfy the at least one predetermined condition. And the second processor is configured to:.

Additional features and advantages of the invention will be more clearly understandable after reading a detailed description of two preferred embodiments of the invention, given as indicative and non-limitative examples, in conjunction with the following drawings:.

Herein under is considered a particular embodiment in which the invention method for managing an execution of a program relating to at least a part of a first application, as a first application program, is implemented by using a PC, as a first device, that includes a first processor and a HW token, as a second device, that includes a second processor.

Alternately, instead of a chip included in a separated device, the chip is a Trusted Execution Environment (or TEE), as a secure area of the second processor and a secured runtime environment in the first device. According to such an embodiment (not represented), instead of using two different devices, only one device is used to include both the first processor and the second processor.

The chip(s) is(are) preferably included within an SE.

The HW token may have different form factors.

The chip may be incorporated, possibly in a removable manner, in a Printed Circuit Board (or PCB) of the chip host device.

As a removable token, it may include a smart dongle of the USB type, a (micro) Secure Digital (or SD) type card, a Multi-Media type Card (or MMC), a Subscriber Identity Module (or SIM) type card or any format medium able to include the chip.

According to another embodiment (not represented), instead of being carried by another medium, as an external HW token, the chip is embedded in the first device itself, as a chip host device and one and the same computing device.

Naturally, the described embodiment is only for exemplifying purposes and is not considered to reduce the scope of the invention.

<FIG> shows schematically a system <NUM> for managing an execution of a program relating to at least a part of a first application, as a first application program. The system <NUM> comprises a PC <NUM>, as a first computing device, and a chip <NUM>, as a second computing device.

The PC <NUM> comprises a Central Processing Unit(s) (or CPU), a (micro)processor(s) and/or a (micro)controller(s), as first data processing means (not represented), a memory(ies), as data storing means (not represented), and one or several Input/Output (or I/O) interfaces that are internally connected to each other.

The first data processing means includes a first processor.

The PC <NUM> may include (or be connected to) a display screen <NUM> used for displaying information and a keyboard <NUM> used for selecting or entering information, as a Man Machine Interface (or MMI). The MMI allows a user (not represented) to interact with the PC <NUM>.

The PC <NUM> supports (or includes) notably at least one Operating System (or OS).

The PC <NUM> also supports (or includes) one or several (SW) applications that include a first application to be at least partly protected during its execution.

The first processor is used for executing the first application.

The PC <NUM> is connected or coupled, over a first ContacT (or CT) or ContacTLess (or CTL) link(s) <NUM>, to (or incorporates) the chip <NUM>.

The CTL communication protocol(s) include(s) e.g., a BluetooTH (or BTH) type protocol, a Bluetooth Low Energy (or BLE) type protocol, a Near Field Communication (or NFC) type protocol, a Zigbee type protocol and/or a Wi-Fi type protocol. The CTL communication protocol(s) may include any other wireless communication protocol that is supported by the PC <NUM> and the chip <NUM> and that allows communicating data between the PC <NUM> and the chip <NUM>.

The chip <NUM> comprises a (micro)processor(s) and/or a (micro)controller(s), as second data processing means <NUM>, a memory(ies), as data storing means <NUM>, and one or several I/O interfaces <NUM> that are internally connected, through a control and data bus <NUM>, to each other.

The second data processing means includes a second processor.

The chip <NUM> supports (or includes) notably at least one OS and one or several (SW) applications that include one or several second applications.

The second processor is preferably arranged to verify the presence of an authorization of an execution, by the first processor, of the first application to be protected, prior to its execution (or running) by the first processor. Such an authorization presence verification allows preventing any unauthorized use of the first application. Such an authorization presence verification allows binding the first application with a presence of the second processor.

At least some of the second application(s) may be written, as an applet(s), in a Java programming language, and may be executed by a Virtual Machine (or VM) embedded in the chip <NUM>.

At least some of the second application(s) is loaded (or downloaded), individually or collectively, dynamically and prior to be executed by the second processor, and preferably in an encrypted and signed manner, in the chip <NUM>. The chip <NUM> verifies, based on received signed data relating to each concerned second application and a sender public key, that the sender of the concerned second application is the alleged and authorized sender and, only when the sender is successfully authenticated, decrypts the encrypted second application on-the-fly.

Then, the chip <NUM> memory(ies) store(s) the second application(s).

Each of the second application(s) is to be executed by the second processor to protect an execution, by the first processor, of at least a part of the first application.

Each of the second application(s) is executed by the second processor to conclude or infer that the first control flow is or is not the right first control flow that is being executed synchronously by the first processor.

The second processor is arranged to execute, in synchronization with the first control flow execution by the first processor, the second application(s).

The second application(s) comprises, each, when executed by the second processor in synchronization with the first control flow execution, one or several predefined variables and one or several associated expected values which the predefined variable(s) has(have) to have and/or one or several predetermined conditions which the predefined variable(s) has(have) to satisfy to authorize an execution of the right first control flow by the first processor.

The second processor is adapted to verify, while executing the (or each of the) second application(s) in synchronization with the first control flow that is being executed, by the first processor, whether one or several predefined variables have or have not, each, the associated expected value and/or whether one or several predefined variables do or do not satisfy the predetermined condition(s).

The second processor is configured to infer, if, for each of all of the second application(s) executed by the second processor, the predefined variable(s) has(have) the expected value(s) and/or the predefined variable(s) satisfies(y) the predetermined condition(s), that the first processor is executing the right first control flow.

When detecting such a normal behavior for the whole of the first control flow (i.e. all of the node(s) comprised in the first control flow) execution, the second processor is adapted to authorize the first processor to execute the right first control flow.

The second processor is configured to infer, if, for one or several of the second applications executed by the second processor, one or several predefined variables do not have the expected value(s) and/or the predefined variable(s) do(es) not satisfy the predetermined condition(s), that the first processor is not executing the right first control flow.

When detecting such an abnormal behavior (or an anomaly(ies) or a misbehavior) of the first control flow execution, the second processor is preferably adapted to forbid the first processor to execute the right first control flow, i.e. at least a current node and/or a next node(s) included in the right first control flow. Instead of executing, by the first processor, the right first control flow, the second processor is preferably adapted to re-direct to one or several predetermined instructions to be executed by the first or second processor. Such predetermined instruction(s) allow(s), when executed by the first or second processor, to issue no result or a result value that is distinct from a right result value that is issued only when the right first control flow is effectively executed by the first processor. While issuing no result or a result value that is distinct from a right result value, the first or second processor has a wrong or incorrect behavior that is distinct from the right or correct behavior by which the first processor executes the right first control flow.

Such a managing, by the second processor that executes the second application(s), of execution of a first application program allows detecting that an execution, by the first processor, of the first control flow has or has not been modified with respect to the right first control flow, as a normal or an abnormal behavior of the first control flow respectively.

The synchronization of the second application execution by the second processor with the first control flow execution by the first processor allows obfuscating the first control flow execution, in order to prevent the first application from being reverse-engineered.

The first control flow execution obfuscation contributes to disguise the first application program flow execution.

<FIG> depicts a first example of a first control flow graph <NUM> and a second application(s) that is(are) being executed, by the second processor, synchronously with the first control flow execution.

The first processor is executing the first control flow.

The first control flow includes one or several nodes.

Each node of the first control flow includes a set of one or several instructions, as a basis block.

Each node to be executed and each transition from one node to the following or next node of the first control flow graph may be associated with a second application(s) executed by the second processor in synchronization with the first control flow.

The second processor manages, when executing the second application, a predefined variable(s) to be compared to an associated expected (or reference) value(s) or a predetermined condition(s) to be satisfied by a predefined variable(s), when executing, by the first processor, concurrently the first control flow.

The second processor generates preferably, by executing the concerned second application, the expected value(s) associated with the predefined variable(s) in an autonomous manner, by using like e.g., a predefined input parameter "x" that either is assigned a specific expected value or has a value that is a result of a predefined function of either the predefined input parameter f(x), like e.g., the function "x+<NUM>" (or "x++" in C language) and/or a predefined internal state variable(s), like e.g., a function g that uses the expected identifier of the current node of the right first control flow, such as "x=x+current node" in C language.

Each of the second application(s) comprises one or several predefined variables, one or several expected (or reference) values associated with the predefined variables and/or one or several predetermined conditions that one or several predefined variables have to satisfy, so as to authorize an execution of the right first control flow.

Advantageously, each of the predefined variable(s) is internally used by the second processor, when executing the concerned second application.

Each of the predefined variable(s) may include one or several predetermined input parameters and/or one or several predetermined internal state variables.

The predetermined internal state variable(s) may include one or several predefined identifiers relating to one or several corresponding nodes to be executed in the first control flow by the first processor.

The predefined internal state variable(s) may include:.

It is assumed that the first example of the first control flow graph includes:.

Prior to executing the first node <NUM>, the first processor may have executed a previous node <NUM> (of the first control flow) that has been assigned the unique number e.g., "N-<NUM>", as an identifier relating to the previous node. While executing, by the first processor, the first node <NUM> in the first control flow, the second processor knows that the right first control flow includes a corresponding previous node 21a.

The first processor is executing the first node <NUM>, as the current node to be executed in the first control flow.

The second processor is executing, in synchronization with the first control flow execution, a second application associated with the first node <NUM>.

The second processor knows that the right first control flow includes a corresponding first node 22a.

The second application comprises one or several predefined variables that have to have expected (or reference) values and/or that have to satisfy one or several predetermined conditions, so as to authorize, when the second processor is executing the second application, a parallel execution of the first node <NUM> of the first control flow.

The second processor verifies <NUM>, when executing the second application, whether the predefined variable(s) do(es) or do(es) not have the expected value(s), like e.g., whether the previous node has or has not the expected identifier "N-<NUM>" relating to the previous node 21a of the right first control flow and/or whether the next node has or has not the expected identifier "N+<NUM>" relating to a next node 24a of the right first control flow and/or whether the current node has or has not the expected identifier "N" relating to the current node 22a of the right first control flow.

The second processor infers <NUM>, when executing the second application, that, if the predefined variable(s) do(es) not have the expected value(s), like e.g., the previous node has not the expected identifier "N-<NUM>" relating to the previous node 21a of the right first control flow and/or the next node has not the expected identifier "N+<NUM>" relating to a next node 24a of the right first control flow and/or the current node has not the expected identifier "N" relating to the current node 22a of the right first control flow, that the first processor is not executing the right current node 22a included in the right first control flow.

In such a misbehavior (or wrong behavior) detection case, i.e. the predefined variable(s) do(es) not have the expected value(s), for the second application executed by the second processor, the second processor executes preferably a predetermined instruction(s). The predetermined instruction(s) allow(s), when executed, to issue either no result or a result value that is distinct from a right result value that is issued only when the right first control flow is effectively executed by the first processor.

Otherwise, the second processor infers <NUM>, when executing the second application, that, if the predefined variable(s) has(have) the expected value(s), like e.g., the previous node has the expected identifier "N-<NUM>" relating to the previous node 21a of the right first control flow and/or the next node has the expected identifier "N+<NUM>" relating to a next node 24a of the right first control flow and/or the current node has the expected identifier "N" relating to the current node 22a of the right first control flow, that the first processor is executing the right current node 22a included in the right first control flow.

In such a right behavior detection case, i.e. the predefined variable(s) has(have) the expected value(s), the second processor authorizes, when executing the second application, to continue the right first control flow execution by the first processor.

Then, the first processor is executing the second node <NUM>, as the current node to be executed in the first control flow.

The second application comprises one or several predefined variables that have to have expected (or reference) values and/or that have to satisfy one or several predetermined conditions, so as to authorize, when the second processor is executing the second application, a parallel execution of the second node <NUM> of the first control flow.

The second processor knows that the right first control flow includes a corresponding second node 24a.

The first control flow graph then includes two (or more) separated branches <NUM> and <NUM>. A first branch <NUM> includes the third node <NUM>, as the first node of the first branch <NUM>, while a second branch <NUM> includes the fourth node <NUM>, as the first node of the second branch <NUM>, the fifth node <NUM>, the fifth node <NUM> (or the seventh node <NUM>) and the eight node <NUM>. The second processor determines, when executing the (or another) second application, one transition decision between two first nodes of the two separated branches <NUM> and <NUM>.

The transition decision is conditional to continue from an execution of the current node to an execution of a first node of one branch of the two separated branches <NUM> and <NUM> or a first node of another branch of the at least two separated branches <NUM> and <NUM>.

To determine the transition decision between two first nodes of the two separated branches <NUM> and <NUM>, the second processor verifies <NUM>, when executing the second application, which one of the predetermined condition(s) is(are) or not satisfied, like e.g., "if (x<<NUM>) Next Node=N+<NUM>; else Next Node=N+<NUM>" or "if (x<((<NUM>*Current Node)+<NUM>)) Next Node=N+<NUM>; else Next Node=N+<NUM>", so as to determine which branch is to be executed. The transition decision depends preferably on one or several predefined variables. The predefined variable(s) include(s) a predetermined input parameter(s), such as "x", and/or a predetermined internal state variable(s), such as "Current Node".

The predefined variables are used only by the second processor, when executing the second application, i.e. inside the HW token, and are not visible from the outside.

For example, based on the value(s) of the used predefined variable(s), if a condition(s) is satisfied, like e.g., "x<<NUM>; Next Node=N+<NUM>" or "x<((<NUM>*Current Node)+<NUM>; Next Node=N+<NUM>", then the first or the second processor is executing, under control of the second processor that is executing the second application, the third node <NUM>, as the first node of the first branch <NUM>, in the right first control flow. The second processor knows that the right first control flow includes a corresponding third node 26a.

Once the third node <NUM> is executed by the first or second processor, the first processor is executing the second node <NUM>, as the next node to be executed in the right first control flow.

If an(other) condition(s) is satisfied, like e.g., "x>=<NUM>; Next Node=N+<NUM>" or "x>=((<NUM>*Current Node)+<NUM>; Next Node=N+<NUM>", then the first or the second processor is executing, under control of the second processor that is executing the second application, the fourth node <NUM>, as the first node of the second branch <NUM>, in the right first control flow. The second processor knows that the right first control flow includes a corresponding fourth node 28a.

Then, the first processor is executing the fifth node <NUM>, as the current node to be executed in the first control flow.

The second application comprises one or several predefined variables that have to satisfy one or several predetermined conditions, so as to authorize, when the second processor is executing the second application, a parallel execution of the fifth node <NUM> of the first control flow.

The second processor knows that the right first control flow includes a corresponding fifth node 210a.

The first control flow graph then includes two (or more) separated branches <NUM> and <NUM> in a context of an opaque predicate. A first branch <NUM> includes the seventh node <NUM>, as the first node of the first branch <NUM>, and the eight node <NUM>, while a second branch <NUM> includes the eighth node <NUM>, as the first node of the second branch <NUM>, and the eight node <NUM>. The second processor determines, when executing the (or another) second application, one transition decision between two first nodes of the two separated branches <NUM> and <NUM>.

To determine the transition decision between two first nodes of the two separated branches <NUM> and <NUM>, the second processor verifies <NUM>, when executing the second application, which predetermined condition(s) is(are) satisfied, like e.g., "if ((Current Node==<NUM>) && (x==<NUM>)) Next Node=(N+<NUM>)b; return (TRUE); else Next Node=(N+<NUM>)a, return (FALSE)", so as to determine which branch is to be executed. The transition decision depends preferably on one or several predefined variables. The predefined variable(s) include(s) a predetermined input parameter(s), such as "x", and/or a predetermined internal state variable(s), such as "Current Node".

The predefined variables are used exclusively by the second processor, when executing the second application, i.e. inside the HW token, and are not visible from the outside.

For example, based on the value(s) of the used predefined variable(s), if a condition(s) is satisfied, like e.g., "((Current Node==<NUM>) && (x==<NUM>))", then the first or the second processor is executing, under control of the second processor that is executing the second application, the seventh node <NUM>, as the first node of the second branch <NUM>, in the right first control flow.

Thus, the second processor controls, when executing the at least one second application, based on the determined (or taken) transition decision, the first node of the second branch <NUM> (or the first branch <NUM>) to be next executed by the first processor.

The second processor, when executing the second application, influences the control flow of the first application (and possibly the control flow of the second application to verify the control flow of the first application), depending on the condition(s) that is(are) satisfied.

The second processor knows that the right first control flow includes a corresponding seventh node 214a.

Once the seventh node <NUM> is executed by the first or second processor, the first processor is executing the eight node <NUM>, as the next node to be executed in the right first control flow. The second processor knows that the right first control flow includes a corresponding seventh node 216a.

If at least an(other) condition(s) is satisfied, like e.g., Current Node is different from the value "<NUM>" and/or x is different from the value "<NUM>", then the second processor is executing the sixth node <NUM>, as the first node of the second branch <NUM>, which is not included in the right first control flow. In such a case, for the second application executed by the second processor, the predetermined variable(s) do(es) not satisfy the predetermined condition(s), the second processor executes one or several predetermined instructions that belong to the sixth node <NUM>. When the second processor has executed the sixth node <NUM>, the second processor issues either no result or a result value that is distinct from a right result value that is issued only when the right first control flow is effectively executed by the first processor.

A possible attacker needs to reverse engineer the two branches which represents an additional effort for the attacker.

<FIG> depicts a second example of a first control flow graph <NUM> and a second application(s) that is(are) being executed, by the second processor, synchronously with the first control flow execution, when applicable.

It is assumed that the second example of the first control flow graph includes:.

The second processor knows that the right first control flow includes a corresponding first node (not represented).

The second application comprises one or several predefined variables, such as a predetermined input parameter, like e.g., "x", that are set <NUM> to predefined values, like e.g., "x=<NUM>", so as to authorize, when the second processor is executing the second application, a parallel execution of the first node <NUM> of the first control flow by the first processor.

The first processor is executing the second node <NUM>, as the current node to be executed in the first control flow.

The first control flow includes e.g. the second node <NUM>, as a dispatching node.

According to another embodiment, instead of only one dispatching node, the first control flow has several dispatching nodes.

Each dispatching node is used for obfuscating the first control flow and contributes to disguise the first control flow.

The dispatching node <NUM> is associated with a second application.

The second processor knows that the right first control flow includes a corresponding second node (not represented).

The second application comprises one or several predetermined variables, such as a predetermined next node to be executed after the dispatching node, as a predetermined internal state variable, in association with an expected value(s) to be assigned to the predetermined variable and in association possibly with one or several predetermined conditions <NUM> to be satisfied to switch to (or continue with) an execution of a next predetermined node, so as to authorize, when the second processor is executing the second application, a parallel execution of the second node <NUM> of the first control flow by the first processor.

The second application comprises e.g., what follows in C language:
Switch (node)
{
case <NUM>:
Node=<NUM>; break;
case <NUM>:
Node=<NUM>; break;
case <NUM>:
if (x<<NUM>)
Node=<NUM>;
else
Node=<NUM>;
break;
case <NUM>:
Node=<NUM>; break;
}.

Since the predetermined internal state variable is exclusively used by the second processor, the concerned predetermined internal state variable is not visible from outside the second processor and makes it therefore harder for an attacker to rebuild the dispatching logic and thus the first control flow. In addition to that, it is also difficult to brute force the dispatching logic in an isolated manner.

For example, based on the value(s) of the used predefined variable(s), possibly if a predetermined condition(s) is satisfied by the concerned predefined variable(s), like e.g., "if (x<<NUM>))", then the first or the second processor is executing, under control of the second processor that is executing the second application, the seventh node <NUM>, as the first node of the first branch <NUM>, in the right first control flow.

The second node <NUM>, as the dispatching node, has two or more children, like e.g., <NUM> children, namely the third node <NUM>, the fourth node <NUM>, the fifth node <NUM> and the sixth node <NUM>.

Each child, namely the third node <NUM>, the fourth node <NUM>, the fifth node <NUM> and the sixth node <NUM>, has the second node <NUM>, as its own child.

The second processor is executing, in synchronization with the first control flow execution, a second application associated with the third node <NUM>.

The second processor knows that the right first control flow includes a corresponding third node (not represented).

The second application comprises one or several predefined variables, such as a predetermined input parameter, like e.g., "x", that are set <NUM> to predefined values, like e.g., "x+=<NUM>", so as to authorize, when the second processor is executing the second application, a parallel execution of the third node <NUM> of the first control flow by the first processor.

The second processor is executing, in synchronization with the first control flow execution, a second application associated with the fifth node <NUM>.

The second processor knows that the right first control flow includes a corresponding fifth node (not represented).

The second application comprises one or several predefined variables, such as a predetermined input parameter, like e.g., "x", that are set <NUM> to predefined values, like e.g., "x++", so as to authorize, when the second processor is executing the second application, a parallel execution of the fifth node <NUM> of the first control flow by the first processor.

The invention solution allows keeping or maintaining the used predefined variables in the second processor in a synchronized manner with an original control flow of an application to be executed by a first processor and, in an isolated manner.

The invention solution allows hiding the used predefined variables.

At a point of a decision, such as a transition decision, it is difficult for an attacker to understand why a certain branch (or path) is used.

The invention solution allows controlling the first control flow that is executed by the first processor, by the second processor, when executing the second application, that determines a decision according to a predefined condition(s) that is(are) or not satisfied.

The invention solution allows preventing an attacker from isolating a portion(s) of a thus protected application.

The invention solution allows protecting an application from being reverse engineered.

Claim 1:
A method (<NUM>; <NUM>) for managing an execution of a program relating to at least a part of a first application, as a first application program, comprising:
- a) executing, by a first processor, a first control flow, the first control flow graph including at least two separated branches (<NUM>, <NUM>), each of the at least two separated branches including at least one node (<NUM>);
- b) executing, by a second processor, in synchronization with the first control flow execution, at least one second application, the at least one second application comprising, each, when executed by the second processor in synchronization with the first control flow execution, at least one predetermined variable and at least one expected value that the at least one predetermined variable has to have or at least one predetermined condition that the at least one predetermined variable has to satisfy to authorize an execution of the right first control flow by the first processor;
- c) determining, by the second processor, when executing the at least one second application, at least one transition decision between at least two first nodes of the at least two separated branches, wherein each of the at least two branches is associated with a corresponding predetermined condition, wherein determining the at least one transition decision comprises determining a branch, among the at least two separated branches, to be executed by the first processor when the corresponding predetermined condition associated with the branch is satisfied, wherein the at least one transition decision is conditional (<NUM> or <NUM>) to continue from an execution of the current node to an execution of a first node of the determined branch of the at least two separated branches;
- d) controlling, by the second processor, when executing the at least one second application, based on the determined at least one transition decision, the first node of the determined branch to be executed by the first processor.