constant-time-analysis

constant-time-analysis is a skill for Claude Code from RedHatProductSecurity/prodsec-skills. It costs 67 tokens per session (1,791 once invoked), scanned A, original, Apache-2.0.

A method for finding timing side channels in cryptographic code. A timing side channel is a leak where an attacker learns secret data from how long an operation takes.

In plain words
What is it for?
Writing or reviewing code for signing, encryption, decryption, key derivation, and other cryptographic operations in the listed programming languages.
Why use it?
It helps catch code whose branches, division, or other operations take different amounts of time depending on secret keys, tokens, or other sensitive values.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run ct_analyzer/analyzer.py <source_file>.

Part of the prodsec-skills plugin — 133 skills shipped together

Good fit Writing or reviewing code for signing, encryption, decryption, key derivation, and other cryptographic operations in the listed programming languages.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/RedHatProductSecurity/prodsec-skills
agentmods
npx agentmods add skills/redhatproductsecurity/prodsec-skills/constant-time-analysis

Made for: Claude Code.

Or install prodsec-skills, the plugin that ships this one along with the rest of its 133 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for constant-time-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/redhatproductsecurity/prodsec-skills/constant-time-analysis/github.svg)](https://agentmods.dev/skills/redhatproductsecurity/prodsec-skills/constant-time-analysis)
Your own site
<a href="https://agentmods.dev/skills/redhatproductsecurity/prodsec-skills/constant-time-analysis"><img src="https://agentmods.dev/badge/skills/redhatproductsecurity/prodsec-skills/constant-time-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for constant-time-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/redhatproductsecurity/prodsec-skills/constant-time-analysis"><img src="https://agentmods.dev/badge/skills/redhatproductsecurity/prodsec-skills/constant-time-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01791
Opus 5 $0.00034 $0.00896
Sonnet 5 $0.00013 $0.00358
Haiku 4.5 $0.00007 $0.00179

Measured 9d ago against content hash 3d2c20fa484a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

constant-time-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

module/skills/constant-time-analysis/SKILL.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Constant-Time Analysis

Analyze cryptographic code to detect operations that leak secret data through execution timing variations.

Companion analyzer: The upstream Trail of Bits prodsec-skills constant-time-analysis plugin ships ct_analyzer/analyzer.py and per-language reference docs (see upstream Trail of Bits prodsec-skills for companion files).

When to Use

User writing crypto code? ──yes──> Use this skill
         │
         no
         │
         v
User asking about timing attacks? ──yes──> Use this skill
         │
         no
         │
         v
Code handles secret keys/tokens? ──yes──> Use this skill
         │
         no
         │
         v
Skip this skill

Concrete triggers:

  • User implements signature, encryption, or key derivation
  • Code contains / or % operators on secret-derived values
  • User mentions "constant-time", "timing attack", "side-channel", "KyberSlash"
  • Reviewing functions named sign, verify, encrypt, decrypt, derive_key

When NOT to Use

  • Non-cryptographic code (business logic, UI, etc.)
  • Public data processing where timing leaks don't matter
  • Code that doesn't handle secrets, keys, or authentication tokens
  • High-level API usage where timing is handled by the library

Language Selection

Based on the file extension or language context, use the matching upstream reference under plugins/constant-time-analysis/skills/constant-time-analysis/references/:

Language File Extensions Guide (upstream filename)
C, C++ .c, .h, .cpp, .cc, .hpp compiled.md
Go .go compiled.md
Rust .rs compiled.md
Swift .swift swift.md
Java .java vm-compiled.md
Kotlin .kt, .kts kotlin.md
C# .cs vm-compiled.md
PHP .php php.md
JavaScript .js, .mjs, .cjs javascript.md
TypeScript .ts, .tsx javascript.md
Python .py python.md
Ruby .rb ruby.md

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 176 lines · 67 tokens per session scan A 3d2c20fa484a

Subscribe to this mod's changes

constant-time-analysis is a skill published in the GitHub repository RedHatProductSecurity/prodsec-skills (52 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 67 tokens to every session and 1,791 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.