Secure code optimization method and system

US10795990B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10795990-B2
Application numberUS-201816102045-A
CountryUS
Kind codeB2
Filing dateAug 13, 2018
Priority dateFeb 12, 2016
Publication dateOct 6, 2020
Grant dateOct 6, 2020

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A method of automatically generating secure code includes: receiving source code and security constraints for the source code, the security constraints encoding, to what extend a variable in the source code is considered secure; and generating secure code from the source code and the security constraints by replacing non-secure operations in the source code, which operate on the variables considered as secure, with secure operations; wherein a secure operation is an operation, which, when applied to at least one encrypted variable, generates an encrypted result, which, when decrypted, is the result of the non-secure operation applied to the not encrypted variable.

First claim

Opening claim text (preview).

The invention claimed is: 1. A method of automatically generating secure code, the method comprising: receiving source code and security constraints for the source code, the security constraints encoding, to what extent a variable of variables in the source code is considered secure; generating secure code from the source code and the security constraints by replacing non-secure operations in the source code, which operate on the variables considered as secure, with secure operations; wherein a secure operation is an operation, which, when applied to at least one encrypted variable, generates an encrypted result, which, when decrypted, is the result of the non-secure operation applied to the not encrypted variable; wherein the security constraints encode a confidentiality domain for at least one of the variables in the source code; wherein, when generating secure code, an operation in the source code, which operates on the at least one variable of the variables in the source code with a confidentiality domain is replaced with a confidentiality domain operation; wherein a confidentiality domain operation comprises the non-secure operation and a corresponding secure operation, wherein the secure code comprises a client part to be executed on a client, wherein the client part is adapted for receiving input data, updating the input data by encrypting a portion of variables in the input data, which variables are considered as secure, and to send partially encrypted input data to a server, wherein the secure code comprises a server part to be executed on at least one server, wherein the server part is adapted to receive the partially encrypted input data, to process the partially encrypted input data based on the secure operations and to send the processed data back to the client, and wherein the client part is adapted for decrypting the processed data into result data. 2. The method of claim 1 , wherein the security constraints encode, whether operations executed on variables considered as secure are to be obfuscated; wherein, when generating secure code, not obfuscated operations in the source code which operate on the variables considered as secure, with obfuscated operations; wherein an obfuscated operation is an operation, which, when applied to input variables of the not obfuscated operation and an additional encrypted input variable, generates a same result as the not obfuscated operation for a special value of the additional input variable. 3. The method of claim 2 , wherein the security constraints encode, whether a control structure in the source code is considered secure, a control structure being adapted for executing a part of a code based on a condition on a variable; wherein, when generating secure code, a not secured control structure in the source code considered as secure, is replaced with a secure control structure, the secured control structure additionally being based on the encrypted condition of the variable. 4. The method of claim 3 , wherein the control structure is an “if then else” structure and the secure control structure is based on multiplying a then-clause with the encrypted condition and/or an else-clause with an encryption of 1 minus the condition. 5. The method of claim 1 , wherein the security constraints encode, whether a control structure in the source code is considered secure, a control structure being adapted for executing a part of a code based on a condition on a first variable of the variables in the source code; wherein, when generating secure code, a not secured control structure in the source code considered as secure, is replaced with a secure control structure, the secured control structure additionally being based on the encrypted condition of the first variable. 6. The method of claim 5 , wherein the control structure is an “if then else” structure and the secure control structure is based on multiplying a then-clause with the encrypted condition and/or an else-clause with an encryption of 1 minus the condition. 7. The method of claim 6 , wherein the control structure is a repeating control structure adapted for repeating an operation, when the condition is true; wherein the secured repeating control structure sends a request to a client, adapted for decrypting the condition, and adapted for deciding, whether the repeating control structure should be stopped; wherein the security constraints encode, how often the operation is repeated, until the request to the client is sent. 8. The method of claim 7 , wherein the encrypted control structure is repeating an encrypted operation, the encrypted operation being based additionally on the encrypted condition, wherein the encrypted operation generates a same result as the operation to be repeated, when the condition is true, and the encrypted condition not changing input variables, when the condition is false. 9. The method of claim 5 , wherein the control structure is a repeating control structure adapted for repeating an operation, when the condition is true; wherein the secured repeating control structure sends a request to a client, adapted for decrypting the condition, and adapted for deciding, whether the repeating control structure should be stopped; wherein the security constraints encode, how often the operation is repeated, until the request to the client is sent. 10. The method of claim 9 , wherein the encrypted control structure is repeating an encrypted operation, the encrypted operation being based additionally on the encrypted condition, wherein the encrypted operation generates a same result as the operation to be repeated, when the condition is true, and the encrypted condition not changing input variables, when the condition is false. 11. The method of claim 1 , wherein the confidentiality domain operation is adapted to request from a client adapted for decrypting the variable, whether the variable is in the confidentiality domain and in this case for executing the secure operation on the encrypted variable and otherwise for executing the non-secure operation on the decrypted variable. 12. The method of claim 1 , wherein the secure code is a source code, a byte code or a machine code. 13. The method of claim 1 , wherein the secure operations are based on homomorphic encryption. 14. The method of claim 1 , wherein the secure operations are based on multi-party encryption. 15. A method for evaluating source code to be secured, the method comprising: receiving source code, security constraints for the source code, and input data for the source code; generating not secure code from the source code; generating secure code from the source code and the security constraints according to claim 1 ; executing the not secure code and the secure code on the input data and determining a performance penalty of the security constraints by comparing the runtime of the not secure code and the secure code. 16. A code security optimization program adapted for performing the method of claim 1 . 17. A method for generating optimized secure code, the method comprising: receiving source code, security priorities for the source code, input data for the source code and a maximal performance penalty for the security priorities, wherein a security priority comprises a security constraint and a priority of the security constraint with respect to other security constraints; generating not secure code from the source code; generating secure code from the source code and the security constraints by replacing non-secure operations in the source co

Assignees

Inventors

Classifications

  • G06F21/125Primary

    by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code · CPC title

  • against software analysis or reverse engineering, e.g. by obfuscation · CPC title

  • G06F21/54Primary

    by adding security routines or objects to programs · CPC title

  • Test or assess software · CPC title

  • involving homomorphic encryption · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10795990B2 cover?
A method of automatically generating secure code includes: receiving source code and security constraints for the source code, the security constraints encoding, to what extend a variable in the source code is considered secure; and generating secure code from the source code and the security constraints by replacing non-secure operations in the source code, which operate on the variables consi…
Who is the assignee on this patent?
Abb Schweiz Ag
What technology area does this patent fall under?
Primary CPC classification G06F21/125. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Oct 06 2020 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 6 related publications on this page (citations in our corpus or others sharing the same primary CPC).