Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I write the data to the "data.json" file correctly? #3

Closed
demining opened this issue Sep 14, 2021 · 3 comments
Closed

How do I write the data to the "data.json" file correctly? #3

demining opened this issue Sep 14, 2021 · 3 comments

Comments

@demining
Copy link

demining commented Sep 14, 2021

I want to understand and learn how can I correctly write data to file "data.json"?

How do I write the data to the "data.json" file correctly?

@bitlogik
Copy link
Owner

Is Z is the secret ephemeral internal nonce of the ECDSA ?

The JSON format is documented in the README, and in the Python master file. You can also see the example provided, which build a JSON data file from an external different format.

The JSON format is the following :
{
"curve": "SECP256K1",
"public_key": [pubx, puby],
"message": [a,b,c,...], // In case same message for all signatures
"known_type": "LSB"/"MSB",
"known_bits": n_bits,,
"signatures": [ {"r": intR, "s": intS, "kp": leakednoncepart }, {...}, ... ]
}

All data are provided as integers : r, s, kp, pubx, puby, n_bits, ...
The public key needs to be decompressed to x,y.

The message can be provided as a unique message (will be hashed) for all the signatures, as a byte array format. Or as a hash (already hashed) for each signatures with {"hash": hashValue, "r": intR, "s": intS, "kp": leakednoncepart } for each signature.
hashValue is the integer from the hash.

Note that if you know a single signature with a full nonce, the Lattice ECDSA Attack software is not designed for that. In this case, all you have to do is to compute d = ( s.k - H ) . r^-1 (r,s) is the signature duet, k the secret nonce, H the hash, and you get the private key. See more details here.

This software is designed to recover the private key from a hundreds of signatures when only the partial nonce is known (first bits, or last bits).

@Vladimir855
Copy link

не проще просто поставить Хэш Txт 67016bf36253008807a7ef6b9f7abbb6bdf8213343cac259689790f2e18eb13f
чтоб скрипт сам разбирал транзакцию

@bitlogik
Copy link
Owner

bitlogik commented Oct 5, 2021

Which method are you using to install fpylll ? We recommend to install it using aptitude, or any distribution package manager.
As stated in the README :
apt install python3-fpylll
We recommend that you install fpylll with the distribution package manager. Else this requires lots of compilation tools and Python low level libraries. The package managers, such as apt or dnf, are providing all these, with pre-compiled binaries.

Any other way to install fpylll, especially manually from source, is so painful and hard that we don't recommend doing so. Using the package manager such as apt is so much reliable as it provides binaries and configuration.

@bitlogik bitlogik closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants