lattice-crypto-attacks

Solve cryptographic problems using LLL/BKZ reduction, Coppersmith's method, and Hidden Number Problem.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/bingook/bingo --skill lattice-crypto-attacks-bingook
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lattice-crypto-attacks
Source: https://github.com/bingook/bingo/tree/main/bingo/skills/hack-skills/lattice-crypto-attacks
Command: npx skills add https://github.com/bingook/bingo --skill lattice-crypto-attacks-bingook

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive lattice-based cryptanalysis playbook for expert users, enabling attacks on RSA, DSA/ECDSA, knapsack ciphers, LCGs, and NTRU cryptosystems.

Core Features & Use Cases

  • RSA Attack Techniques: Utilizes Coppersmith's method and Boneh-Durfee attack for small roots and d.
  • DSA/ECDSA Nonce Recovery: Solves the Hidden Number Problem for nonce recovery from bias.
  • Knapsack Attacks: Applies low-density lattice attacks on knapsack ciphers.
  • LCG Analysis: Solves CVP on recurrence lattices for LCG truncated output.
  • NTRU Key Recovery: Reduces NTRU lattices for key recovery.
  • Use Case: For a CTF challenge involving RSA decryption, this Skill can be used to apply Coppersmith's method to recover the private key.

Quick Start

To apply lattice-based cryptanalysis, load the 'lattice-crypto-attacks' skill and use the provided techniques to solve the given cryptographic problem.

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 RSA private key using Coppersmith's method for small roots?▼

RSA private key recovery uses Coppersmith's method to find small roots of polynomials derived from the RSA modulus and public exponent. This Skill applies LLL or BKZ lattice reduction to compute those small roots and recover the key.

Can I recover DSA or ECDSA nonces from biased signatures?▼

Yes, DSA/ECDSA nonce recovery from biased signatures is achieved by solving the Hidden Number Problem. This Skill constructs a lattice from the biased nonce values and uses lattice reduction to recover the secret signing key.

What is the best way to attack low-density knapsack ciphers?▼

Low-density knapsack ciphers are attacked by applying lattice reduction techniques to the underlying subset sum problem. This Skill builds a lattice from the public key weights and uses LLL reduction to find the plaintext bits.

How does lattice reduction solve truncated Linear Congruential Generator output?▼

Truncated Linear Congruential Generator output is solved by formulating a Closest Vector Problem on a recurrence lattice. This Skill constructs the lattice from consecutive truncated outputs and applies reduction to recover the full internal state.

Do I need prior knowledge of lattice theory to solve NTRU key recovery?▼

Yes, NTRU key recovery requires understanding of lattice theory and specific reduction algorithms. This Skill reduces the NTRU lattice constructed from public parameters to recover the private key, but expects expert-level cryptanalysis knowledge.

When should I use the Boneh-Durfee attack instead of Coppersmith's method for RSA?▼

The Boneh-Durfee attack is used for RSA when the private exponent d is small, whereas Coppersmith's method targets small message roots or partial key exposure. This Skill provides techniques for both scenarios to handle various RSA vulnerabilities.