lattice-crypto-attacks

Construct and reduce integer lattices to recover cryptographic secrets.

2|Updated May 15, 2026
One-click install
npx skills add https://github.com/lNwNl/Methodos --skill lattice-crypto-attacks-lnwnl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lattice-crypto-attacks
Source: https://github.com/lNwNl/Methodos/tree/main/docker/opencode/skills/lattice-crypto-attacks
Command: npx skills add https://github.com/lNwNl/Methodos --skill lattice-crypto-attacks-lnwnl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you mount lattice-based cryptanalytic attacks to recover hidden cryptographic values (such as RSA small roots/exponents, DSA/ECDSA biased nonce secrets, and knapsack/NTRU solutions) when algebraic methods alone are insufficient or mislead a model.

Core Features & Use Cases

  • LLL/BKZ reduction guidance: Choose the right lattice reduction strategy and parameters (e.g., start with LLL, escalate to BKZ with tuned block sizes) to obtain useful short vectors.
  • Coppersmith small-roots playbooks: Apply univariate and partial/exposure variants using correct bounds (X) and heuristic parameters (beta/epsilon) to recover RSA-related unknowns.
  • Hidden Number Problem (HNP) for nonce recovery: Build the CVP-style lattice from biased nonce signatures and solve it with reduction to recover DSA/ECDSA private keys.
  • Knapsack and NTRU lattice attacks: Use low-density lattice embedding for subset sum and construct NTRU lattices for short-key recovery via reduction.
  • Common pitfalls & decision tree: Diagnose failure modes like wrong scaling, incorrect beta, insufficient dimension, or too-large root bounds.

Quick Start

Ask your AI agent: "Given RSA parameters n and e plus a ciphertext c and the known MSB bits of the plaintext, use the lattice/Coppersmith method from lattice-crypto-attacks to recover the missing message bits, explaining the parameter choices and verification steps."

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 small roots method?

To recover DSA or ECDSA private keys, build a CVP-style lattice from biased nonce signatures and solve the Hidden Number Problem using LLL/BKZ reduction to extract the secret key.

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

Start with LLL reduction to obtain short vectors quickly, then escalate to BKZ with tuned block sizes when LLL yields insufficient dimension or fails to find the target vector.

Why does my lattice attack fail to recover the knapsack subset sum solution?

Knapsack lattice attacks fail when using incorrect scaling, too-large root bounds, or insufficient lattice dimension; diagnose these pitfalls via the decision tree to adjust density embedding and reduction parameters.

Can I use lattice cryptanalysis to recover NTRU keys from partial information?

Yes, NTRU key recovery constructs NTRU lattices for short-key recovery via reduction, applying LLL/BKZ to find short vectors and validating extracted solutions against the original cryptographic relations.