constant-time-analysis

Detect timing side-channel vulnerabilities in cryptographic assembly or bytecode.

1|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/Ramprasad4121/srp --skill constant-time-analysis-ramprasad4121
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constant-time-analysis
Source: https://github.com/Ramprasad4121/srp/tree/main/skills-repos/trailofbits/plugins/constant-time-analysis/skills/constant-time-analysis
Command: npx skills add https://github.com/Ramprasad4121/srp --skill constant-time-analysis-ramprasad4121

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill identifies potential security vulnerabilities in cryptographic code where the execution time varies based on secret data, which can lead to information leakage.

Core Features & Use Cases

  • Vulnerability Detection: Analyzes code (C, C++, Go, Rust, Java, C#, Python, JS, PHP, Ruby, Swift) for dangerous instructions like division or secret-dependent branches.
  • Cross-Architecture Support: Tests compiled code across various CPU architectures (x86_64, ARM64, etc.).
  • Use Case: A developer implementing a new encryption algorithm can use this Skill to automatically scan their code for common timing attack vectors before deployment, ensuring greater security.

Quick Start

Analyze the provided Swift file 'crypto.swift' for timing vulnerabilities.

Frequently Asked Questions about constant-time-analysis

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

FAQPage Schema
How do I detect timing side-channel vulnerabilities in cryptographic code?

You can detect timing side-channel vulnerabilities by analyzing compiled assembly or bytecode for dangerous instructions, such as secret-dependent branches, divisions, and comparisons, to identify potential information leakage before deployment.

What programming languages can I scan for constant-time execution issues?

You can scan C, C++, Go, Rust, Java, C#, Python, JavaScript, PHP, Ruby, and Swift source code by analyzing their compiled outputs to identify secret-dependent branches, divisions, and comparisons that violate constant-time execution rules.

Does constant-time analysis support cross-architecture compilation targets for security review?

Yes, constant-time analysis supports testing compiled cryptographic code across various CPU architectures like x86_64 and ARM64, ensuring timing attack vectors are identified regardless of the hardware compilation target.

Why does execution time vary based on secret data in cryptographic implementations?

Execution time varies based on secret data when cryptographic implementations use dangerous instructions like secret-dependent branches or divisions, creating timing side-channel vulnerabilities that can leak sensitive information to attackers.

What are the limitations of analyzing assembly for timing attack vectors?

Analyzing assembly for timing attack vectors is limited to identifying dangerous instructions like secret-dependent divisions, branches, and comparisons, serving as a guide for constant-time fixes rather than a guarantee of complete cryptographic security.