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 is 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;
- executing the cryptographic API call with the second variable as the input;
- identifying a second cryptographic API call, the second cryptographic API call having a third variable;
- determining that the third variable is generated using a cryptographically secure pseudo-random number generator;
- determining, in response to the third variable being generated using a cryptographically secure pseudo-random number generator, that the third variable is cryptographically secure;
- and
- executing the second cryptographic API call with the third variable as an input.
(canceled)
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 is a static value;
- generating a second variable using a cryptographically secure pseudo-random number generator;
- replacing the first variable with the second variable;
- identifying a second cryptographic API call, the second cryptographic API call having a third variable;
- determining that the third variable is generated using a cryptographically secure pseudo-random number generator;
- and
- determining, in response to the third variable being generated using a cryptographically secure pseudo-random number generator, that the third variable is cryptographically secure.
(canceled)
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;
- identifying a second cryptographic API call, the second cryptographic API call having a third variable;
- determining that the third variable is generated using a cryptographically secure pseudo-random number generator;
- determining, in response to the third variable being generated using a cryptographically secure pseudo-random number generator, that the third variable is cryptographically secure;
- and
- executing the second cryptographic API call with the third variable as the input.
(canceled)
Dependencies are inferred from the claim text.