Crypto Analysis logo

Crypto Analysis

Community
hypnguyen1209
crypto-analysis

Use when assessing cryptography — TLS/PKI auditing, RSA/ECC key attacks, ECDSA nonce lattice recovery, symmetric/AEAD misuse, JWT/JOSE forgery, hash cracking, post-quantum migration review

Overview

Publisherhypnguyen1209
Repositoryoffensive-claude
Skill namecrypto-analysis
Stars
396
Forks
71
Bundled files
13
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 13 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hypnguyen1209 on GitHub. Read the source before you install it.

Installation

Install the Crypto Analysis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hypnguyen1209/offensive-claude/tree/main/skills/crypto-analysis
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hypnguyen1209/offensive-claude.git /tmp/offensive-claude
mkdir -p .claude/skills
cp -r /tmp/offensive-claude/skills/crypto-analysis .claude/skills/crypto-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Crypto Analysis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Crypto Analysis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Crypto Analysis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Cryptographic Analysis

When to Activate

  • Auditing TLS/SSL/SSH configurations and X.509 PKI (cipher suites, downgrade, protocol flaws)
  • Reviewing crypto implementations in source code or captured traffic
  • Attacking weak RSA/ECC keys (CTF and real-world weak-key hygiene)
  • Recovering ECDSA/DSA private keys from reused or biased nonces (lattice/HNP)
  • Exploiting symmetric/AEAD misuse: padding oracles, GCM nonce reuse, key-commitment
  • Forging JWT/JOSE tokens (algorithm confusion, none, jwk/jku/kid injection)
  • Cracking password hashes and grading KDF strength
  • Assessing post-quantum readiness ("harvest now, decrypt later" exposure)

Technique Map

TechniqueATT&CKCWEReferenceScript
TLS cipher/protocol downgrade auditT1600.001CWE-326references/tls-pki-audit.mdscripts/tls_audit.py
Terrapin SSH prefix truncation (CVE-2023-48795)T1557CWE-222references/tls-pki-audit.mdscripts/tls_audit.py
Marvin/Bleichenbacher RSA timing oracleT1600CWE-208references/tls-pki-audit.mdscripts/tls_audit.py
X.509 / CT-log shadow-asset discoveryT1589CWE-295references/tls-pki-audit.mdscripts/tls_audit.py
RSA weak-key factoring (Fermat/Wiener/common-modulus)T1600CWE-326references/rsa-attacks.mdscripts/rsa_attack.py
Coppersmith partial-key & ROCA (CVE-2017-15361)T1600CWE-310references/rsa-attacks.mdscripts/rsa_attack.py
Hastad broadcast / batch-GCDT1600CWE-326references/rsa-attacks.mdscripts/rsa_attack.py
ECDSA nonce reuse key recoveryT1552.004CWE-323references/ecc-nonce-attacks.mdscripts/ecdsa_lattice.py
Biased-nonce lattice/HNP (Minerva, PuTTY CVE-2024-31497)T1552.004CWE-1241references/ecc-nonce-attacks.mdscripts/ecdsa_lattice.py
Psychic signature (0,0) (CVE-2022-21449)T1606.001CWE-347references/ecc-nonce-attacks.mdscripts/ecdsa_lattice.py
CBC padding oracle (byte-by-byte decrypt)T1040CWE-209references/symmetric-aead.mdscripts/padding_oracle.py
AES-GCM nonce reuse "forbidden attack"T1040CWE-323references/symmetric-aead.mdscripts/gcm_nonce_reuse.py
AEAD key-commitment / invisible salamanders / partitioning oracleT1606CWE-347references/symmetric-aead.mdscripts/gcm_nonce_reuse.py
JWT algorithm confusion RS256→HS256 (CVE-2024-54150)T1606.001CWE-347references/jwt-jose.mdscripts/jwt_forge.py
JWT alg=none / jwk / jku / kid injectionT1606.001CWE-347references/jwt-jose.mdscripts/jwt_forge.py
Hash identification & GPU crackingT1110.002CWE-916references/hash-pq.mdscripts/hash_triage.py
Weak KDF / fast-hash password storageT1110.002CWE-916references/hash-pq.mdscripts/hash_triage.py
Post-quantum / HNDL exposure reviewT1600CWE-327references/hash-pq.mdscripts/tls_audit.py

Quick Start

bash
# 0. TLS/PKI posture in one shot (downgrade, ROBOT, SWEET32, Terrapin, cert/CT)
python3 scripts/tls_audit.py target.com:443 --ssh target.com:22 --ct --json out.json
testssl.sh --full --robot --sweet32 https://target.com   # cross-check with the canonical tool

# 1. RSA weak-key triage on a captured public key
python3 scripts/rsa_attack.py --pubkey server.pem --ct ciphertext.b64 --auto
#   tries Fermat (p~=q), Wiener (small d), batch-GCD/common-modulus, ROCA fingerprint

# 2. ECDSA key recovery from a signature corpus (reuse or bias)
python3 scripts/ecdsa_lattice.py recover sigs.json --curve secp256r1 --known-msb 4
#   reuse: needs 2 sigs w/ same r; bias: ~256-1200 sigs depending on leak

# 3. Symmetric/AEAD misuse
python3 scripts/padding_oracle.py --url https://t/dec --ct $CT --block 16   # CBC oracle
python3 scripts/gcm_nonce_reuse.py forbidden ct1.bin ct2.bin --nonce $N     # recover H + forge

# 4. JWT forgery chain
python3 scripts/jwt_forge.py confusion --pubkey jwt_pub.pem --claims '{"role":"admin"}'
python3 scripts/jwt_forge.py none      --claims '{"sub":"admin"}'

# 5. Hash triage + crack plan
python3 scripts/hash_triage.py hashes.txt            # identify + emit hashcat -m / john format
hashcat -m 22000 capture.hc22000 wl.txt -r rules/best64.rule

OPSEC & Detection (summary)

TechniqueTelemetry / IOCDetection (Sigma/EDR)OPSEC note
TLS scanning / testsslBurst of handshakes, many cipher renegotiations, malformed ClientHellosNIDS: high TLS alert rate from one src; Zeek ssl.log anomalous cipher offersRate-limit, spread across source IPs; passive cert/CT recon leaves no target-side trace
Marvin/ROBOT oracle probing~10^4–10^6 RSA decrypts, repeated malformed pre-master/CMSWAF/IDS: spike of TLS decrypt errors, identical-size payloadsExtremely loud; only against authorized hosts; use minimal query budgets
Terrapin MitMInjected SSH_MSG_IGNORE, sequence-number gap at NEWKEYSSSH server logs kex mismatch; netflow showing on-path deviceRequires active MitM; detectable by strict-kex peers; abort if kex-strict present
ECDSA nonce harvestingBulk signature collection (Git, TLS, SSH, blockchain)Mostly offline — no target telemetry once sigs capturedCollection is passive; recovery is offline; rotate-key advice in report
CBC padding oracleThousands of decrypt requests, alternating valid/invalid paddingWeb logs: ~256×blocks requests to one endpoint; Sigma on 4xx burstVery noisy (256×blocks×msgs); throttle, randomize timing
GCM nonce reuse / partitioningRepeated (nonce,key) pairs; multi-key ciphertext blobsApp crypto audit; flag reused IVs in logsForbidden-attack math is offline once two ciphertexts captured
JWT forgeryAnomalous alg, external jku/x5u fetch, all-zero ES signatureSigma: JWT with alg:none/HS after RS expected; egress to attacker JWKS URLEach forged token is a single request; minimal noise
Hash crackingNone on target (offline)N/A unless online spray (then T1110)Offline; protect loot at rest; never spray live without scope

Deep Dives

  • references/tls-pki-audit.md — TLS/SSL/SSH posture: cipher/protocol downgrade, Terrapin (CVE-2023-48795), Marvin/Bleichenbacher (CVE-2022-4304, CVE-2024-2236), SWEET32/DROWN/Logjam/POODLE, X.509 and Certificate-Transparency analysis.
  • references/rsa-attacks.md — Weak-key factoring: Fermat, Wiener, common modulus, Hastad broadcast, Coppersmith partial-key, batch-GCD, ROCA (CVE-2017-15361); RsaCtfTool / cado-nfs / SageMath workflow.
  • references/ecc-nonce-attacks.md — ECDSA/DSA nonce reuse, biased-nonce lattice/HNP recovery (Minerva, PuTTY CVE-2024-31497), invalid-curve attacks, psychic signatures (CVE-2022-21449).
  • references/symmetric-aead.md — Block-cipher mode misuse: ECB detection, CBC padding oracle, CTR/GCM nonce reuse (forbidden attack), AEAD key-commitment / invisible salamanders / partitioning oracles.
  • references/jwt-jose.md — JWT/JOSE token forgery: algorithm confusion (CVE-2024-54150), alg=none, jwk/jku/x5u/kid injection, weak-secret cracking, library-level CVE landscape.
  • references/hash-pq.md — Hash identification, modern GPU cracking economics (RTX 40/50-series), KDF strength grading, and post-quantum migration / "harvest now, decrypt later" assessment (ML-KEM/ML-DSA, hybrid TLS, crypto-agility).

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Crypto Analysis AI skill do?

Use when assessing cryptography — TLS/PKI auditing, RSA/ECC key attacks, ECDSA nonce lattice recovery, symmetric/AEAD misuse, JWT/JOSE forgery, hash cracking, post-quantum migration review

Why use Crypto Analysis on TypingMind?

Because you install it once and use it with any model. Crypto Analysis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Crypto Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hypnguyen1209/offensive-claude/tree/main/skills/crypto-analysis. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Crypto Analysis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Crypto Analysis?

As many as you like. As long as a model supports skills, you can use Crypto Analysis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Crypto Analysis AI skill free?

Yes. It is published on GitHub by hypnguyen1209 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇