lattice-crypto-attacks

Construct and reduce lattices to recover hidden cryptographic values.

11|4|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/sayseven7/frameseven --skill lattice-crypto-attacks-sayseven7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lattice-crypto-attacks
Source: https://github.com/sayseven7/frameseven/tree/main/internal/mcp/skills/lattice-crypto-attacks
Command: npx skills add https://github.com/sayseven7/frameseven --skill lattice-crypto-attacks-sayseven7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps recover hidden values from cryptographic problems that can be modeled as lattices, including small-root RSA cases, biased or reused nonces, subset sum instances, truncated PRNG outputs, and NTRU-style key recovery.

Core Features & Use Cases

  • Lattice construction guidance: Builds the right attack matrix or embedding for Coppersmith, Hidden Number Problem, knapsack, and NTRU scenarios.
  • Reduction strategy: Explains when to use LLL first and when BKZ is needed for stronger reduction.
  • Applied cryptanalysis workflows: Supports CTF solving, research prototypes, and security analysis of weak cryptographic implementations.
  • Use Case: You have RSA ciphertext with partial message knowledge or ECDSA signatures with nonce leakage, and need a principled lattice attack plan to recover the secret.

Quick Start

Use this skill to analyze the cryptographic challenge, identify the correct lattice attack, and outline the matrix construction and reduction steps needed to recover the secret.

Frequently Asked Questions about lattice-crypto-attacks

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

FAQPage Schema
How do I recover an ECDSA private key from nonce leakage using lattice reduction?

You can recover an ECDSA private key from nonce leakage by modeling the biased or reused nonces as a Hidden Number Problem, constructing an appropriate attack matrix, and applying LLL or BKZ reduction to extract the secret. This Skill guides that exact lattice construction and reduction workflow.

What is the best way to perform a Coppersmith small-root attack on RSA?

The best way to perform a Coppersmith small-root attack on RSA is to construct a lattice embedding for the partial message knowledge and reduce it. This Skill helps identify the correct matrix dimensioning and scaling needed to extract valid solutions from the reduced basis.

When should I use BKZ instead of LLL for subset sum cryptanalysis?

You should use BKZ instead of LLL for subset sum cryptanalysis when LLL reduction fails to extract a valid solution from the reduced basis, as BKZ provides stronger reduction at the cost of more computation. This Skill explains when to escalate from LLL to BKZ.

Can I use lattice attacks to recover NTRU keys in CTF challenges?

Yes, you can use lattice attacks to recover NTRU keys in CTF challenges by constructing an NTRU-style key recovery matrix and reducing it. This Skill provides the lattice construction guidance and reduction strategy needed for NTRU scenarios.

How do I recover truncated PRNG outputs with lattice methods?

You recover truncated PRNG outputs by embedding the known output bits into a lattice and reducing it to find the hidden internal states. This Skill outlines the matrix construction and reduction steps needed to solve truncated PRNG instances.

Do I need specific cryptographic parameters to set up a lattice attack?

Yes, you need correct cryptographic parameters and problem dimensions to set up a lattice attack, as incorrect lattice dimensioning and scaling will fail to extract valid solutions. This Skill helps analyze your challenge to identify the correct attack parameters.