lattice-crypto-attacks

Apply lattice-based attacks to recover cryptographic secrets from RSA, DSA/ECDSA, knapsack, and NTRU constructions.

1.6k|204|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/yaklang/hack-skills --skill lattice-crypto-attacks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lattice-crypto-attacks
Source: https://github.com/yaklang/hack-skills/tree/main/skills/lattice-crypto-attacks
Command: npx skills add https://github.com/yaklang/hack-skills --skill lattice-crypto-attacks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides advanced lattice-based cryptanalysis techniques to extract secrets from flawed cryptographic constructions and protocols.

Core Features & Use Cases

  • LLL/BKZ reductions to recover short vectors in lattice-based problems.
  • Coppersmith methods for small roots and partial key exposure (univariate, multivariate).
  • HNP (Hidden Number Problem) applications to nonce bias in DSA/ECDSA.
  • Knapsack and NTRU lattice attacks (CJLOSS, etc.).
  • Practical guidance for embedding CVP into SVP via Kannan's embedding.

Quick Start

Identify a lattice-attack scenario in your target cryptosystem and apply the appropriate reduction (LLL/BKZ) to recover a short vector or hidden 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 recover RSA private keys using Coppersmith methods for small roots?

You can solve the Hidden Number Problem by applying LLL or BKZ lattice reductions to biased nonce data from DSA/ECDSA signatures, recovering the secret key from short vectors in the constructed lattice.

What's the best way to solve the Hidden Number Problem for ECDSA nonce bias?

To apply lattice attacks, identify your cryptosystem's vulnerable parameters, construct a reduction lattice, and apply LLL/BKZ reductions to recover short vectors or hidden parameters.

Do I need SageMath or fpylll to perform lattice reduction attacks?

Yes, you need compatible math libraries like SageMath or fpylll to construct reduction lattices and execute LLL/BKZ reductions for recovering hidden cryptographic parameters.

How does Kannan's embedding help convert CVP to SVP in lattice attacks?

Kannan's embedding converts the Closest Vector Problem into the Shortest Vector Problem by embedding the target vector into the lattice, allowing LLL/BKZ reductions to solve CVP indirectly.

Can lattice attacks break knapsack and NTRU cryptographic constructions?

Yes, lattice attacks break knapsack and NTRU constructions by applying CJLOSS and similar lattice reduction techniques to recover short vectors representing the secret key.