constant time analysis

Other Community

Skill notes

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

Language Routing

Read the guide for the target language before interpreting any findings; each one lists that language's dangerous instructions and the idiomatic constant-time replacements. Guide · Languages references/compiled.md · C, C++, Go, Rust references/swift.md · Swift references/vm-compiled.md · Java, C#

Running the Analyzer

The analyzer takes one file and detects the language from its extension. Always pass --warnings: Without it the analyzer reports only error-severity findings, which means division, modulo and weak RNG. Four detector families are warning severity and stay silent: secret-dependent branches, early-exit comparison (memcmp, strcmp, .equals, ==), table lookups indexed by a secret, and variable-time encoding. Early-exit comparison of an authentication tag is the most common timing bug in real code — Lucky Thirteen was exactly that — so a default run is quiet about the finding you are most likely to have.

Per-language coverage limits

Coverage is not uniform, and the gaps change what a clean report means: Language · What the report does not cover Go · Only symbols from the analyzed file. go build links the runtime in, and its divisions — all on public data — would otherwise dominate the findings JavaScript, TypeScript · Bytecode findings are restricted to functions the file declares by name, because V8 dumps node's internals the same way it dumps yours. Anonymous callbacks fall to the source scan. For TypeScript, bytecode findings name the function but carry no line, since V8's positions index the transpiled output

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Other
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@trailofbits · no license declared
Token usage
Lean
Setup complexity
Manual integration
External API key
Not required
Operating systems
macOS · Linux
Runtime requirements
Node.js · Python
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview constant-time-analysis.preview
# Interpreting Results

[ERROR] SDIV
  Function: decompose_vulnerable
  Reason: SDIV has early termination optimization; execution time depends on operand values

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.