Finding K Nonce More Efficiently

17 replies 811 views
dan2015Hero Member
Posts: 41 · Reputation: 3344
#1Aug 10, 2020, 12:53 PM
Hey folks, been trying to calculate K nonce using a method from ecdsa123. Took me 6 weeks but finally got the right 256-bit K. Is there any quicker way to figure this out? Like, can we calculate it directly from given values?
6 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#2Aug 10, 2020, 06:03 PM
Check this out, it talks about nonce.
8 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#3Aug 10, 2020, 08:27 PM
6 weeks? That's impressively fast! Did you use actual data from a BTC transaction?
4 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#4Aug 11, 2020, 01:08 AM
What results did you get for the 256-bit nonce?
6 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#5Aug 11, 2020, 02:14 AM
You might wanna break down the code, add in the formulas for r, s, z, and then throw it at OpenAI. It helped me find quicker solutions in my case.
12 Reply Quote Share
dan2015Hero Member
Posts: 41 · Reputation: 3344
#6Aug 11, 2020, 02:35 AM
Oh wow.
10 Reply Quote Share
dan2015Hero Member
Posts: 41 · Reputation: 3344
#7Aug 11, 2020, 05:59 AM
Yeah, I tried that too but it led me down a rabbit hole. Wasted two days on calculations that were totally off.
7 Reply Quote Share
dan2015Hero Member
Posts: 41 · Reputation: 3344
#8Aug 11, 2020, 11:00 AM
Yep, the results I got came from a wallet that had been dormant for 8 years.
7 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#9Aug 11, 2020, 12:32 PM
Hey dude, check your DMs.
4 Reply Quote Share
alex777Full Member
Posts: 13 · Reputation: 513
#10Aug 11, 2020, 04:24 PM
Running this on a GPU will definitely speed things up. I could whip up a CUDA program for it.
11 Reply Quote Share
dan2015Hero Member
Posts: 41 · Reputation: 3344
#11Aug 11, 2020, 07:39 PM
Nice, thanks! But still, 6 weeks feels like a lot. I just got lucky with my timing.
8 Reply Quote Share
dan2015Hero Member
Posts: 41 · Reputation: 3344
#12Aug 13, 2020, 07:06 PM
Right now, I'm using an i9 processor alongside a Nvidia 3090 GPU.
5 Reply Quote Share
dan2015Hero Member
Posts: 41 · Reputation: 3344
#13Aug 13, 2020, 08:51 PM
If you need the full code I used in SageMath, let me know.
5 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#14Aug 15, 2020, 09:56 PM
Thanks a ton for sharing your code, really appreciate it!
14 Reply Quote Share
wolf_2020Member
Posts: 9 · Reputation: 229
#15Aug 16, 2020, 02:34 AM
@COBRAS @krashfire Can you provide an example of rsz if your code is accurate? Like, r=0x, s=0x, z=0x. And if two signatures match, how long should it take to find K nonce?
13 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#16Aug 16, 2020, 07:05 AM
Edit: ran into an error with public_key1. This is what I’ve got: public_key1 (372314...: 967636...: 1) pub1_x= 0x52503c... public_key2 (847735...: 215042....
9 Reply Quote Share
alex777Full Member
Posts: 13 · Reputation: 513
#17Aug 16, 2020, 11:20 AM
@krashfire took 6 weeks, which seems kind of lucky. You should check out his previous posts for rsz info.
8 Reply Quote Share
Posts: 3546 · Reputation: 35
#18Aug 16, 2020, 04:28 PM
Can you explain the logic behind using a GPU? This could cut it down to a few days. Happy to discuss in DMs.
9 Reply Quote Share

Related topics