Just a heads up, this is mostly for educational purposes. Always remember that the K nonce should be completely random. Don't use this script for signing actual messages.
So, we start by signing two different messages like this:
message 1 = "Hello, this forum"
message 2 = "Hello, this forum 2"
After we get the signatures and hashes, we can use them in a script to derive the private key.
Understanding Risks of Non-Random Nonce in Signature Generation
3 replies 293 views
Yeah, this whole issue comes from older software. Most modern versions have fixed these problems. Nowadays, the K nonce is generated using random.randint in the code, so it’s way safer.
People like to roll their own code, and we all make mistakes sometimes. A little reminder about security flaws can’t hurt, right?
Got it now... I was a bit confused why you brought up those old flaws. But yeah, you make a good point. Better safe than sorry.