constant-time-testing

Detect timing side channels in cryptographic implementations using statistical, dynamic, and formal analysis.

Updated Jan 17, 2026
One-click install
npx skills add https://github.com/mejango/juicy-vision --skill constant-time-testing-mejango
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constant-time-testing
Source: https://github.com/mejango/juicy-vision/tree/main/.claude/plugins/testing-handbook-skills/skills/constant-time-testing
Command: npx skills add https://github.com/mejango/juicy-vision --skill constant-time-testing-mejango

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Constant-time testing helps ensure cryptographic code does not leak secret information through timing differences, enabling trustworthy implementations.

Core Features & Use Cases

  • Detect timing differences in crypto primitives and protocols using a mix of statistical, dynamic, and formal techniques.
  • Provide a practical, end-to-end workflow for identifying, diagnosing, and remediating timing leaks in modular exponentiation, AES cache-timing vulnerabilities, and Montgomery reductions.
  • Support CI-ready workflows with tooling guidance (dudect for statistics, Timecop for dynamic tracing, and ct-verif/SideTrail for formal verification).
  • Illustrative Case: Use this skill to audit an RSA modular exponentiation implementation and verify constant-time behavior across compilers and optimization levels.

Quick Start

  • Install and configure core tooling: ensure dudect, Timecop, and a chosen formal tool (ct-verif or SideTrail) are available.
  • Create a minimal crypto function and harness, run the statistical test to detect leaks, then use Timecop to pinpoint the exact lines causing leakage.
  • Iterate on code fixes to achieve stable constant-time operation, then re-run extended dudect tests and, if desired, formal verification.

Frequently Asked Questions about constant-time-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect timing side channels in cryptographic implementations?

Detect timing side channels in cryptographic implementations by combining statistical, dynamic, and formal analysis methods. This approach audits crypto primitives, protocols, and architectures to identify leaks in operations like modular exponentiation or AES cache-timing.

What is the best way to combine dudect and Timecop for constant-time testing?

The best way to combine dudect and Timecop for constant-time testing is running dudect for statistical leak detection first, then using Timecop for dynamic tracing to pinpoint exact lines causing leakage, iterating fixes until stable.

Does constant-time testing work across different compilers and optimization levels?

Constant-time testing works across different compilers and optimization levels by auditing cryptographic implementations across architectures. You can verify constant-time behavior for operations like RSA modular exponentiation remains stable under varying compiler configurations.

How do I use formal verification to check for timing leaks in crypto code?

Use formal verification to check for timing leaks in crypto code by applying ct-verif or SideTrail. These tools mathematically prove constant-time execution, providing an optional, rigorous final validation step after statistical and dynamic testing.

Can I integrate constant-time testing into a CI-ready workflow?

You can integrate constant-time testing into a CI-ready workflow using prescribed tooling guidance. Automate statistical tests with dudect, dynamic tracing with Timecop, and formal verification with ct-verif or SideTrail to continuously catch timing leaks.

Why does Montgomery reduction cause timing leaks in cryptographic primitives?

Montgomery reduction causes timing leaks in cryptographic primitives when its execution time varies based on secret data. Detect these vulnerabilities using statistical and dynamic analysis methods designed to expose timing differences in modular arithmetic.