So, why would you use Kangaroo to tackle Bitcoin puzzle number 66 and find the private key from the public key? It runs at 566.5MK/S and can give you a result in just 41 seconds.
Using the GPU: GPU #0 NVIDIA GeForce RTX 4060 Ti (34x0 cores) Grid(68x128) (92.0 MB in use).
The SolveKeyGPU Thread for GPU#0 is busy creating kangaroos...
SolveKeyGPU Thread GPU#0: 2^20.09 kangaroos [took 2.2s]
[566.51 MK/s][GPU 566.51 MK/s][Count 2^33.89][Dead 1][33s (Avg 22s)][0.9/1.2GB] MB]
Key# 0 [1S]Pub: 0x024EE2BE2D4E9F92D2F5A4A03058617DC45BEFE22938FEED5B7A6B7282DD74CBDD
Priv: 0x2832ED74F2B5E35EE
Finished: Total time 41s
Now, if you try VanitySearch to crack it directly, it runs at 2080Mk/s, but wait for it… it could take a whopping 1000 years to actually get results. Crazy, right? So this method's speed is definitely something to consider.
Random: Finding in ranges
Global start: 0000000000000000000000000000000000000000000000020000000000000000 (66 bit)
Global end: 000000000000000000000000000000000000000000000003FFFFFFFFFFFFFFFF (66 bit)
Global range: 000000000000000000000000000000000000000000000001FFFFFFFFFFFFFFFF (65 bit)
[00:00:08] [CPU+GPU: 2080,21 Mk/s] [GPU: 2080,21 Mk/s] [T: 16,898,850,816] [F: 0]
Why is Kangaroo slow yet gets results quicker?
6 replies 249 views
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#2Jul 8, 2019, 08:48 PM
To answer that simply:
"VanitySearch" is literally counting the provided range which is still a relatively large number.
And although minimal, the extra hashes and encoding of the public key pair of the candidate prvKey to match the address adds a few more work.
While "Kangaroo" is making use of ECDSA's weakness which is ECDLP, Bitcoin's secp256k1 isn't normally vulnerable to that but the puzzle's small private key ranges are.
In this case, it's following an algorithm and not blindly bruteforcing the range unlike VanitySeach.
hodler_omegaMember
Posts: 12 · Reputation: 156
#3Jul 9, 2019, 02:52 AM
I'll give you a better answer, my dear friend. At first, I had the same doubt, and back then, I pretended to understand the topic, but in reality, I couldn't explain the difference, for example. First, you need to know that these are two different things. VanitySearch uses normal brute force (it tests every combination until it finds the answer = cracks the private key). On the other hand, Kangaroo is an algorithm used to crack private keys when the corresponding public key is known. Kangaroo uses "mathematical techniques" to exploit this, instead of testing combination by combination.
Let me create an analogy: Imagine you're in a forest looking for a specific tree, but the size of this forest is very large, enormous, gigantic, and you have two strategies to find this tree:
-- You could choose to walk randomly through the forest, checking every tree you encounter until you find the specific one. This approach has no specific direction and relies heavily on luck to find the right tree. You could even be the fastest person in the world, but in such a vast forest, this could take years because you're trying all possibilities without an optimized plan (VanitySearch).
-- Now imagine you have a map of the forest with predefined trails that increase the chances of finding that tree. The "kangaroo" jumps between strategic points along these intelligent trails, significantly reducing the time needed to reach the desired tree. Even though each jump may be slower compared to VanitySearch, this optimized strategy allows you to find the specific tree much faster by taking advantage of the mathematical algorithm created by a super-intelligent guy named John M. Pollard (Pollard's Kangaroo)
Because Kangaroo is 'jumping' through points in the range in order to find a collision with jumps of one of the multiples of G.
A jump is really just a modular exponentiation.
Kangaroo is doing many of these jumps in parallel. That's why they are called 'kangaroos' sometimes. Tame kangaroos jump starting from multiples of G. Wild kangaroos jump starting from points in the range.
Once a collision between a tame and a wild is found, the two points are now equal, and we already know how much the tame jumped i.e. the coefficient k in k*G, so the private key is just k.
Much faster than going through a range of quadrillion numbers linearly and doing EC multiplication, SHA256, another SHA256 for the checksum, and RIPEMD160 for each one when you only have the address.
SwiftMinerSenior Member
Posts: 259 · Reputation: 1036
#5Jul 9, 2019, 08:43 AM
I think Kangaroo is more of a specialized algorithm designed for solving elliptic curves which is exactly what's actually needed to calculate a private key from a public key. In this case the Kangaroo algorithm is able to take advantage of parallel processing capabilities of NVIDIA GeForce RTX 4060 Ti GPU to achieve a speed of around 566.5 MK/s.
On the other hand using VanitySearch to directly crack the private key would actually be much faster in terms of raw speed at kinda around 2080 Mk/s. However like you noted it would take an estimated 1000 years or more to produce results and this is actually because VanitySearch is a brute-force approach that relies on randomly guessing the private key unlike Kangaroo that uses a uses an elliptic curve algorithm to efficiently search for the solution.
sam_vectorMember
Posts: 20 · Reputation: 150
#6Jul 9, 2019, 02:04 PM
Is there any kind of like youtube video for this? I am not sure how this is working
I mean what decides what will be the size of the jump and in which direction?
Generally, there is only one direction - continuously performing multiplication. You can't go backwards, since you can't 'divide' by a number. (Technically you can, but you'd have to do a modinv which will slow everything down.) So the kangaroo analogy kind of breaks down there. But anyways, you're constantly multiplying each of the tames and the wilds (points) by a number that is chosen by the developer of the program.
In this case, the jump sizes are random, so the size of each jump will be different each time.
Related topics
- Pollard's Kangaroo Pool for tackling the #130 Puzzle 11
- Bitcoin Core displaying coins (UTXOs) in a new tab 13
- Are you in favor of BIP-110? Let's get a Bitcoin poll going. 0
- Erlay seems to have some issues here’s a better proposal for a bitcoin protocol without invites 3
- New Optional Hourglass Implementation is Live 3
- Ways to earn some sats by contributing to bitcoin core development 5