Updated Lattice Attack Script Issues

6 replies 221 views
dan2015Hero Member
Posts: 14 · Reputation: 3344
#1Oct 28, 2020, 09:01 AM
Just tweaked the gen_data.py script. Now it displays the K_Nonce value along with R, S, Z(HASH) Signatures right in the terminal. Not in the json file tho, guess that’s something to fix later. You have to put your public keys XY coordinates in there too. Also updated ecdsa_lib.py to show K_Nonce.
5 Reply Quote Share
Posts: 4 · Reputation: 29
#2Oct 28, 2020, 02:07 PM
Hey, that's cool, but I’m having trouble. When I run lattice.py after generating the json file, I get an error about public key data being invalid. Is there a specific format for the XY coordinates? Where should I check to fix this?
1 Reply Quote Share
stacksatsHero Member
Posts: 168 · Reputation: 2023
#3Oct 28, 2020, 03:10 PM
KRASH here, can you add the private key calculation to the script? It should look like this: pvk = (inv(r) * ((k*s)-z)) % N.
1 Reply Quote Share
Posts: 4 · Reputation: 29
#4Oct 28, 2020, 03:57 PM
I tried adding that, but it's throwing an error. Is this the right spot in lattice_attack.py for those calculations? I'm getting a weird SyntaxError: cannot assign to expression. Any tips?
2 Reply Quote Share
Posts: 4 · Reputation: 29
#5Oct 30, 2020, 05:55 AM
Not sure where to put those definitions you mentioned. I think I’m close, but there's another error. Should I convert private_value to an integer? I saw that comment in lattice_attack.py about converting, but it doesn’t say where to use it. Anyone got this running?
0 Reply Quote Share
stacksatsHero Member
Posts: 168 · Reputation: 2023
#6Oct 31, 2020, 03:20 AM
krossfire knows coding, he can pull this off.
1 Reply Quote Share
dan2015Hero Member
Posts: 14 · Reputation: 3344
#7Nov 1, 2020, 10:17 PM
No point in running this. The RSZ generated won’t link to the correct private or public key. I tried it ages ago and it didn’t work.
0 Reply Quote Share

Related topics