Automatic correction of cryptographic application program interfaces
AssigneeInternational Business Machines Corporation
InventorsPaul Ionescu, Iosif V. Onut, Omer Tripp
Life of this patent
Estimating the term…
Abstract
A computer system may identify a cryptographic application programming interface (API) call for a program. The cryptographic API call may include a first variable. The computer system may determine that the first variable is a static value. The computer system may tag the first variable. The computer system may determine that the cryptographic API call will be executed. The computer system may replace the first variable with a second variable during execution of the program. The computer system may execute the cryptographic API call with the second variable.
Claims20
A computer-implemented method comprising:
- identifying, by a processor, a cryptographic application program interface (API) call in a source code for a program, the cryptographic API call having a first variable as an input;
- determining that the first variable references a static value;
- tagging the first variable;
- determining that the cryptographic API call will be executed;
- replacing the first variable with a second variable during execution of the program;
- and
- executing the cryptographic API call with the second variable as the input.
A system comprising:
- a memory;
- and
- a processor in communication with the memory, the processor being configured to perform operations comprising:
- identifying a cryptographic application program interface (API) call in a source code for a program, the cryptographic API call having a first variable as an input;
- determining that the first variable references a static value;
- generating a second variable using a cryptographically secure pseudo-random number generator;
- and
- replacing the first variable with the second variable.
A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform a method, the method comprising:
- identifying, by the processor, that a cryptographic application program interface (API) call in a program is scheduled to be executed, the cryptographic API call having a first variable as an input;
- determining that the first variable has been tagged as tainted;
- replacing the first variable with a second variable during execution of the program;
- and
- executing the cryptographic API call with the second variable as the input.
Dependencies are inferred from the claim text.