# US 2004/0073898 A1 · Systems, methods and computer program products for leakage-proof program partitioning

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2004/0073898 A1
- Document ID: US20040073898A1
- Status: Published application
- Kind: A1
- Application number: 10/454,037
- Filed: 2003-06-04
- Published: 2004-04-15
- Earliest claimed: 2002-06-04
- Assignees: Georgia Tech Research Corporation; Infineon Technologies AG
- Inventors: Santosh Pande; Tao Zhang; Andre Dos Santos; Franz Josef Bruecklmayr
- Web page: https://patentgrep.com/patent/US20040073898A1

## CPC

- G06F 9/44521: {Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading}
- G06F 8/44: {Encoding}
- G06F 21/14: against software analysis or reverse engineering, e.g. by obfuscation
- G06F 21/556: {involving covert channels, i.e. data leakage between processes (inhibiting the analysis of circuitry or operation with measures against power attack G06F21/755)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems, methods and computer program products partition a whole program when it does not fit in a device's memory. Minimal, safe program partitions are downloaded from the server on demand into the embedded device just before their execution. Code and data of the program are partitioned such that no information regarding the control flow behavior of the program is leaked out. Thus, by observing the program partitions that are downloaded from the server to the device, an attacker is unable to guess which branches are taken in the program and what is the control flow of the program. This property of tamper resistance is valuable for secure embedded devices, such as smart cards, which could hold sensitive information and/or carry out critical computation such as financial transactions.

## Claims

### Claim 1

A method for partitioning a program for transmission to a device, comprising:
analyzing a program to identify at least one recurring and at least one non-recurring function in said program; and
using the identification of said recurring and non-recurring functions to partition the program into a plurality of program partitions,
wherein said plurality of program partitions do not reveal control flow information of said program during the transmission of at least one of said plurality of program partitions to the device.

### Claim 2 (depends on 1)

The method of claim 1, further comprising transmitting at least one of said plurality of program partitions to the device for execution.

### Claim 3 (depends on 1)

The method of claim 1, wherein analyzing said program is implemented by computer program code.

### Claim 4 (depends on 1)

The method of claim 1, wherein partitioning the program into a plurality of program partitions is implemented by computer program code.

### Claim 5 (depends on 1)

The method of claim 1, further comprising merging at least two of said plurality of program partitions to generate a merged program partition.

### Claim 6 (depends on 5)

The method of claim 5, further comprising determining a memory capacity of the device prior to merging at least two of said plurality of program partitions to generate the merged program partition.

### Claim 7 (depends on 5)

The method of claim 5, further comprising transmitting said merged program partition to the device.

### Claim 8 (depends on 1)

The method of claim 1, wherein using said identification of said recurring and non-recurring functions to partition the program comprises using said identification of said recurring and non-recurring functions to partition the program into a plurality of minimal safe program partitions.

### Claim 9 (depends on 8)

The method of claim 8, wherein the minimal safe partitions are partitioned such that the further division of any of said minimal safe program partitions results in control information being determinable.

### Claim 10 (depends on 8)

The method of claim 8, wherein each of the minimal safe partitions are transmitted in a fixed sequence to the device during execution of a recurring or nonrecurring function.

### Claim 11 (depends on 8)

The method of claim 8, further comprising merging at least two of said minimal safe program partitions to create a safe merged program partition.

### Claim 12 (depends on 1)

The method of claim 1, further comprising reserving, in said device, memory allocated for caching at least one of said plurality of program partitions.

### Claim 13

A method for partitioning a program for downloading to a device, comprising:
providing a program, wherein the size of said program exceeds the memory requirements of the device;
analyzing the program to identify at least one recurring and at least one nonrecurring function in said program;
using the identification of said recurring and non-recurring functions to partition the program into a plurality of program partitions; and
transmitting at least one of the plurality of program partitions to the device such that an actively executing code and data of said program resides entirely in the device without the entire program residing on the device.

### Claim 14 (depends on 13)

The method of claim 13, wherein analyzing said program is implemented by computer program code.

### Claim 15 (depends on 13)

The method of claim 13, wherein partitioning the program into a plurality of program partitions is implemented by computer program code.

### Claim 16 (depends on 13)

The method of claim 13, further comprising:
merging at least two of said plurality of program partitions to generate a merged program partition; and
transmitting said merged program partition to said device.

### Claim 17 (depends on 16)

The method of claim 16, further comprising identifying a memory capacity of the device prior to merging at least two of said plurality of program partitions.

### Claim 18 (depends on 13)

The method of claim 13, wherein using said identification of said recurring and non-recurring functions to partition the program comprises using said identification of said recurring and non-recurring functions to partition the program into a plurality of minimal safe program partitions.

### Claim 19 (depends on 18)

The method of claim 18, wherein the minimal safe partitions are partitioned such that the further division of any of said minimal safe program partitions results in control information of said program being determinable during the transmission of program partitions to the device.

### Claim 20 (depends on 18)

The method of claim 18, wherein each of the safe partitions are transmitted in a fixed sequence to the device during execution of a recurring or non-recurring function.

### Claim 21 (depends on 18)

The method of claim 18, further comprising merging at least two of said minimal safe program partitions to create a safe merged program partition.

### Claim 22 (depends on 21)

The method of claim 21, wherein said at least two minimal safe program partitions are merged to reduce the number of partitions transmitted to the device.

### Claim 23 (depends on 13)

The method of claim 13, further comprising reserving, in said device, memory allocated for caching at least one of said plurality of program partitions.

### Claim 24

A method for storing program partitions on a device, comprising:
requesting at least one program partition from a server, wherein said at least one program partition comprises an executable portion of a program, wherein the program is too large to reside on the device;
storing said at least one program partition in a memory on said device; and
executing said at least one program partition on the device.

### Claim 25 (depends on 24)

The method of claim 24, further comprising removing said at least one program partition from said memory immediately after execution of said at least one program partition such that the memory is available for storing additional content.

### Claim 26 (depends on 24)

The method of claim 24, further comprising removing said at least one program partition from said memory unless said device knows said at least one program partition will be executed again.

### Claim 27 (depends on 25)

The method of claim 25, further comprising retransmitting said at least one program partition to the device.

### Claim 28

A method for storing program partitions on a device, comprising:
analyzing a program to identify at least one recurring and at least one non-recurring function in said program;
using the identification of said recurring and non-recurring functions to partition the program into a plurality of program partitions; and
storing on the device only those partitions that correspond to program blocks necessary for the program's execution.

### Claim 29 (depends on 28)

The method of claim 28, wherein the storage of partitions comprises selectively storing only those partitions that correspond to program blocks necessary for the program's execution, and wherein the selective storing is implemented by the device.

### Claim 30

A computer program product for partitioning a program for transmission to a device, said computer program product comprising:
a computer usable medium having computer-readable code means embodied in said medium, said computer-readable code means comprising:
computer readable program code means for analyzing a program to identify at least one recurring and at least one non-recurring function in said program; and
computer readable program code means for using the identification of said recurring and non-recurring functions to partition the program into a plurality of program partitions,
wherein said plurality of program partitions do not reveal control flow information of said program during the transmission of at least one of said plurality of program partitions to the device.

### Claim 31 (depends on 30)

The computer program product of claim 30, further comprising computer readable program code means for transmitting at least one of said plurality of program partitions to the device for execution.

### Claim 32 (depends on 30)

The computer program product of claim 30, further comprising computer readable program code means for merging at least two of said plurality of program partitions to generate a merged program partition.

### Claim 33 (depends on 32)

The computer program product of claim 32, further comprising computer readable program code means for identifying the memory capacity of the device prior to merging at least two of said plurality of program partitions.

### Claim 34 (depends on 32)

The computer program product of claim 32, further comprising computer readable program code means for transmitting said merged program partition to the device.

### Claim 35 (depends on 30)

The computer program product of claim 30, wherein the computer readable program code means for using said identification of said recurring and non-recurring functions to partition the program comprises computer readable program code means for using said identification of said recurring and non-recurring functions to partition the program into a plurality of minimal safe program partitions.

### Claim 36 (depends on 35)

The computer program product of claim 35, wherein the minimal safe partitions are partitioned such that the further division of any of said minimal safe program partitions results in the control flow information being determinable.

### Claim 37 (depends on 35)

The computer program product of claim 35, wherein each of the safe partitions are transmitted in a fixed sequence to the device during execution of a recurring or non-recurring function.

### Claim 38 (depends on 35)

The computer program product of claim 35, further comprising computer readable program code means for merging at least two of said minimal safe program partitions to create a safe merged program partition.

### Claim 39 (depends on 30)

The computer program product of claim 30, further comprising computer readable program code means for reserving, in said device, memory allocated for caching at least one of said plurality of program partitions.

### Claim 40

A system for partitioning a program such that only a portion of the program may be downloaded to and executed on a memory limited device, comprising:
a server, wherein said server includes a memory in which a program resides, and wherein the size of said program exceeds the memory requirements of a device; and
a device, in communication with said server,
wherein said server is operable to:
analyze the program to identify at least one recurring and at least one non-recurring function in said program;
partition the program into a plurality of program partitions using the identification of said recurring and non-recurring functions; and
transmit at least one of the plurality of program partitions to the device,
such that an actively executing portion of said program resides entirely in the device without the entire program residing on the device.

### Claim 41 (depends on 40)

The system of claim 40, wherein said server is operable to determine the memory of said device available for receiving the at least one of the plurality of program partitions.

### Claim 42 (depends on 40)

The system of claim 40, wherein said server is operable to merge at least two of said plurality of program partitions to create a merged partition transmitted to the device, thereby reducing the number of separate partitions transmitted to the device.

### Claim 43 (depends on 40)

The system of claim 40, wherein said device comprises a smart card.

### Claim 44

A system for partitioning a program such that only a portion of the program is downloaded to a security device, comprising:
a server, wherein said server stores a program, and wherein said server is operable to partition the program into a plurality of program partitions; and
a device, in communication with said server, wherein said device receives at least one of said plurality of program partitions from said server, and wherein said plurality of program partitions do not reveal control flow information of said program during the transmission of at least one of said plurality of program partitions to the device.

### Claim 45 (depends on 44)

The system of claim 44, wherein said server is operable to determine the memory of said device available for receiving the at least one of the plurality of program partitions.

### Claim 46 (depends on 44)

The system of claim 44, wherein said server is operable to merge at least two of said plurality of program partitions to create a merged partition transmitted to the device, thereby reducing the number of separate partitions that are transmitted to the device.

### Claim 47 (depends on 44)

The system of claim 44, wherein said device comprises a smart card.

### Claim 48

A computer program product for partitioning a program such that only a portion of the program is downloaded to a security device, said computer program product comprising:
a computer usable medium having computer-readable code means embodied in said medium, said computer-readable code means comprising:
computer readable program code means for providing a program, wherein the size of said program exceeds the memory requirements of the device;
computer readable program code means for analyzing the program to identify at least one recurring and at least one non-recurring function in said program;
computer readable program code means for using the identification of said recurring and non-recurring functions to partition the program into a plurality of program partitions; and
computer readable program code means for transmitting at least one of the plurality of program partitions to the device such that an actively executing portion of said program resides entirely in the device without the entire program residing on the device.

### Claim 49 (depends on 48)

The computer program product of claim 48, further comprising:
computer readable program code means for merging at least two of said plurality of program partitions to generate a merged program partition; and
computer readable program code means for transmitting said merged program partition to said device.

### Claim 50 (depends on 48)

The computer program product of claim 48, further comprising computer readable program code means for querying the device to determine a memory capacity of the device prior to merging at least two of said plurality of program partitions.

### Claim 51 (depends on 48)

The computer program product of claim 48, wherein computer readable program code means for using said identification of said recurring and non-recurring functions comprise computer readable program code means for using said identification of said recurring and non-recurring functions to partition the program into a plurality of minimal safe program partitions.

### Claim 52 (depends on 51)

The computer program product of claim 51, wherein the minimal safe partitions are partitioned such that the further division of any of said minimal safe program partitions results in control information of said program being determinable during the transmission of program partitions to the device.

### Claim 53 (depends on 51)

The computer program product of claim 51, wherein each of the safe partitions are transmitted in a fixed sequence to the device during execution of a recurring or non-recurring function.

### Claim 54 (depends on 51)

The computer program product of claim 51, further comprising computer readable program code means for merging at least two of said minimal safe program partitions to create a safe merged program partition.

### Claim 55 (depends on 54)

The computer program product of claim 54, wherein said safe merged program partition is transmitted to the device such that the merger of the at least two minimal safe programs reduces the number of separate partitions transmitted to the device.

### Claim 56 (depends on 48)

The computer program product of claim 48, further comprising computer readable program code means for reserving, in said device, memory allocated for caching at least one of said plurality of program partitions.

### Claim 57

A method for partitioning a program for downloading to a device, comprising:
analyzing a program to identify at least one recurring and at least one nonrecurring function in said program;
using the identification of said recurring and non-recurring functions to partition the program into a plurality of program partitions;
identifying at least one of the plurality of program partitions requested by the device, wherein upon transmission to the device said at least one program partition actively executes a function of the program without the entire program residing on the device; and
identifying minimally necessary program data required for executing the transmitted partition and downloading the identified minimally necessary program data to the device.

### Claim 58

A method for optimizing the performance of a device, comprising:
providing a program, only a portion of which will execute on a device;
partitioning the program into a plurality of minimal safe partitions;
identifying at least one call site associated with at least one of said plurality of minimal safe partitions,
using said identified at least one call site, identifying those set of functions frequently executed in the device; and
storing only the identified set of functions in the device.

### Claim 59 (depends on 58)

The method of claim 58, wherein the step of identifying the set of functions frequently executed in the device comprises identifying the set of functions frequently executed, for each call site, using trace analysis.

### Claim 60 (depends on 58)

The method of claim 58, further comprising identifying the location of at least one call site to avoid redundant loading of executable functions by the device.

### Claim 61

A method for optimizing the performance of a device, comprising:
analyzing a program to identify at least one recurring and at least one nonrecurring function in said program; and
using the identification of said recurring and non-recurring functions to partition the program into a plurality of program partitions; and
transmitting to the device a recommendation that the device memory be divided into ideal code and data segment components,
wherein said plurality of program partitions do not reveal control flow information of said program during the transmission of at least one of said plurality of program partitions to the device.
