System and method to provide CPU smoothing of cryptographic function timings
Abstract
A system and method to smooth a cryptographic function's timing footprint is presented. A processor includes a “function timing smoother” that smoothes out spikes in the amount of time that a particular cryptographic function requires to execute. When a cryptographic function executes, the function timing smoother tracks the amount of time that the cryptographic function executes (current execution time) and compares the time with the amount of time that the same cryptographic function took for a previous execution (previous execution time). When the current execution time is less than the previous execution time, the function timing smoother adds instructions or varies an execution unit's clock speed in order to increase the cryptographic function's current execution time. Using this approach, a malicious user is not able to decipher sensitive information from the cryptographic function's timing footprint.
Claims
exact text as granted — not AI-modified1 . A computer-implemented method comprising:
executing a function included in a program; in response to the execution, computing a current execution time that corresponds to the amount of time that the function requires to execute; retrieving a previous execution time, the previous execution time corresponding to the amount of time that the function required during a previous execution; determining that the current execution time is less than the previous execution time; and in response to the determination, injecting one or more filler instructions that do not correspond to the program, wherein the injecting increases the current execution time until the current execution time is equal to the previous execution time.
2 . The method of claim 1 further comprising:
wherein code space corresponding to the program is not modified during the injecting; and wherein a code pointer corresponding to the program is not modified during the injecting.
3 . The method of claim 1 further comprising:
computing a mean function execution time using the previous execution time and one or more other previous execution times; and adjusting a clock speed while the function is executing based upon the mean execution time, wherein the adjusting results in the current execution time being equal to or greater than the previous execution time.
4 . The method of claim 1 further comprising:
computing a mean function execution time using the previous execution time and one or more other previous execution times; injecting the filler instructions while the function is executing based upon the mean execution time.
5 . The method of claim 1 wherein the method is performed in response to determining that the function is a cryptographic function.
6 . The method of claim 1 further comprising:
developing the program and generating a function identifier file that identifies one or more cryptographic functions included in the program; detecting, based upon the function identifier file, that the function is the cryptographic function; and performing, in response to the detecting, the computing, the retrieving, the determining, and the injecting.
7 . The method of claim 1 wherein the method is performed during advanced encryption standard processing.
8 . A computer program product stored on a computer operable media, the computer operable media containing instructions for execution by a computer, which, when executed by the computer, cause the computer to implement a method for smoothing cryptographic function timing footprints, the method comprising:
executing a function included in a program; in response to the execution, computing a current execution time that corresponds to the amount of time that the function requires to execute; retrieving a previous execution time, the previous execution time corresponding to the amount of time that the function required during a previous execution; determining that the current execution time is less than the previous execution time; and in response to the determination, injecting one or more filler instructions that do not correspond to the program, wherein the injecting increases the current execution time until the current execution time is equal to the previous execution time.
9 . The computer program product of claim 8 wherein code space corresponding to the program is not modified during the injecting; and
wherein a code pointer corresponding to the program is not modified during the injecting.
10 . The computer program product of claim 8 wherein the method further comprises:
computing a mean function execution time using the previous execution time and one or more other previous execution times; and adjusting a clock speed while the function is executing based upon the mean execution time, wherein the adjusting results in the current execution time being equal to or greater than the previous execution time.
11 . The computer program product of claim 8 wherein the method further comprises:
computing a mean function execution time using the previous execution time and one or more other previous execution times; injecting the filler instructions while the function is executing based upon the mean execution time.
12 . The computer program product of claim 8 wherein the method is performed in response to determining that the function is a cryptographic function.
13 . The computer program product of claim 8 wherein the method further comprises:
developing the program and generating a function identifier file that identifies one or more cryptographic functions included in the program; detecting, based upon the function identifier file, that the function is the cryptographic function; and performing, in response to the detecting, the computing, the retrieving, the determining, and the injecting.
14 . The computer program product of claim 8 wherein the method is performed during advanced encryption standard processing.
15 . An information handling system comprising:
one or more processors; a memory accessible by the processors; one or more nonvolatile storage devices accessible by the processors; and a timing footprint smoothing tool for smoothing a cryptographic function's timing footprint, the timing footprint smoothing tool being effective to:
execute a function included in a program that is retrieved from one of the nonvolatile storage devices;
in response to the execution, compute a current execution time that corresponds to the amount of time that the function requires to execute;
retrieve a previous execution time from the memory, the previous execution time corresponding to the amount of time that the function required during a previous execution;
determine that the current execution time is less than the previous execution time; and
in response to the determination, inject one or more filler instructions that do not correspond to the program, wherein the injecting increases the current execution time until the current execution time is equal to the previous execution time.
16 . The information handling system of claim 15 wherein code space corresponding to the program is not modified during the injecting; and
wherein a code pointer corresponding to the program is not modified during the injecting.
17 . The information handling system of claim 15 wherein the timing footprint smoothing tool is further effective to:
compute a mean function execution time using the previous execution time and one or more other previous execution times; and adjust a clock speed while the function is executing based upon the mean execution time, wherein the adjusting results in the current execution time being equal to or greater than the previous execution time.
18 . The information handling system of claim 15 wherein the timing footprint smoothing tool is further effective to:
compute a mean function execution time using the previous execution time and one or more other previous execution times; inject the filler instructions while the function is executing based upon the mean execution time.
19 . The information handling system of claim 15 wherein timing footprint smoothing tool is further effective to determine that the function is a cryptographic function.
20 . The information handling system of claim 15 wherein the timing footprint smoothing tool is further effective to:
develop the program and generating a function identifier file that identifies one or more cryptographic functions included in the program; detect, based upon the function identifier file, that the function is the cryptographic function; and perform, in response to the detecting, the computing, the retrieving, the determining, and the injecting.Join the waitlist — get patent alerts
Track US2008052530A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.