Post
Topic
Board Development & Technical Discussion
Merits 6 from 2 users
Re: lattice-attack || how to run without error
by
ETFbitcoin
on 16/04/2022, 12:22:41 UTC
⭐ Merited by Welsh (3) ,pooya87 (3)

Some problems with install fpylll

Developer using Ubuntu >= 20.04
So try on Ubuntu 20.04

pip install git+https://github.com/bitlogik/lattice-attack
pip install git+https://github.com/fplll/fpylll.git

All command try installs not successful both on os windows and Linux

using conda not successful too
conda install -c conda-forge fpylll

all methods include update apt too

sudo add-apt-repository universe
sudo apt update
sudo apt install python3-fpylll

pip install Cython

all fail


There might be problem with your Ubuntu 20.04 or library's setup.py. I tried it on Debian 11 (inside VM) and could run the library without any problem.

Code:
git clone https://github.com/bitlogik/lattice-attack
cd lattice-attack/
sudo apt install python3-cryptography python3-fpylll
python3 gen_data.py # generate example data
python3 lattice_attack.py -f data.json # perform attack with example data

This is the output.

Code:
----- Lattice ECDSA Attack -----
Loading data from file data.json
Running with 6 bits of k (LSB)
Starting recovery attack (curve SECP256K1)
Constructing matrix
Solving matrix ...
LLL reduction
Key found \o/
0xb75d59be7755c7af999687b769aeac541422ace964eb92d00f1c9a8017b1b7f9