Command Palette

Search for a command to run...

Back to skills
skill № 66231

modern-cryptography

Modern Cryptography, ECC, ECDHE, and Post-Quantum Algorithms

FreeNo executable scripts
j4flmaoby j4flmao★ 47 GitHub stars

Install modern-cryptography in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Modern Cryptography: ECC, Key Exchange, and Post-Quantum Security

The bedrock of secure communications (TLS, SSH, VPNs) relies on asymmetric cryptography for key exchange and digital signatures. The landscape has shifted from traditional RSA to Elliptic Curve Cryptography (ECC) and, since NIST finalized its first PQC standards in 2024, to Post-Quantum Cryptography (PQC) — increasingly deployed in hybrid mode today.

Purpose

Explain the mechanics and correct selection of modern asymmetric cryptography — ECC/ECDHE for key exchange and forward secrecy, and NIST PQC standards for quantum resistance — so engineers pick sound algorithms, parameters, and migration (hybrid) strategies for TLS/SSH/VPN systems.

Agent Protocol

Trigger

User phrases: "ECC vs RSA", "ECDHE / forward secrecy", "Curve25519", "post-quantum crypto", "ML-KEM / Kyber", "hybrid key exchange", "which curve/algorithm to use".

Input Context

  • Protocol (TLS 1.3, SSH, WireGuard, custom) and constraints (bandwidth, hardware).
  • Whether quantum resistance / crypto-agility is required.

Output Artifact

Algorithm/curve recommendation with rationale and migration guidance. No key material.

Response Format

Use case: {key exchange | signature | KEM}
Recommend: {algorithm + parameters}
Why: {security + performance rationale}
PQC posture: {classical | hybrid | PQC-only}

Elliptic Curve Cryptography (ECC)

ECC provides equivalent security to RSA but with significantly smaller key sizes, resulting in faster computations and lower bandwidth requirements.

  • Mathematical Basis: ECC is based on the algebraic structure of elliptic curves over finite fields. The security relies on the Elliptic Curve Discrete Logarithm Problem (ECDLP): Given a base point $G$ on the curve and a point $P$ such that $P = kG$ (where $k$ is a scalar), it is computationally infeasible to determine the private key $k$ given only $P$ and $G$.
  • Public/Private Keys:
    • Private Key ($d$): A randomly selected integer.
    • Public Key ($Q$): A point on the curve, calculated as $Q = d \times G$ (scalar multiplication).
  • Standard Curves: Curve25519 (developed by D. J. Bernstein) is highly favored for its performance and resistance to timing attacks, heavily utilized in modern TLS 1.3 and WireGuard. NIST curves (e.g., P-256, P-384) are also ubiquitous.

Elliptic Curve Diffie-Hellman Ephemeral (ECDHE)

ECDHE is the standard key exchange mechanism in modern protocols, providing Perfect Forward Secrecy (PFS). PFS ensures that even if long-term private keys are compromised in the future, past session keys cannot be derived.

The Exchange Process:

  1. Parameter Agreement: Alice and Bob agree on a specific elliptic curve and base point $G$.
  2. Ephemeral Key Generation:
    • Alice generates a temporary private key $d_A$ and computes her public key $Q_A = d_A \times G$.
    • Bob generates a temporary private key $d_B$ and computes his public key $Q_B = d_B \times G$.
  3. Exchange & Authentication: Alice and Bob exchange $Q_A$ and $Q_B$. (In TLS, these public keys are typically signed by the sender's long-term identity key, e.g., an RSA or ECDSA certificate, to prevent Man-in-the-Middle attacks).
  4. Shared Secret Computation:
    • Alice computes $S_A = d_A \times Q_B = d_A \times (d_B \times G)$.
    • Bob computes $S_B = d_B \times Q_A = d_B \times (d_A \times G)$.
    • Due to the associative property, $S_A = S_B$. This is the shared secret point on the curve.
  5. Key Derivation Function (KDF): The x-coordinate of the shared secret point is passed through a KDF (like HKDF) to derive symmetric keys for bulk encryption (e.g., AES-GCM or ChaCha20-Poly1305).

Post-Quantum Cryptography (PQC)

Shor's algorithm, running on a sufficiently powerful quantum computer, can solve both the integer factorization problem (breaking RSA) and the ECDLP (breaking ECC) in polynomial time. PQC aims to establish algorithms resistant to both quantum and classical computers.

  • NIST Standardization: NIST finalized its first PQC standards in August 2024.
    • Key Encapsulation Mechanisms (KEMs) / Key Exchange: ML-KEM (FIPS 203, formerly Kyber). Based on the Module Learning with Errors (MLWE) problem over lattices.
    • Digital Signatures: ML-DSA (FIPS 204, formerly Dilithium) and SLH-DSA (FIPS 205, stateless hash-based, formerly SPHINCS+). FN-DSA (formerly Falcon) is a further lattice-based signature standard in progress.
  • Lattice-Based Cryptography: The core of Kyber and Dilithium. Security is based on the hardness of problems like the Shortest Vector Problem (SVP) or Learning With Errors (LWE) in high-dimensional lattices. It's difficult to find a vector close to a given point without the "trapdoor" information.
  • Hybrid Key Exchange: During the transition, TLS 1.3 deployments (Chrome, Cloudflare, OpenSSL) use a hybrid group — initially X25519Kyber768Draft00, now the standar
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the modern-cryptography skill do?

Modern Cryptography, ECC, ECDHE, and Post-Quantum Algorithms

How do I install the modern-cryptography skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the modern-cryptography skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare modern-cryptography with