Agent skill · Security

constant-time-analysis

Detects timing side-channel vulnerabilities in cryptographic code. Use when implementing or reviewing crypto code, encountering division on secrets, secret-dependent branches, or constant-time programming questions in C, C++, Go, Rust, Swift, Java, Kotlin, C#, PHP, JavaScript, TypeScript, Python, or Ruby.

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codecan modify filesCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill constant-time-analysis --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 12
SKILL.md size: 13 KB
Bundled scripts: none
Allowed tools: BashReadGrepGlob
Path: plugins/constant-time-analysis/skills/constant-time-analysis/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Constant-Time Analysis Compile the code, inspect the emitted assembly or bytecode for variable-time instructions, then decide which of the flagged operations actually touch secrets. The compilation step is mechanical; the triage step is the work. ## When to Use - Implementing or reviewing a signature, encryption, KEM, or key derivation routine - Code applies `/` or `%` to a value derived from a key, plaintext, nonce, or token - The user mentions "constant-time", "timing attack", "side-channel", or "KyberSlash" - Reviewing functions named `sign`, `verify`, `encrypt`, `decrypt`, `derive_key` ## When NOT to Use - **Measuring** timing variance on a running binary — use the `constant-time-testing` skill from the `testing-handbook-skills` plugin, which covers dudect and statistical approaches and may not be installed. This skill inspects compiler output statically and never executes the code under test. - Non-cryptographic code, or crypto code where every input is public - High-level API usage where a vetted library owns the constant-time guarantees - Cache and other microarchitectural side channels — the assembly view cannot see them ## Language Routing Read the guide for the target l

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Language Routing
  4. Running the Analyzer
  5. Per-language coverage limits
  6. Prerequisites
  7. Interpreting Results
  8. Triaging Findings
  9. Limitations
  10. Real-World Impact
  11. References
Ships with 11 files
  • README.md
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
  • references/compiled.md
  • references/javascript.md
  • references/kotlin.md
  • references/php.md
  • references/python.md
  • references/ruby.md
  • references/swift.md
  • references/vm-compiled.md
Commands it runs
uv run {baseDir}/ct_analyzer/analyzer.py --warnings <source_file>
for f in src/crypto/*.c; do uv run {baseDir}/ct_analyzer/analyzer.py --warnings --json "$f"; done
More from skills
All skills →
About this skill
What does the constant-time-analysis skill do?

Detects timing side-channel vulnerabilities in cryptographic code. Use when implementing or reviewing crypto code, encountering division on secrets, secret-dependent branches, or constant-time programming questions in C, C++, Go, Rust, Swift, Java, Kotlin, C#, PHP, JavaScript, TypeScript, Python, or Ruby.

How do I install it?

Run `npx skills add trailofbits/skills --skill constant-time-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going