Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By bongkagev0.2.4CC-BY-SA-4.0In 1 marketplace
Detect compiler-induced timing side-channels in cryptographic code
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A portable tool for detecting timing side-channel vulnerabilities in compiled cryptographic code. Analyzes assembly output from multiple compilers and architectures to detect instructions that could leak secret data through execution timing.
Timing side-channel attacks exploit variations in execution time to extract secret information from cryptographic implementations. Common sources include:
DIV, IDIV): Execution time varies based on operand valuesFDIV, FSQRT): Variable latency based on inputsThe infamous KyberSlash attack demonstrated how division instructions in post-quantum cryptographic implementations could be exploited to recover secret keys.
# Install
uv tool install .
# Analyze a C file
ct-analyzer crypto.c
The rest of this README documents ct-analyzer, the CLI. Inside Claude Code the plugin
offers two more entry points:
| Component | Name | Purpose |
|---|---|---|
| Skill | constant-time-analysis | Triggers on its own when you write or review crypto code, or ask about a timing side channel. Invoke directly with /constant-time-analysis:constant-time-analysis. Adds the per-language guidance under skills/constant-time-analysis/references/ and judgment about triaging what the analyzer reports |
| Command | /constant-time-analysis:ct-check | One-shot run over a file — <source-file> [--warnings] [--json] [--arch <arch>] |
ct-analyzer <source_file>
| Option | Description |
|---|---|
--arch, -a | Target architecture (x86_64, arm64, arm, riscv64, ppc64le, s390x, i386) |
--compiler, -c | Compiler to use (gcc, clang, go, rustc) |
--opt-level, -O | Optimization level (O0, O1, O2, O3, Os, Oz) - default: O2 |
--warnings, -w | Include conditional branch warnings |
--func, -f | Regex pattern to filter functions |
--json | Output JSON format |
--github | Output GitHub Actions annotations |
--list-arch | List supported architectures |
# Test with different optimization levels
ct-analyzer --opt-level O0 crypto.c
ct-analyzer --opt-level O3 crypto.c
# Cross-compile for ARM64
ct-analyzer --arch arm64 crypto.c
# Include conditional branch warnings
ct-analyzer --warnings crypto.c
# Analyze specific functions
ct-analyzer --func 'decompose|sign' crypto.c
# JSON output for CI
ct-analyzer --json crypto.c
# Analyze Go code
ct-analyzer crypto.go
# Analyze Rust code
ct-analyzer crypto.rs
# Analyze PHP code (requires PHP with VLD extension or opcache)
ct-analyzer crypto.php
# Analyze TypeScript (transpiles to JS first)
ct-analyzer crypto.ts
# Analyze JavaScript (uses V8 bytecode analysis)
ct-analyzer crypto.js
# Analyze Python (uses dis module for bytecode disassembly)
ct-analyzer crypto.py
# Analyze Ruby (uses YARV instruction dump)
ct-analyzer crypto.rb
| Category | x86_64 | ARM64 | RISC-V |
|---|---|---|---|
| Integer Division | DIV, IDIV, DIVQ, IDIVQ | UDIV, SDIV | DIV, DIVU, REM, REMU |
| FP Division | DIVSS, DIVSD, DIVPS, DIVPD | FDIV | FDIV.S, FDIV.D |
| Square Root | SQRTSS, SQRTSD, SQRTPS, SQRTPD | FSQRT | FSQRT.S, FSQRT.D |
Conditional branches that may leak timing if condition depends on secret data:
PHP analysis uses either the VLD extension (recommended) or opcache debug output:
Detected PHP Vulnerabilities:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub bongkage/trailofbits-skills --plugin constant-time-analysisPlugins from other owners that cover similar ground