# US 2013/0160133 A1 · Code Base Partitioning System

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

- Number: US 2013/0160133 A1
- Document ID: US20130160133A1
- Status: Published application
- Kind: A1
- Application number: 13/327,172
- Filed: 2011-12-15
- Published: 2013-06-20
- Earliest claimed: 2011-12-15
- Assignees: Microsoft Corporation
- Inventors: Athanasios Avgerinos; Mariusz H. Jakubowski; Marcus Peinado
- Web page: https://patentgrep.com/patent/US20130160133A1

## CPC

- G06F 21/57: Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F 21/602: {Providing cryptographic facilities or services}
- G06F 21/71: to assure secure computing or processing of information
- G06F 2221/2113: Multi-level security, e.g. mandatory access control
- G06F 2221/2141: Access rights, e.g. capability lists, access control lists, access tables, access matrices
- G06F 2221/2149: Restricted operating environment
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The subject disclosure is directed towards partitioning a code base of a program into a trusted portion and an untrusted portion. After identifying sensitive data within the code base using annotation information, one or more program elements that correspond to the sensitive data are automatically transformed into secure program elements that can be retained in the untrusted portion of the code base. Cryptographic techniques are used to minimize a potential size of the trusted portion of the code base. Source files for the trusted portion and the untrusted portion are generated.

## Claims

### Claim 1

In a computing environment, a method performed at least in part on at least one processor, comprising, partitioning a code base into a trusted portion and an untrusted portion, including, identifying program elements that correspond to sensitive data within the code base using annotation information, automatically transforming the program elements into secure program elements, and separating the code base into the untrusted portion comprising the secure program elements and the trusted portion.

### Claim 2 (depends on 1)

The method of claim 1, wherein identifying the program elements further comprises producing an intermediate representation of the code base comprising the program elements in canonical form.

### Claim 3 (depends on 2)

The method of claim 2, wherein producing the intermediate representation further comprises converting each program element into a statement format.

### Claim 4 (depends on 1)

The method of claim 1, wherein automatically transforming the program elements further comprises modifying a data format associated with one or more of the program elements.

### Claim 5 (depends on 1)

The method of claim 1, wherein automatically transforming the program elements further comprises expanding a size of a program element to enable encryption.

### Claim 6 (depends on 1)

The method of claim 1, wherein automatically transforming the program elements further comprises inserting operations for encrypting the sensitive data.

### Claim 7 (depends on 1)

The method of claim 1, wherein automatically transforming the program elements further comprises retaining dataflow operations for the sensitive data in the untrusted portion.

### Claim 8 (depends on 1)

The method of claim 1, wherein automatically transforming the program elements further comprises performing taint propagation on the code base to identify the program elements.

### Claim 9 (depends on 1)

The method of claim 1, wherein automatically transforming the program elements further comprises generating one or more secure functions for computation operations corresponding to the sensitive data.

### Claim 10 (depends on 1)

The method of claim 1, wherein automatically transforming the program elements further comprises identifying input variables that reference the sensitive data.

### Claim 11 (depends on 1)

The method of claim 1, wherein automatically transforming the program elements further comprises identifying dependent variables associated with the input variables.

### Claim 12

In a computing environment, a system, comprising, an automated partitioning mechanism configured to separate a code base into trusted code and untrusted code, and designate secure program elements that reference sensitive data as the untrusted code, wherein the automated partitioning mechanism further comprises a cryptographic module configured to encrypt the sensitive data and further configured to generate the secure program elements from an intermediate representation of the code base.

### Claim 13 (depends on 12)

The system of claim 12, wherein the automated partitioning mechanism, based on the annotation information, is further configured to classify other program elements as the trusted code of the code base.

### Claim 14 (depends on 12)

The system of claim 12, wherein the automated partitioning mechanism, based on the annotation information, is further configured to classify dataflow operations for input variables associated with the sensitive data as unprivileged.

### Claim 15 (depends on 14)

The system of claim 14, wherein the automated partitioning mechanism is further configured to classify security-sensitive operations and dependent variables corresponding to the input variables as unprivileged.

### Claim 16 (depends on 12)

The system of claim 12, wherein the automated partitioning mechanism is further configured to classify input variables as privileged.

### Claim 17 (depends on 12)

The system of claim 12, wherein the automated partitioning mechanism is further configured to convert a computation operation associated with the sensitive data into one or more secure functions comprising the trusted code.

### Claim 18

One or more computer-readable media having computer-executable instructions, which when executed perform steps, comprising:
producing an intermediate representation for an annotated program;
performing taint propagation on the annotated program to identify one or more portions of the annotated program that reference sensitive data;
securing the one or more portions of the annotated program using at least one of a confidentiality technique and an authentication technique; and
partitioning the annotated program into trusted code and untrusted code comprising the one or more portions.

### Claim 19 (depends on 18)

The one or more computer-readable media of claim 18 having further computer-executable instructions comprising:
executing the trusted code at one privilege level and the untrusted code at another privilege level.

### Claim 20 (depends on 18)

The one or more computer-readable media of claim 18 having further computer-executable instructions comprising:
examining a data type qualifier associated with a program element of the annotated program; and
automatically determining whether to secure the program element.
