Python code for Nonce k, k+1

3 replies 439 views
gw3i1337Full Member
Posts: 148 · Reputation: 495
#1May 31, 2024, 11:56 PM
Hey everyone. I was motivated by the table on Iceland's rsz and put together some Python code for scenarios involving k, k+1, ... k+m. I don’t have a private key example to test it against, so I’m reaching out for your help. If it works, I’ll share it on GitHub. It seems like there's no existing resource for this, so it could benefit us all. If anyone could take a look and share feedback, I'd really appreciate it!
8 Reply Quote Share
gw3i1337Full Member
Posts: 148 · Reputation: 495
#2Jun 3, 2024, 01:13 AM
Is there no one who can check this?
0 Reply Quote Share
alt_chadMember
Posts: 9 · Reputation: 105
#3Jun 3, 2024, 03:17 AM
Syntax Error: There is a syntax error in the last line of your code. The ^ operator is used for bitwise XOR in Python, but it seems you intended to use it for exponentiation. For exponentiation, you should use **. Incorrect usage of ^: Even after fixing the syntax error, using ^ for exponentiation won't work as intended. In Python, the correct operator for exponentiation is **. Missing division function: The division in the last line of your code should be a modular division, but it's currently missing. You'll need to implement a modular division function to ensure correctness. code: print(h(((S2 * m * R1 + Z1 * R2 - Z2 * R1) * modinv(S1 * R2 - S2 * R1, N)) % N))
1 Reply Quote Share
gw3i1337Full Member
Posts: 148 · Reputation: 495
#4Jun 3, 2024, 08:11 AM
Thank you very much, I will try again. With your permission, I would like to ask a question; I saw that you also wrote about lattice attack. How can I find known bits? Do you have any knowledge about this topic
3 Reply Quote Share

Related topics