IP Library › Granted Patent US 11,392,672
Granted Patent B2
US 11,392,672 · App. 16/677,660 · Granted Jul 19, 2022

Computer program code obfuscation methods and systems

Inventors: Siew Kei Lam (Singapore, SG); Hung Thinh Pham (Singapore, SG); Alexander Fell (Singapore, SG); Veeranna Nandeesha (Singapore, SG)
Assignee: Nanyang Technological University
G06F21/14G06F8/41G06F2221/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,392,672
App. No.
16/677,660
Granted
Jul 19, 2022
Kind
B2
Abstract

Methods and systems for obfuscating computer program code are disclosed. In an embodiment, a method of generating obfuscated binary code from input source code for execution on a target processor comprises: generating a set of random obfuscation transform selections; and iteratively optimizing the obfuscation transform selections until a termination criterion is met. The obfuscation transformation selections may comprise indications of custom instructions which are executable on the co-processor in order to reduce side channel leakage.

Claims (46)

1. A method of generating obfuscated binary code from input source code for execution on a target processor, the method comprising:

generating a set of random obfuscation transform selections;

initializing a candidate set of obfuscation transform selections with the set of random obfuscation selections;

iteratively optimizing the obfuscation transform selections of the candidate set of obfuscation transform selections until a termination criterion is met by:

for each candidate obfuscation transform selection of the candidate set of obfuscation transform selections:

applying the obfuscation transform selection to the input source code to generate candidate obfuscated source code;

compiling the candidate obfuscated source code to generate candidate obfuscated binary code;

calculating an obfuscation metric for the candidate obfuscated binary code;

calculating an execution time metric for the candidate obfuscated binary code;

calculating a security metric for the candidate obfuscated binary code; and

based on the calculated obfuscation metric, the calculated execution time metric and the calculated security metric for each candidate obfuscation transform selection, performing genetic operations to update the candidate set of obfuscation transform selections; and

once the termination criterion is met, generating an optimized obfuscation transform selection from the candidate set of obfuscation transform selections,

applying the optimized obfuscation transform selection to the input source code to obtain optimized obfuscated source code; and

compiling the optimized obfuscated source code to generate obfuscated binary code.

2. A method according to claim 1 , wherein the target processor comprises a main processor and a co-processor and the obfuscation transform selections comprise indications of custom instructions which are executable on the co-processor.

3. A method according to claim 2 , wherein the custom instructions indicate a plurality of diversified instructions from which the co-processor selects one diversified instruction during execution.

4. A method according to claim 2 , wherein the custom instructions are configured to cause the coprocessor to delay for a time period selected during execution.

5. A method according to claim 1 , wherein calculating the obfuscation metric for the candidate obfuscated binary code comprises calculating a normalized compression distance between the candidate obfuscated binary code and binary code obtained by compiling the input source code.

6. A method according to claim 1 , wherein calculating the execution time metric for the candidate obfuscated binary code comprises executing the candidate obfuscated binary code in a target processor execution environment.

7. A method according to claim 6 , wherein the target processor execution environment comprises a hardware implementation of the target processor.

8. A method according to claim 1 , wherein calculating the security metric for the candidate obfuscated binary code comprises estimating a measure of side channel leakage.

9. A method according to claim 8 , wherein estimating the measure of side channel leakage comprises executing the candidate obfuscated binary code in a target processor execution environment.

10. A non-transitory computer readable carrier medium storing computer executable program instructions which when executed on a processor cause the processor to carry out a method according to claim 1 .

11. A compiler system for generating obfuscated binary code from input source code for execution on a target processor, the compiler system comprising: a processor and a data storage device, the data storage device storing computer program instructions operable to cause the processor to:

generate a set of random obfuscation transform selections;

initialize a candidate set of obfuscation transform selections with the set of random obfuscation selections;

iteratively optimize the obfuscation transform selections of the candidate set of obfuscation transform selections until a termination criterion is met by:

for each candidate obfuscation transform selection of the candidate set of obfuscation transform selections:

applying the obfuscation transform selection to the input source code to generate candidate obfuscated source code;

compiling the candidate obfuscated source code to generate candidate obfuscated binary code;

calculating an obfuscation metric for the candidate obfuscated binary code;

calculating an execution time metric for the candidate obfuscated binary code;

calculating a security metric for the candidate obfuscated binary code; and

based on the calculated obfuscation metric, the calculated execution time metric and the calculated security metric for each candidate obfuscation transform selection; performing genetic operations to update the candidate set of obfuscation transform selections; and

once the termination criterion is met, generate an optimized obfuscation transform selection from the candidate set of obfuscation transform selections;

apply the optimized obfuscation transform selection to the input source code to obtain optimized obfuscated source code; and

compile the optimized obfuscated source code to generate obfuscated binary code.

12. A compiler system according to claim 11 , wherein the target processor comprises a main processor and a co-processor and the obfuscation transform selections comprise indications of custom instructions which are executable on the co-processor.

13. A compiler system according to claim 12 , wherein the custom instructions indicate a plurality of diversified instructions from which the co-processor selects one diversified instruction during execution.

14. A compiler system according to claim 12 , wherein the custom instructions are configured to cause the co-processor to delay for a time period selected during execution.

15. A compiler system according to claim 11 , wherein the data storage device further stores computer program instructions operable to cause the processor to: calculate the obfuscation metric for the candidate obfuscated binary code by calculating a normalized compression distance between the candidate obfuscated binary code and binary code obtained by compiling the input source code.

16. A compiler system according to claim 11 , wherein the data storage device further stores computer program instructions operable to cause the processor to: calculate the execution time metric for the candidate obfuscated binary code comprises executing the candidate obfuscated binary code in a target processor execution environment.

17. A compiler system according to claim 16 , further comprising a hardware implementation of the target processor and wherein the target processor execution environment comprises the hardware implementation of the target processor.

18. A compiler system according to claim 11 , wherein the data storage device further stores computer program instructions operable to cause the processor to: calculate the security metric for the candidate obfuscated binary code by estimating a measure of side channel leakage.

19. A compiler system according to claim 18 , wherein estimating the measure of side channel leakage comprises executing the candidate obfuscated binary code in a target processor execution environment.

20. A compiler system according to claim 19 , further comprising a hardware implementation of the target processor and wherein the target processor execution environment comprises the hardware implementation of the target processor.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 23, 2020
From: LAM, SIEW KEI; PHAM, HUNG THINH; FELL, ALEXANDER; NANDEESHA, VEERANNA
To: NANYANG TECHNOLOGICAL UNIVERSITY
Reel/Frame 051600/0256 →
Priority Claims (1)
SG 10201810007P · Nov 9, 2018 · national
Continuity (1)
Related Publication 20200151305A1 · May 14, 2020