constant-time-analysis

constant-time-analysis is a skill for Claude Code from 26zl/cybersec-toolkit. It costs 67 tokens per session (2,230 once invoked), scanned A, original, MIT.

A guide to finding timing side-channel weaknesses in cryptographic code. A timing side channel occurs when differences in execution time reveal secret keys, tokens, or other protected data.

In plain words
What is it for?
Use it when implementing or reviewing signing, encryption, decryption, or key-derivation code in languages including C, C++, Go, Rust, Java, Python, and others.
Why use it?
It helps prevent attackers from learning secrets by measuring how long operations take. The checks focus on secret-dependent branches and arithmetic in crypto code.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the cybersec-toolkit plugin — 197 skills, 2 hooks, 1 MCP server shipped together

Good fit Use it when implementing or reviewing signing, encryption, decryption, or key-derivation code in languages including C, C++, Go, Rust, Java, Python, and others.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/26zl/cybersec-toolkit/constant-time-analysis
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add 26zl/cybersec-toolkit --skill constant-time-analysis
Clone the repo
git clone --depth 1 https://github.com/26zl/cybersec-toolkit

Made for: Claude Code.

Or install cybersec-toolkit, the plugin that ships this one along with the rest of its 197 skills, 2 hooks, 1 MCP server.

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/26zl/cybersec-toolkit/constant-time-analysis/github.svg)](https://agentmods.dev/skills/26zl/cybersec-toolkit/constant-time-analysis)
Your own site
<a href="https://agentmods.dev/skills/26zl/cybersec-toolkit/constant-time-analysis"><img src="https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/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/26zl/cybersec-toolkit/constant-time-analysis"><img src="https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/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 2,230 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 141
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 144
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.02230
Opus 5 $0.00034 $0.01115
Sonnet 5 $0.00013 $0.00446
Haiku 4.5 $0.00007 $0.00223

Measured 5d ago against content hash a68f05986334, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 5d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (ct_analyzer/__init__.py, ct_analyzer/analyzer.py, ct_analyzer/script_analyzers.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/constant-time-analysis/SKILL.md · 222 lines

How it starts

The opening of the file, as written. The whole thing — 222 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.

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, refer to the appropriate guide:

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

Read the full file on GitHub · 222 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. 5d ago First seen · 222 lines · 67 tokens per session scan A a68f05986334

Subscribe to this mod's changes

constant-time-analysis is a skill published in the GitHub repository 26zl/cybersec-toolkit (51 stars, last pushed yesterday), licensed MIT. It adds 67 tokens to every session and 2,230 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-09-03.

Related

Other skills, from other repositories