Install any skill in seconds. Free to start, no credit card required.
Get Started Free →trailofbits/constant-time-testing
Constant-time testing detects timing side channels in cryptographic code.
Passed 21 of 22 test cases with the skill, and 17 of 22 without it.
and 2 more in the full report
4 fixed17 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
List three fundamental C code patterns that account for most cryptographic timing vulnerabilities.
| Checked | Without skill | With skill |
|---|---|---|
| Includes conditional branches as a violation pattern | Passed | Passed |
| Includes secret-dependent lookup table indexing as a violation pattern | Passed | Passed |
| Includes secret-dependent integer division as a violation pattern | Missed | Passed |
The instructions your model reads when the skill loads.
Timing attacks exploit variations in execution time to extract secret information from cryptographic implementations. Unlike cryptanalysis that targets theoretical weaknesses, timing attacks leverage implementation flaws - and they can affect any cryptographic code.
Timing attacks were introduced by Kocher in 1996. Since then, researchers have demonstrated practical attacks on RSA (Schindler), OpenSSL (Brumley and Boneh), AES implementations, and even post-quantum algorithms like Kyber.
| Concept | Description |
|---|---|
| Constant-time | Code path and memory accesses independent of secret data |
| Timing leakage | Observable execution time differences correlated with secrets |
| Side channel | Information extracted from implementation rather than algorithm |
| Microarchitecture | CPU-level timing differences (cache, division, shifts) |
Timing vulnerabilities can:
Two prerequisites enable exploitation:
Four patterns account for most timing vulnerabilities:
// 1. Conditional jumps - most severe timing differences
if(secret == 1) { ... }
while(secret > 0) { ... }
// 2. Array access - cache-timing attacks
lookup_table[secret];
test cases passed, vs 17 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.