← Explore all skills

TESTING / trailofbits

Constant-Time Runtime Testing

Design statistical and dynamic tests for secret-dependent timing in cryptographic implementations.

“Measures timing side channels in cryptographic implementations by running them, using dudect for statistical analysis and Timecop over Valgrind for dynamic tracing. Covers the formal,”

01 / THE REASONING

Why this made the selection.

  • The file is a handbook for measuring a running cryptographic implementation, and it sends static compiler inspection to a different plugin.
  • Its own dudect section says a statistical result cannot guarantee that no leak exists, and the install detail is deferred to the dudect and timecop skills.
  • The definition separates formal, symbolic, dynamic and statistical evidence and explicitly states that dudect cannot guarantee absence or identify root cause.
  • Choose between dudect timing measurements and Timecop secret-flow tracing

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • plugins/testing-handbook-skills/skills/constant-time-testing/SKILL.md
  • LICENSE
  • README.md

Our findings

  • It tells the reader to run the implementation with dudect or Timecop. Those runs are local. The file does not fetch the tools, and setup is delegated to the other skills.
  • It says not to use this path for code that does not process secrets, and not to use it for static inspection of compiler output.
  • Dudect, as this file describes it, cannot guarantee the absence of a leak. The diagram's title for this skill does not match the frontmatter name.
  • The definition separates formal, symbolic, dynamic and statistical evidence and explicitly states that dudect cannot guarantee absence or identify root cause.

Not established by this review

  • The resource was not executed and its tools were not called.
  • dudect and Timecop were not installed or run.
  • No skill execution, authenticated service operation, or outcome benchmark was performed.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Add a skill to your workflow.

Upstream setup instructions ↗

DOCUMENTED COMMAND

npx skills add trailofbits/skills/plugins/testing-handbook-skills/skills/constant-time-testing

Run in your terminal to choose your AI tools, project or global scope, and installation method. This short command follows the current upstream version; the review covers the revision shown above.

Optional: install the reviewed revision

Keeps the original source and installer version where recorded, while leaving your AI tools and installation scope for you to choose.

npx skills add https://github.com/trailofbits/skills/tree/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/testing-handbook-skills/skills/constant-time-testing
  1. Install the pinned skill directory interactively, retaining its bundled references and scripts.
  2. Identify secrets, observable inputs and the actual production build configuration.
  3. Construct fixed/random input classes and a measurement harness; use tracing to investigate suspicious timing differences.

Before you start

  • A controlled test host
  • The selected dudect or Valgrind/Timecop toolchain
  • A compilable authorized crypto target

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. Pinned skill definition ↗Checked

    https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/testing-handbook-skills/skills/constant-time-testing/SKILL.md

    Supports: summary, whySelected, bestFor, limitations, install, access, review

  2. https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/README.md

    Supports: install

  3. CC-BY-SA-4.0 licence ↗Checked

    https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE

    Supports: license

Evidence & Ask