lattice-crypto-attacks

Apply LLL/BKZ reductions and Coppersmith methods to recover secrets from weak RSA, DSA/ECDSA, and knapsack constructions.

120|8|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/Prohao42/aimy-sikll --skill lattice-crypto-attacks-prohao42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lattice-crypto-attacks
Source: https://github.com/Prohao42/aimy-sikll/tree/main/ai-mian/hack-skills/skills/lattice-crypto-attacks
Command: npx skills add https://github.com/Prohao42/aimy-sikll --skill lattice-crypto-attacks-prohao42

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Lattices-based cryptanalysis problems require structured methods to recover secrets from RSA, DSA/ECDSA, and knapsack-like constructions. This playbook provides a consolidated approach to apply LLL/BKZ reduction, Coppersmith's method (univariate and multivariate), Hidden Number Problem, and related lattice techniques to real-world cryptanalysis tasks.

Core Features & Use Cases

  • Lattice Fundamentals and definitions
  • Practical guidance on applying LLL, BKZ, and embedding techniques
  • Use cases include RSA small roots, Boneh-Durfee small d, DSA/ECDSA nonce bias, knapsack, NTRU, and recurrence-based analyses
  • Step-by-step templates for constructing and reducing lattices from problem statements
  • Interpreting reduced basis to recover secrets safely and verifiably

Quick Start

Provide a ready-to-use lattice-attack plan for a given cryptographic problem by choosing the appropriate lattice construction and reduction parameters.

Frequently Asked Questions about lattice-crypto-attacks

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

FAQPage Schema
How do I apply lattice cryptanalysis to recover RSA private keys from small public exponents?

Lattice cryptanalysis recovers RSA secrets by applying Coppersmith's method to find small roots. You construct a lattice from the public parameters, apply LLL or BKZ reduction, and interpret the reduced basis to extract the private key candidates.

What is the best way to exploit DSA nonce bias using lattice reduction?

Exploiting DSA nonce bias involves formulating the Hidden Number Problem as a lattice. You construct a lattice embedding the biased nonce relationships, apply LLL reduction, and extract the secret signing key from the shortest vector in the reduced basis.

Do I need SageMath or fpylll to perform LLL and BKZ reductions for cryptanalysis?

Yes, you need SageMath or Python libraries like fpylll to construct lattices and perform LLL and BKZ reductions. These environments provide the mathematical primitives required to build the lattice matrices and execute the reduction algorithms.

Can Coppersmith's method be used for both univariate and multivariate small roots in RSA?

Coppersmith's method applies to both univariate and multivariate small roots in RSA. The approach constructs appropriate lattices for the polynomial equations, uses LLL to find small independent polynomials, and solves for the roots to recover hidden messages.

How to construct and reduce lattices for breaking knapsack ciphers and NTRU?

Breaking knapsack ciphers and NTRU involves constructing a lattice that encodes the subset sum or polynomial relationship, applying LLL or BKZ reduction to find short vectors, and interpreting the reduced basis to identify the secret key or message.

When should I use LLL versus BKZ for lattice reduction in cryptanalysis?

Use LLL for faster, approximate reductions when the lattice dimension is moderate and the target vector is sufficiently short. Apply BKZ when higher precision is needed for larger dimensions, as it provides stronger reductions by processing blocks of vectors.