Finding k nonce using Kangaroo method

3 replies 60 views
0x4tl4sNewbie
Posts: 12 · Reputation: 20
#1Mar 6, 2022, 06:47 AM
Hey everyone, I need some help with the kangaroo algorithm. What jumps should I set in the code to locate k nonce? I know k nonce is between n-2^40 and n-1, but the jump settings are confusing me.
4 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#2Mar 6, 2022, 11:03 AM
You should definitely add 02 or 03 to r. This way, you’ll get the public key and the k nonce from the kangaroo pubkey. Just follow that approach.
2 Reply Quote Share
0x4tl4sNewbie
Posts: 12 · Reputation: 20
#3Mar 6, 2022, 03:17 PM
Could you explain that a bit more? I have my public key, but I’m trying to retrieve k nonce using signatures rather than digging out the private key. Can you break it down for a newbie? Here’s the code I’m currently using: import os import time import gmpy2 from coincurve import PublicKey from multiprocessing import Pool, cpu_count import random import signal from datetime import datetime # Parameters of the secp256k1 curve n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 # Files input_file = "rsz_8.txt" output_file = "k_8.txt" # Global flag for exe
1 Reply Quote Share
m1kes4tFull Member
Posts: 167 · Reputation: 252
#4Mar 6, 2022, 09:10 PM
You can use BSGS or the Kangaroo algorithm for this. Keyhunt (BSGS) is a solid option to find those coordinates at the same time. Honestly, a 40-bit range is pretty small. You could probably wrap this up in under a second.
4 Reply Quote Share

Related topics