Bitcoin Forum
May 03, 2024, 05:51:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Using Kangaroo for WIF solving  (Read 1173 times)
PawGo (OP)
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
February 10, 2021, 07:37:43 AM
 #21

i have a question, does this work with missing chars at the end of the wif, really want to know, stuck on reading here past 2 days.
 Embarrassed

No, in fact currently it works good only for missing beginning (first 19-20 characters).
But this is when we talk about WIFs.

When we talk about pure private key solving, it works well. Which means you my try puzzle #120 with a custom stride if you do not want to wait to long and believe in yours luck Wink
1714758701
Hero Member
*
Offline Offline

Posts: 1714758701

View Profile Personal Message (Offline)

Ignore
1714758701
Reply with quote  #2

1714758701
Report to moderator
1714758701
Hero Member
*
Offline Offline

Posts: 1714758701

View Profile Personal Message (Offline)

Ignore
1714758701
Reply with quote  #2

1714758701
Report to moderator
1714758701
Hero Member
*
Offline Offline

Posts: 1714758701

View Profile Personal Message (Offline)

Ignore
1714758701
Reply with quote  #2

1714758701
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714758701
Hero Member
*
Offline Offline

Posts: 1714758701

View Profile Personal Message (Offline)

Ignore
1714758701
Reply with quote  #2

1714758701
Report to moderator
1714758701
Hero Member
*
Offline Offline

Posts: 1714758701

View Profile Personal Message (Offline)

Ignore
1714758701
Reply with quote  #2

1714758701
Report to moderator
dextronomous
Full Member
***
Offline Offline

Activity: 428
Merit: 105


View Profile
August 23, 2022, 03:04:35 PM
 #22

Hi there PawGo,

could you provide the settings for the program for the 120th with the stride and all.
thanks man.
BHWallet
Newbie
*
Offline Offline

Activity: 62
Merit: 0


View Profile
September 02, 2022, 04:35:56 PM
 #23

Just a lazy solution:
Code:
import java.math.BigInteger;

public class K {
    public static void main(String[] args) {
        BigInteger start = new BigInteger("0552e025571c01bcd9eda59365a2fb3ae0bd7547dfeeeb13d971d848bcbf0467", 16);
        BigInteger stride = BigInteger.valueOf(58L).pow(32);//depends on the position of most-right unknown character
        BigInteger range = BigInteger.valueOf(58L).pow(5);//5=number of unknown characters
        BigInteger end = start.add(range);
        System.out.println("START: "+start.toString(16));
        System.out.println("END: "+end.toString(16));
        System.out.println("STRIDE: "+stride.toString(16));
    }
}

Going back to this version of Kangaroo: I think there is still something wrong with calculations with checksum - for longer ranges (>6 unknown characters) it does not return result, while when there is case without checksum (just a stride) it works good.

how do i run this java.
i have a question, does this work with missing chars at the end of the wif, really want to know, stuck on reading here past 2 days.
 Embarrassed
He has a java one that will work pretty well and fast for 7-8 characters missing off the end. For the method in this topic, it won't do any good because your stride will be "1"...meaning check every key, in order.

Here is a python script I threw together real quick if you are more familiar with it:

Code:
#First, enter the start range as start = "starting range like example below"
start       =  "552e025571c01bcda0297c22731d74becbd2cc13a750046ca49b5e9006a2c72" # <<<<------ enter starting range in hex
startrange  =  int(start, 16) #leave alone

#This determines the range that determines the start and end range; depends on the number of unknown characters; enter that number in ukchar = int(x)
ukchar      =  int(5) # <<<<------ enter the number of unknown characters
addtostart  =  int(pow(58, ukchar))
endrange    =  hex(startrange + addtostart).rstrip("L").lstrip("0x")

#This determines the stride which is based on the position of the most right unknown character; enter that number in mostright = int(x)
mostright   =  int(32)  # <<<<------ enter the position of the most right unknown character
stride      =  int(pow(58, mostright))

#This prints out starting range, ending range, and stride; leave alone
print ("Starting range: " + hex(startrange).rstrip("L").lstrip("0x"))
print ("Ending range  : " + endrange)
print ("Stride        : " + hex(stride).rstrip("L").lstrip("0x"))


What exactly are we doing with this tool?

I am using WP's python script with PawGo's Kangaroo to get the range & stride and it's all working as it supposed to, but I don't understand this tool at all tbh

How can I begin solving #120 for example by using it's public key and some random WIF within the range? I don't get it
MikeJ_NpC
Member
**
Offline Offline

Activity: 107
Merit: 10

if you want to lie *cough*use your data; not mine.


View Profile
November 01, 2022, 10:47:28 AM
 #24

lame question .... how do you convert the WIF  lol..  i get all the rest after that

nvm just wif base58 to hex..  Cheesy

If Karma is a bitch, then god is a woman. I ask to know, not to be screwed or hear trite excuses (after the fact) which a 3rd grader could do better on. If you give your word, keep it atleast..
MikeJ_NpC
Member
**
Offline Offline

Activity: 107
Merit: 10

if you want to lie *cough*use your data; not mine.


View Profile
November 01, 2022, 02:38:22 PM
 #25

do you need the public key for this to work? what if you dont have that data?

If Karma is a bitch, then god is a woman. I ask to know, not to be screwed or hear trite excuses (after the fact) which a 3rd grader could do better on. If you give your word, keep it atleast..
PawGo (OP)
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
November 01, 2022, 02:42:09 PM
 #26

Yes, public key is required for Kangaroo method (the same like is for BSGS).


could you provide the settings for the program for the 120th with the stride and all.

No magic there, just a normal configuration:
Code:
800000000000000000000000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
02CEB6CBBCDBDF5EF7150682150F4CE2C6F4807B349827DCDBDD1F2EFA885A2630

if You want to use stride just divide the range, for example if you want to test using -stride  2 the range will be:
Code:
800000000000000000000000000000
BFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
MikeJ_NpC
Member
**
Offline Offline

Activity: 107
Merit: 10

if you want to lie *cough*use your data; not mine.


View Profile
November 01, 2022, 07:13:19 PM
 #27

Yes, public key is required for Kangaroo method (the same like is for BSGS).


could you provide the settings for the program for the 120th with the stride and all.

No magic there, just a normal configuration:
Code:
800000000000000000000000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
02CEB6CBBCDBDF5EF7150682150F4CE2C6F4807B349827DCDBDD1F2EFA885A2630

if You want to use stride just divide the range, for example if you want to test using -stride  2 the range will be:
Code:
800000000000000000000000000000
BFFFFFFFFFFFFFFFFFFFFFFFFFFFFF


Well i had no output on mine.. so that poses a problem ... argh
only h160

If Karma is a bitch, then god is a woman. I ask to know, not to be screwed or hear trite excuses (after the fact) which a 3rd grader could do better on. If you give your word, keep it atleast..
btc-room101
Member
**
Offline Offline

Activity: 182
Merit: 30


View Profile WWW
November 12, 2022, 02:01:21 PM
 #28

Hello

I would like to share with you my modifications of Jean-Luc's famous Kangaroo program. I adapted it to be used as a 'WIF solver'.
In general, there are 2 cases - where stride is large enough not to collide with WIF checksum or when it is more complicated and stride collides.
I described it and showed test examples on github:
https://github.com/PawelGorny/Kangaroo
but I will also rewrite it here.

Let's take WIF: 5HrdZxkxnVst8Q3qCLJkeiLe1k4AmSDaAhqQVUYVxVSBkf5VfUu which encodes the private key 0552e025571c01bcda0297c22731d74becbd30d07e4ec355c741825fffc0a672.
Decoded WIF shows checksum 524412ca
The corresponding public key is 04777c026b8085951da7117395bf269c055f36bf2ddf623281962855edee36d4e73bec2fa87b122 a0f1b2841ef4f7afdec2443f89c151ee2597feac18ae0d62bdf

  • Search without checksum (large stride)
Let's take WIF 5HrdZxkxnVst8Q_____keiLe1k4AmSDaAhqQVUYVxVSBkf5VfUu
Now, we may find the first WIF to be tested, it will be 5HrdZxkxnVst8Q11111keiLe1k4AmSDaAhqQVUYVxVSBkf5VfUu. When we decode it, we find the private key which is the beginning of our range: 0552e025571c01bcd9eda59365a2fb3ae0bd7547dfeeeb13d971d848bcbf0467
Now, we must calculate the number of WIFs in our range. Beause we have 5 missing characters, it will be 58^5 = 656356768 (271f35a0 hex)
To have the end of range for Kangaroo, we must calculate fake end which is start + range
Code:
new BigInteger("0552e025571c01bcd9eda59365a2fb3ae0bd7547dfeeeb13d971d848bcbf0467",16).add(new BigInteger("656356768",10)).toString(16) =
552e025571c01bcd9eda59365a2fb3ae0bd7547dfeeeb13d971d848e3de3a07
We check where is the most right unknown character - it's position will tell us what is the stride. In our case it is 58^32 = af820335d9b3d9cf58b911d87035677fb7f528100000000
Because WIFs encodes checksum, we must observe if stride collides with checksum. Fortunately - not, because the last 8 characters (length of checksum) are 0s. We may remove these zeros and get shorter stride.
The final configuration file is:
Code:
552e025571c01bcd9eda59365a2fb3ae0bd7547dfeeeb13d971d848bcbf0467
552e025571c01bcd9eda59365a2fb3ae0bd7547dfeeeb13d971d848e3de3a07
04777c026b8085951da7117395bf269c055f36bf2ddf623281962855edee36d4e73bec2fa87b122a0f1b2841ef4f7afdec2443f89c151ee2597feac18ae0d62bdf
and test:
Code:
$ ./kangaroo -stride af820335d9b3d9cf58b911d87035677fb7f5281 test_af820335d9b3d9cf58b911d87035677fb7f5281.txt
Kangaroo v2.2
Start:552E025571C01BCD9EDA59365A2FB3AE0BD7547DFEEEB13D971D848BCBF0467
Stop :552E025571C01BCD9EDA59365A2FB3AE0BD7547DFEEEB13D971D848E3DE3A07
Keys :1
Stride:
MaxRange: 271F35A0
Jump: AF820335D9B3D9CF58B911D87035677FB7F5281
Number of CPU thread: 2
Range width: 2^30
Jump Avg distance: 2^15.04
Number of kangaroos: 2^11.00
Suggested DP: 1
Expected operations: 2^16.11
Expected RAM: 13.3MB
DP size: 1 [0x8000000000000000]
SolveKeyCPU Thread 1: 1024 kangaroos
SolveKeyCPU Thread 0: 1024 kangaroos

 verify PK 552E025571C01BCD9EDA59365A2FB3AE0BD7547DFEEEB13D971D848BEA7DAF2
Key# 0 [2N]Pub:  0x03777C026B8085951DA7117395BF269C055F36BF2DDF623281962855EDEE36D4E7
       Priv: 0x552E025571C01BCD9EDA59365A2FB3AE0BD7547DFEEEB13D971D848BEA7DAF2
   RealPriv: 0x552E025571C01BCDA0297C22731D74BECBD30D07E4EC355C741825FFFC0A672


  • Search with checksum (small stride)
Let's take WIF 5HrdZxkxnVst8Q3qCLJkeiLe1k4Am____hqQVUYVxVSBkf5VfUu
Now, we may find the first WIF to be tested, it will be 5HrdZxkxnVst8Q3qCLJkeiLe1k4Am1111hqQVUYVxVSBkf5VfUu. When we decode it, we find the private key which is the beginning of our range: 0552e025571c01bcda0297c22731d74becbd30cfb218f04dc91299473f61ffde
Now, we must calculate the number of WIFs in our range. Beause we have 4 missing characters, it will be 58^4 = 11316496
To have the end of range for Kangaroo, we must calculate fake end which is start + range
Code:
new BigInteger("0552e025571c01bcda0297c22731d74becbd30cfb218f04dc91299473f61ffde",16).add(new BigInteger("11316496",10)).toString(16) =
552e025571c01bcda0297c22731d74becbd30cfb218f04dc9129947400eacee
We check where is the most right unknown character - it's position will tell us what is the stride. In our case it is 58^18 = 2b85840fc1d6a480ae7fa240000
Unfortunately the stride collides with checksum (last 8 characters are not 0s). It means that for our calculations we must take into account the proper checksum And this is difficult part, because the real checksum is unknown. In our test it is known, but in real-life it could be needed to see how many possibilities there are. For example, in this case, playing with missing characters of WIF we may observe that last 4 characters of checksum are fixed. The first 4 could be changed, BUT the 4th character gets only 4 values. It means that if we want to use this method for real-life problem, we may need to do calculations for 16*16*16*4 checksums (in fact will less operations needed, because many checksums will generate the same private key in addition to the stride).
Because stride collides with checksum, we will have to use the full (long) value and pass checksum as a parameter.
The final configuration file is:
Code:
552e025571c01bcda0297c22731d74becbd30cfb218f04dc91299473f61ffde
552e025571c01bcda0297c22731d74becbd30cfb218f04dc9129947400eacee
04777c026b8085951da7117395bf269c055f36bf2ddf623281962855edee36d4e73bec2fa87b122a0f1b2841ef4f7afdec2443f89c151ee2597feac18ae0d62bdf
and test:
Code:
$ ./kangaroo -stride 2b85840fc1d6a480ae7fa240000 -checksum 524412ca test_2b85840fc1d6a480ae7fa240000_524412ca.txt
Kangaroo v2.2
Start:552E025571C01BCDA0297C22731D74BECBD30CFB218F04DC91299473F61FFDE
Stop :552E025571C01BCDA0297C22731D74BECBD30CFB218F04DC9129947400EACEE
Keys :1
Stride:
MaxRange: ACAD10
Jump: 2B85840FC1D6A480AE7FA240000
checksum:
Number of CPU thread: 2
Range width: 2^24
Jump Avg distance: 2^11.97
Number of kangaroos: 2^11.00
Suggested DP: 0
Expected operations: 2^13.25
Expected RAM: 12.4MB
DP size: 0 [0x0]
SolveKeyCPU Thread 1: 1024 kangaroos
SolveKeyCPU Thread 0: 1024 kangaroos

 verify PK 552E025571C01BCDA0297C22731D74BECBD30CFB218F04DC91299473FAD12F9
Key# 0 [2N]Pub:  0x03777C026B8085951DA7117395BF269C055F36BF2DDF623281962855EDEE36D4E7
       Priv: 0x552E025571C01BCDA0297C22731D74BECBD30CFB218F04DC91299473FAD12F9
   RealPriv: 0x552E025571C01BCDA0297C22731D74BECBD30D07E4EC355C741825FFFC0A672




It has no mean to solve 2**11, or even 2**40 puzzles so what?

BTC is 2*256, and you need to do 2**128 to crack real world btc

if you can do 2**40, and have a means to do 2**40  on the ball park then that puts you in the game of find a hit that year

The problem with the kangaroo BULLSHIT is that real world there are no problem in the 2*20 domain

There are two ways to crack BTC

1.) use large bloom filter and find key/address pairs with value, and have search space that is doing 2**40 compares per second

2.) use advanced crypto methods to crack ecdlp256 using known back doors ( this is huge problem in prime number theory, but there tools out there )
yiren38
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
January 17, 2023, 02:40:23 PM
 #29

For these examples - result is instant.
I have made test with 10 missing characters (CPU only, on my dev machine I do not have GPU).

Code:
5HrdZxkxn__________keiLe1k4AmSDaAhqQVUYVxVSBkf5VfUu
5HrdZxkxn1111111111keiLe1k4AmSDaAhqQVUYVxVSBkf5VfUu
0552e02556fb5aeb9aedc2ea64efec8ac200eb71a9653cfaad25d4c2a5b4d5c7

Range: BigInteger.valueOf(58L).pow(10).toString(16) =
 5fa8624c7fba400

Fake end: new BigInteger("0552e02556fb5aeb9aedc2ea64efec8ac200eb71a9653cfaad25d4c2a5b4d5c7",16).add(new BigInteger("5fa8624c7fba400",16)).toString(16) =
552e02556fb5aeb9aedc2ea64efec8ac200eb71a9653cfab3205ae76db079c7

Config file:
Code:
0552e02556fb5aeb9aedc2ea64efec8ac200eb71a9653cfaad25d4c2a5b4d5c7
552e02556fb5aeb9aedc2ea64efec8ac200eb71a9653cfab3205ae76db079c7
04777c026b8085951da7117395bf269c055f36bf2ddf623281962855edee36d4e73bec2fa87b122a0f1b2841ef4f7afdec2443f89c151ee2597feac18ae0d62bdf

Test:
Code:
$ ./kangaroo -stride af820335d9b3d9cf58b911d87035677fb7f5281 testBig.txt
Kangaroo v2.2
Start:552E02556FB5AEB9AEDC2EA64EFEC8AC200EB71A9653CFAAD25D4C2A5B4D5C7
Stop :552E02556FB5AEB9AEDC2EA64EFEC8AC200EB71A9653CFAB3205AE76DB079C7
Keys :1
Stride:
MaxRange: 5FA8624C7FBA400
Jump: AF820335D9B3D9CF58B911D87035677FB7F5281
Number of CPU thread: 2
Range width: 2^59
Jump Avg distance: 2^28.96
Number of kangaroos: 2^11.00
Suggested DP: 15
Expected operations: 2^30.59
Expected RAM: 13.9MB
DP size: 15 [0xfffe000000000000]
SolveKeyCPU Thread 1: 1024 kangaroos
SolveKeyCPU Thread 0: 1024 kangaroos
[3.28 MK/s][GPU 0.00 MK/s][Count 2^30.87][Dead 0][10:49 (Avg 08:13)][3.8/12.4MB]
 verify PK 552E02556FB5AEB9AEDC2EA64EFEC8AC200EB71A9653CFAB01FDAB8EEA94AF2
Key# 0 [2N]Pub:  0x03777C026B8085951DA7117395BF269C055F36BF2DDF623281962855EDEE36D4E7
       Priv: 0x552E02556FB5AEB9AEDC2EA64EFEC8AC200EB71A9653CFAB01FDAB8EEA94AF2
   RealPriv: 0x552E025571C01BCDA0297C22731D74BECBD30D07E4EC355C741825FFFC0A672

Done: Total time 10:49

Not bad, no?  Wink 10 missing WIF characters - Less than 11 minutes on old CPU. GPU performance - to be seen.
Your program cannot work on private keys starting with K
Below is an example:
12TjDr6EvjfCCixWxWD7W8fjMiP8ywXQZf
02C6459FFBD29C235EC71D64C3386B203F8AF1C29A368A08378CDF57002C000556
703626BB241407C588CA826F2A5E3E8CFCD3CD912C63B2BBAFF4D323AEC25E62
KzyqQdyZmVcDmqb4atHfBQiBjR8op2mEQdM4xCHNwDsbwupBtR6P
============================================================================
Kz1111111111mqb4atHfBQiBjR8op2mEQdM4xCHNwDsbwupBtR6P
52F941347554093DF22FE246922EEB03F0494A73B23287E4AC9013D44CCC24D8
============================================================================
configuration-file.txt:
52F941347554093DF22FE246922EEB03F0494A73B23287E4AC9013D44CCC24D8
52F941347554093DF22FE246922EEB03F0494A73B23287E4B28A99F914C7C8D8
02C6459FFBD29C235EC71D64C3386B203F8AF1C29A368A08378CDF57002C000556
============================================================================
Kangaroo.exe -gpu -o key.txt -stride 4FD9DF9DBF7E28ED5357BA4A062C19C48E628F6AF73B06121 configuration-file.txt
unable to find KzyqQdyZmVcDmqb4atHfBQiBjR8op2mEQdM4xCHNwDsbwupBtR6P
What did i do wrong?
PawGo (OP)
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
January 17, 2023, 03:29:36 PM
 #30

Your program cannot work on private keys starting with K
Below is an example:
12TjDr6EvjfCCixWxWD7W8fjMiP8ywXQZf
02C6459FFBD29C235EC71D64C3386B203F8AF1C29A368A08378CDF57002C000556
703626BB241407C588CA826F2A5E3E8CFCD3CD912C63B2BBAFF4D323AEC25E62
KzyqQdyZmVcDmqb4atHfBQiBjR8op2mEQdM4xCHNwDsbwupBtR6P
============================================================================
Kz1111111111mqb4atHfBQiBjR8op2mEQdM4xCHNwDsbwupBtR6P
52F941347554093DF22FE246922EEB03F0494A73B23287E4AC9013D44CCC24D8
============================================================================
configuration-file.txt:
52F941347554093DF22FE246922EEB03F0494A73B23287E4AC9013D44CCC24D8
52F941347554093DF22FE246922EEB03F0494A73B23287E4B28A99F914C7C8D8
02C6459FFBD29C235EC71D64C3386B203F8AF1C29A368A08378CDF57002C000556
============================================================================
Kangaroo.exe -gpu -o key.txt -stride 4FD9DF9DBF7E28ED5357BA4A062C19C48E628F6AF73B06121 configuration-file.txt
unable to find KzyqQdyZmVcDmqb4atHfBQiBjR8op2mEQdM4xCHNwDsbwupBtR6P
What did i do wrong?

Your configuration is correct.
I do not know... on my computer it works (but I did not use GPU mode). Maybe that's the problem? I will try to find some time and test it again.
How long did you wait?




Minase
Member
**
Offline Offline

Activity: 71
Merit: 43


View Profile
January 17, 2023, 04:03:59 PM
 #31

tested this on gpu and it works.
indeed you need to wait longer but it works.
make sure your grid size is correct, the search space is small.
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
April 10, 2023, 12:34:05 PM
Last edit: April 10, 2023, 12:58:17 PM by digaran
 #32

Hey man I'm back again, as I explained earlier I can't use GPU, because CUDA is not compiled or something, I have a ccap 5 and CUDA 12, but I tried to compile your WIFsolver CUDA few month ago and was unsuccessful. I can't keep coming to you everytime I need compiling, it's not your job but it would mean a lot if it's not a bother to release a compatible version for ccap 5.🤝👍

Lol my cute kangaroos are dying using CPU, I haven't fed them properly with strong GPU computation.😉



You know I was thinking today about something interesting, since you know programming I will share it here to see if we could come up with something.
You know that hexadecimal characters are used to set colors on the web, right? I was wondering if it would be possible to develop a tool capable of linking the hexadecimal values of public keys to their actual private keys by color encoding them in synchronization, so for example we could invent an algorithm to find similarities and match them with certain colors, then we could find clues about the private key of a certain public key by encoding the public key using our invention.

Imagine integrating that algo with kangaroo or baby step giant step, and then use strides to detect color hues  similar to our public/ private key pair.

But I guess that would destroy modern cryptography systems if it was possible.😅

🖤😏
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!