Author

Topic: keysubtracter - test - development requests - bug reports (Read 1761 times)

newbie
Activity: 6
Merit: 0
Ahhh, I see what you mean, for some reason I wasn't considering that as an option... could end up a fair depth deep in order to get a reasonable working range to scan.

Thanks for your insight.



full member
Activity: 1022
Merit: 217
Shooters Shoot...

Oh, so that means n is limited to 2^32 keys for each run...you could do as many runs as needed to reach desired number of generated keys.


Not sure how running a second or third time will help.... That will only create more at roughly the same distance apart as the previous run(s). Optimally, you'd want them closer together for a shorter search time.
Lol, I know you say you are new to this tool, but I do not understand what you are saying/wanting to do.

Let me break it down. Let's say you want to space all keys out at every 100; can be as close or as far apart as you want them.

So you run your first 2^32 keys as such; public key = 1, n = 2^32, range = 1:2^32*100 = n 4294967296 range = 1:429496729600, now keys will be spread out every 100 keys (429496729600 / 2^32 = 100). You follow so far?

Now let's say you want more than 2^32 keys, you want 2^33 keys. So on your next run, you would do the same, just change the public key: public key = 429496729600, n = 2^32, range = 1:2^32*100 = n 4294967296 range = 1:429496729600

SO yeah, I do not follow what you mean by "Optimally, you'd want them closer together for a shorter search time." it really makes no sense, because you can change your 2nd and 3rd runs to whatever you want, in relation to the first run, same distance, shorter distance, longer distance, etc. however, that's not the point, the point is/was, you can generate more than 2^32 keys, you just have to make multiple runs.

Quote
"Not sure how running a second or third time will help"

It helps if one wants more than 2^32 generated keys, not sure how else to explain it.
newbie
Activity: 6
Merit: 0

Oh, so that means n is limited to 2^32 keys for each run...you could do as many runs as needed to reach desired number of generated keys.


Not sure how running a second or third time will help.... That will only create more at roughly the same distance apart as the previous run(s). Optimally, you'd want them closer together for a shorter search time.

EDIT:

I am search for puzzle #130 in the range 200000000000000000000000000000000:3ffffffffffffffffffffffffffffffff

Created 2,000,000,000 subtracted pk's. Each should be 340,282,366,920,938,484,656,701,964,288 apart. That's quite a distance  - 7573948.693931144 years of searching for EACH at 10 Pkeys/s  (that is, if my math is correct). 15147897387862288 years of searching that range without the added pk's.

That is an impressive reduction of time, but alas, I don't think I have 7 and a half million years to spare haha

Absolutely great idea, still not in the feasibility category yet though for the higher ranges.
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Is 'n' 32bit limited?

sadly yes, but are you going to do a list of more of 2 billion address?



The number of pubs that can be generated?

Oh, so that means n is limited to 2^32 keys for each run...you could do as many runs as needed to reach desired number of generated keys.
newbie
Activity: 6
Merit: 0
Is 'n' 32bit limited?

sadly yes, but are you going to do a list of more of 2 billion address?



The number of pubs that can be generated?
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Ok, so I think I understand how this works... certainly has some interesting potential.

If I am searching a higher range, the most this will script will give me is a distance of 2^32 from the unknown pk - Am I understanding this correctly? or is it the number of additions/subtractions that is 2^32 limited?

What range values should I enter in the script? Should I start from 0 to upper range limit, or only the actual range I'm searching?

It's been decades since I've thought about any advanced math topics, so it may take a bit to wrap my head around this type of stuff. Definitely interesting though!

Is there any way to know if a subtracted public key reaches out of bounds? For example if the subtracted public key goes below 0? From my understanding it would simply just loop around... so, would it be an idea to check the generated public keys to see when the subtraction hits that loop around point, then backtrace to see how many steps it took to reach that point....(which should give a closer point to start scanning from)?

Thanks



The distance is based on how many keys you want to generate.

The program takes the range you provide (always rounds up to an even number), subtracts the start range from the end range, and then divides that by how many keys you want generated.

Sticking with numbers, if your range is 1:2,000,000; and the number of keys you want generated is 1,000,000; then the distance between generated keys will be 2; 2,000,000 divided by 1,000,000.

I do not know where the 32 bit limit is implied or came from. Can you explain more?
newbie
Activity: 6
Merit: 0
Ok, so I think I understand how this works... certainly has some interesting potential.

If I am searching a higher range, the most this will script will give me is a distance of 2^32 from the unknown pk - Am I understanding this correctly? or is it the number of additions/subtractions that is 2^32 limited?

What range values should I enter in the script? Should I start from 0 to upper range limit, or only the actual range I'm searching?

It's been decades since I've thought about any advanced math topics, so it may take a bit to wrap my head around this type of stuff. Definitely interesting though!

Is there any way to know if a subtracted public key reaches out of bounds? For example if the subtracted public key goes below 0? From my understanding it would simply just loop around... so, would it be an idea to check the generated public keys to see when the subtraction hits that loop around point, then backtrace to see how many steps it took to reach that point....(which should give a closer point to start scanning from)?

Thanks

full member
Activity: 1022
Merit: 217
Shooters Shoot...
I've made this simple Python script to process the resulting file from Keysubtractor, removing all the information beyond the pubkeys/hash160/addresses.

The original file will be kept intact as the script creates a new out file, this way you won't lose all the valuable information.


with open('pbks_in.txt', 'r') as file, open('pbks_out.txt', 'w') as outfile:
    for line in file:
        cleaned_line = line.split('#')[0].strip()
        outfile.write(cleaned_line + '\n')



Just have it in the same folder your Keysubtractor file is in, and don't forget to change the names of the in and out files to match yours.

I know this is simple stuff, but I hope this can be of help!
Just as a note, if people are not familiar with the program:

You only need the above python script if you are running in Random mode, -R.

If not running in Random mode, you can simply run the keysubtracter again without the -x flag.

newbie
Activity: 19
Merit: 5
I've made this simple Python script to process the resulting file from Keysubtractor, removing all the information beyond the pubkeys/hash160/addresses.

The original file will be kept intact as the script creates a new out file, this way you won't lose all the valuable information.


with open('pbks_in.txt', 'r') as file, open('pbks_out.txt', 'w') as outfile:
    for line in file:
        cleaned_line = line.split('#')[0].strip()
        outfile.write(cleaned_line + '\n')



Just have it in the same folder your Keysubtractor file is in, and don't forget to change the names of the in and out files to match yours.

I know this is simple stuff, but I hope this can be of help!
member
Activity: 177
Merit: 14
No, the program is actually very ok, i like it, it doesn't need any improvment. It does what it supposed to do. But sadly it's limited to 32 bits.

ps> and goodluck too!
copper member
Activity: 1330
Merit: 899
🖤😏
Thanks for answer.

I am not doing that special thing, just some testing with pzzle 125 Smiley
Yw.
By special thing you mean my suggestion to improve this tool? Well to be able to do that we need the code written and developed, and alberto is MIA for some time now!

Good luck with your test, I haven't left the testing grounds yet, so welcome on board, and keep grinding.

member
Activity: 177
Merit: 14
Thanks for answer.

I am not doing that special thing, just some testing with pzzle 125 Smiley
copper member
Activity: 1330
Merit: 899
🖤😏
Thanks Alberto and WanderingPhilospher for this useful program.

I understood most of it's functions however; I have problem understanding the X point function. What does it do exactly? Is it like adding/subtracting?

I need an example if possible  Grin

Sofar i've been using only -s and -a. but not X point. Do you recommend X point for puzzle #125 more? Even though i don't know how it can be useful haha

Thanks

GR Sasa
By X point you mean -z argument? That just excludes 02 and 03 from output keys, it is useful if you don't want to include both 02 and 03 x coordinates, that way you just add one with no 02, 03, it saves space and increases speed.

Show me you command line, lets see what you are doing.😉

You know I have been thinking about a feature addition, we could generate for example 10 M known private keys and only keeping the last 8 characters of their public keys while the private keys are completely saved, then we could run addition and subtraction operations while the program automatically checks all the result against those 10M known keys.

One time I had the public key for 0xb, which is key number 11 in decimal, now imagine how many easy and known keys are in our output files but we never notice them, but having the ability to check all on the fly would be a great addition and improvement IMHO.
member
Activity: 177
Merit: 14
Thanks Alberto and WanderingPhilospher for this useful program.

I understood most of it's functions however; I have problem understanding the X point function. What does it do exactly? Is it like adding/subtracting?

I need an example if possible  Grin

Sofar i've been using only -s and -a. but not X point. Do you recommend X point for puzzle #125 more? Even though i don't know how it can be useful haha

Thanks

GR Sasa
member
Activity: 177
Merit: 14
They are desktop developers. I assume noone here are Android developers.
copper member
Activity: 1330
Merit: 899
🖤😏
Hi dev,so I was wondering, is it possible to run key sub on android? Since it doesn't require any computing that much, it should be no problem to run it on a phone, have you ever done such a thing or is it too hard to do?
hero member
Activity: 774
Merit: 647
Uhh! hey there team mates! I was wondering what is the reason to select an even -n to add and subtract, if I set -n 5, what happens? Also selecting an even number which is a combination of 2 odd numbers will add/subtract odd numbers.  Or is it OK to do that?

The program create the same amount of keys In both sides of your target example:

Code:
+Key M
+Key ...
+Key 3
+Key 2
+Key 1
Target
-Key 1
-Key 2
-Key 3
-Key ...
-Key M

That is why N should be Even:

Code:
M = N /2

if you want some subtract some odd numbers you need to play a little with the size of the range  -r from:to divided bewteen the number N example:

Range 25 (19 Hex) divided bewteen 10

Code:
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630 -n 10 -r 0:19
02231c58426010a60de22090bf73cc0ea14f1040273d5be74bc425cf7a82bb9c00 # - 5
033cdd67ebf89b79c953c8ca9b248a859aff02ebd69a4f17a850fa037cde0723b2 # + 5
023e40191ed19ba1c82d3948ffad7d11efc7352e8a071b09750fc0a62cba295f15 # - 10
02ad82cfd538d8f9a98ea7d2393a958962d3dd783456284353084ad74e459ca98c # + 10
02fca272f04368cc4e00cf283e075f1e6cace4754a4319c34258867f73c479f883 # - 15
0210bc32a1bcb978121653cfb6eba088969c3a7271cef1000e355da9785c74cf57 # + 15
029649575661e11d5c7c277d008c7a6d6a56c14824e31673a5a49809f94777858e # - 20
02a1c7e1fffa740388689234491047208e0f7c23a9bee61b61ef035a6d016a709c # + 20
020cbbd8790c965eab7f5ea396fe65e1ca3eb2e41febcc1a372159277adb8f8dd6 # - 25
033d21a2c11b8b32afeac80d3f1b391d98b388dd4ab78ca3926571114d7cc28ad8 # + 25
02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630 # target

Odd numbers every ending 5

Range 15 (F Hex) divided bewteen 10

Code:
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630 -n 10 -r 0:F
0379c92f7fca55ac0710de44e86e31cf50742e63206af99e19d69a2fb9a179b82e # - 3
035738dc2e02ce16ab3d169ecd252154c763e5c9daaa8497ac3f0b8636ced8e6bd # + 3
02c88af07db06461a231177c827e43c8fe3d8aa5a19ba067b76d5ef41c8a29e4e0 # - 6
03b7d0c69eb53fa7008224d802e6bc2e56e9e11d00c575b91a9bde5f44556d3469 # + 6
03f3d29f5ec05cff300fc951e6e85b4707998473707d0a3e27f3ec0b3f5aab41e6 # - 9
03bc31bb00836f096f24cf8b8382e68011e71081919360dace116701074aa64684 # + 9
03d132cb27b0d70ee54c853eb4373b993847dca55ee66a1bb6f5b95a63db7eed8e # - 12
02e3ebf6a1ebf608fd9c70127d4f1f9da9adba02a3a3f1dee38d6396d2f0ac3aa4 # + 12
02fca272f04368cc4e00cf283e075f1e6cace4754a4319c34258867f73c479f883 # - 15
0210bc32a1bcb978121653cfb6eba088969c3a7271cef1000e355da9785c74cf57 # + 15
02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630 # target

Odd numbers 3,9,15

I hope this examples help you
copper member
Activity: 1330
Merit: 899
🖤😏
Uhh! hey there team mates! I was wondering what is the reason to select an even -n to add and subtract, if I set -n 5, what happens? Also selecting an even number which is a combination of 2 odd numbers will add/subtract odd numbers.  Or is it OK to do that?
jr. member
Activity: 50
Merit: 1
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630-n 100 -b 120

Note the bolded part above, no space therefore it starts to produce invalid keys.

Code:
03f1d41da8acf0506f3bf7140b5629dd33a5cf546133479530cd8065e335a97666 # - 13292279957849158729038070602803446
02000000000000000000000000000000000000000000000000000000000000000 # + 13292279957849158729038070602803446
02b70ae2dcb442548570313f652b91ca093a3acac3a2441cb64614e8195505b6b8 # - 26584559915698317458076141205606892
0367dabeef20a6a8b7b5555b162cc8c8489e3134dcec624fe028573c34dbbf20f6 # + 26584559915698317458076141205606892
02a1d21298779f888cd8169f9ed59e4383219cdadbdb342ba886034ef9013b89be # - 39876839873547476187114211808410338
02ae015703cbaee9570dc648d7bce78ac7cb438630e09d69eef4f1208655e1027d # + 39876839873547476187114211808410338

Note one of the public keys above is the 0 public key aka k(0) public key, it shows up if you subtract your k from your p, basically point at infinity.

Now our actual target's k is 13292279957849158729038070602803446 because we subtracted it from our target.

Showing examples for newbies to understand, not that a few posts above I wasn't a total noob, now I act as if I know things, go figure.😅



work on any puzzle public key puzzle 100 or 105, you will understand how it work, and put the range like this Keysubstracter -s -------  0:fffffffffffffffffffffffff -o puzzle100.txt

do only -s dont add -a, you will have all public key from   0 to range 100

put this range always
0 to : end range

and when you create the file.txt, just go and do the maths with https://www.boxentriq.com/code-breaking/big-number-calculator
just do this privatekey of the puzzle 100 - number that you get,, in any line ,exemple af55fc59c335c8ec67ed24826 + .....
you will get the privatekey of the public key that you generate with keysubs,,,, do that with more that 20 lines randomly,,, you wil have smaller and bigger ranges pk,,, you will understand how you will search for puzzle 120 or 125 by this methode,

because your work range with  rangepuzzle120:rangepuzzle120 and -a and -s
you only generate public keys between 800000000000000000000000000000 and ffffffffffffffffffffffffffffff,
but the methode above and i wanna you to try it

you will get all addresses txt file from 0 to puzzle,,, you can find any address in smaller range 10 or in 66 like 13zb1hQ did you get it ? you will now know  how to search and work with this programme. its easy, you can substract 125 puzzle to 80 and 100 but you will have millions in this txt file, you can do bsgs on that file but its slow because it devide your speed to millions that you generated, so you can generate with addresses and search manually, and there is a lot of tricks how can you search , but sir your methode is totally wrong, in one case,, you generate and search with bsgs in that range already, but its the same this if you search for 1 public key 125 puzzle or a file contain 100 million public key substracted from 125 and speed is devided to 100 million, same thing already,, but you must work again on that program to learn how to use it its simple and try my methode you will get it simple, just do an exemple or old puzzle you will find how it works





hero member
Activity: 774
Merit: 647
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630-n 100 -b 120

yes basically if you add two publickeys with same X but different Y value (Negative key of each other) exaple:

02f3fad2f7b0f7f5ba634a0618479694b5744091fc7ed53177b5578dba06ee4b77 - 03f3fad2f7b0f7f5ba634a0618479694b5744091fc7ed53177b5578dba06ee4b77

you always get the point at the infinity, so in that case you the value of One of those you can get the value of the other.
copper member
Activity: 1330
Merit: 899
🖤😏
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630-n 100 -b 120

Note the bolded part above, no space therefore it starts to produce invalid keys.

Code:
03f1d41da8acf0506f3bf7140b5629dd33a5cf546133479530cd8065e335a97666 # - 13292279957849158729038070602803446
02000000000000000000000000000000000000000000000000000000000000000 # + 13292279957849158729038070602803446
02b70ae2dcb442548570313f652b91ca093a3acac3a2441cb64614e8195505b6b8 # - 26584559915698317458076141205606892
0367dabeef20a6a8b7b5555b162cc8c8489e3134dcec624fe028573c34dbbf20f6 # + 26584559915698317458076141205606892
02a1d21298779f888cd8169f9ed59e4383219cdadbdb342ba886034ef9013b89be # - 39876839873547476187114211808410338
02ae015703cbaee9570dc648d7bce78ac7cb438630e09d69eef4f1208655e1027d # + 39876839873547476187114211808410338

Note one of the public keys above is the 0 public key aka k(0) public key, it shows up if you subtract your k from your p, basically point at infinity.

Now our actual target's k is 13292279957849158729038070602803446 because we subtracted it from our target.

Showing examples for newbies to understand, not that a few posts above I wasn't a total noob, now I act as if I know things, go figure.😅
full member
Activity: 1022
Merit: 217
Shooters Shoot...
My man, * you 100 percent understand lol.
Lol^256, my man, I got how to use this thing the first time you explained, what I had encountered was due to no space between target and -o output.txt in the command line page, so it displayed the 0 point public key and all the offsets were invalid coordinates, lol.
However when your target is one of the exact points you are subtracting, in the out put file it will show for example: 020000000000000000000000000000000000000000000 # + 1  and your target k is actually 1, so when the tool subtracts 1 from your target, it shows the 0 point public key. This is actually very interesting, because you just need to get "lucky" and subtract the exact k as the k of your target from your target to see the 0 point p.

Maybe you didn't know about this, so my man it is you who doesn't 100 percent knows the tool which you developed. Lol^N-1.

*= not the original quote, modified by me.😅
When you can explain and show examples better, maybe it will be easier to understand what you are saying.

Your exact words:
Quote
0200000 # target

The #target is the supplied key.

I did not develop this tool, albert0 did.
copper member
Activity: 1330
Merit: 899
🖤😏
My man, * you 100 percent understand lol.
Lol^256, my man, I got how to use this thing the first time you explained, what I had encountered was due to no space between target and -o output.txt in the command line page, so it displayed the 0 point public key and all the offsets were invalid coordinates, lol.
However when your target is one of the exact points you are subtracting, in the out put file it will show for example: 020000000000000000000000000000000000000000000 # + 1  and your target k is actually 1, so when the tool subtracts 1 from your target, it shows the 0 point public key. This is actually very interesting, because you just need to get "lucky" and subtract the exact k as the k of your target from your target to see the 0 point p.

Maybe you didn't know about this, so my man it is you who doesn't 100 percent knows the tool which you developed. Lol^N-1.

*= not the original quote, modified by me.😅
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Is anyone around these woods? So I understand if we hit a target while adding and subtracting it will show the public key zero aka 02000 with a lot of other zeros, but what does it mean when I have done the subtraction and it shows 0200000 # target. What to do now?
My man, I’ve told you to stop messing with tools you don’t 100 percent understand lol.

The target is the pubkey you are subtracting from; the one you put in the command line to add/subtract from.

You realize you have to run all of the added/subtracted pubkeys through a range and program to try to find them right? Keysubtracter is just a tool that helps you generate many offset pubkeys to search for. Then you have to actually search for them. If you find one, then you add or subtract the number beside it (find the pubkey found via some other program, in your keysubtracter output file) to find the target pubkey you initially entered into the keysubtracter program.

If you entered pubkey x and generated 100 offset pubkeys and you searched via another program and found pubkey 97, You now take pubkey 97’s private key, look it up in your keysubtracter output file, find the + or - number beside it, add or subtract that number, and you will now have the private key to the public key you entered into the keysubtracter program, aka your target pubkey.
copper member
Activity: 1330
Merit: 899
🖤😏
Is anyone around these woods? So I understand if we hit a target while adding and subtracting it will show the public key zero aka 02000 with a lot of other zeros, but what does it mean when I have done the subtraction and it shows 0200000 # target. What to do now?
copper member
Activity: 1330
Merit: 899
🖤😏
Thanks, now I understand how it works, my question is why haven't you guys looted all the puzzles already then? Well I guess you haven't yet figured out the secret ratio between public keys, whilst everybody thinks dividing public keys doesn't work, it could work and already has a solution we just haven't done enough diving into this amazing vast ocean of hidden mathematics!


Ps, when you develop and release software, always expect noobs come asking questions, I just learned about +- pub keys 2 days ago. I know in the past I asked around these woods, but since I couldn't comprehend the notion of sub/add, I didn't pay much attention.

Now I was thinking, if we divide a range by 1 billion tiny ranges and then collect 1 public key from each of them, for our future reference, then we start subtracting our target public key or adding, either going up or down the bit range, and whenever we hit one of our reference public keys, we just start counting points taken from our starting range to reach the checkpoint, and then since we know the private key of our checkpoint public key, we will add  the number of steps taken by the tool to the private key of our check point pub key and reach our loot.

A note to the world!

Now, now. Don't start panicking just yet, we are good treasure hunters, we will first drain the puzzle pot and then we will go after the long lost treasures, now is the the time to panic, because when we spend all those coins, we will come for your coins, and there is no coin safe from us, so where ever you go we will follow, this is the official manifesto of the "AWD" short for Alberto, Wandering, Digaran. The triple team that killed crypto currency, remember our names! Lol.😅
full member
Activity: 1022
Merit: 217
Shooters Shoot...
I got what you said about how it works, I have a problem with the results I have got, for example:
dc629ccec8a0c3c53e5a0707021a0053a325720e3321f5fb6db3f9339eac23f7 #+ 184ffe30916bcf90fdba43677100000  and I used -s, which means I have to actually add, but add what to what and how?

Edit, one other thing, how does this adding and subtracting exactly work? Is it done using integers or hex and why do I get different results when I use decimal values to add and subtract? Could you explain this please?
Honestly, you just shouldn't use this tool since you do not even know what it is doing and how to use it...just being honest.

It takes a given public key and adds or subtracts from supplied public key.

If you take a public key in the 20 bit/2^20 range, let us say it is derived from private key 00000000000000000000000000000000000000000000000000000000000D2C55; so its public key is 033c4a45cbd643ff97d77f41ea37e843648d50fd894b864b0d52febc62f6454f7c.

Now if you use -s (subtraction) a -n of 20 and a -r of 1:fffff, the program will generate 20 new pubkeys/addresses/rmd160s (depending on what you told the program to output and the program you are going to use to search for the results) plus the target pubkey/addresses/rmd160s (033c4a45cbd643ff97d77f41ea37e843648d50fd894b864b0d52febc62f6454f7c).

Now, you have to supply those 20 pubkey/addresses/rmd160s to a program and search the 20 bit range to try and find them. Once found, first, take the address/pubkey/rmd160 found and consult your input file and find the specific address/pubkey/rmd160 found and look at the hex number # + fff. Now you have to take the private key of the address/pubkey/rmd160 the program found, and the hex number # + fff that you previously found in your input file, and add the two together to get the private key of the initial public key you were searching for, 033c4a45cbd643ff97d77f41ea37e843648d50fd894b864b0d52febc62f6454f7c.

copper member
Activity: 1330
Merit: 899
🖤😏
I got what you said about how it works, I have a problem with the results I have got, for example:
dc629ccec8a0c3c53e5a0707021a0053a325720e3321f5fb6db3f9339eac23f7 #+ 184ffe30916bcf90fdba43677100000  and I used -s, which means I have to actually add, but add what to what and how?

Edit, one other thing, how does this adding and subtracting exactly work? Is it done using integers or hex and why do I get different results when I use decimal values to add and subtract? Could you explain this please?
full member
Activity: 1022
Merit: 217
Shooters Shoot...
@Op, in the output file I have several #targets, is that what we are looking for? How do I derive the private key now?
You should only have 1 target in output file unless you ran the program more than once with same output file.
The target key is the original public key you used in the settings.
To derive the private key you need to search whatever range/bits of your original public key used to generate all of the offset keys in your output file.
What now? I just double clicked on the bat file a few times, each time it finished in less than a second so I changed things and ran it again until I saw the output file is full.

Now you say #target is my input, but why is it in my output file and why did the tool add + to them instead of subtracting? Because I selected -s only.

I have 3 #targets, one of them is derived from 64 hex string and 2 of them are from 31 char hex string, should I search the one leading to the target?

And why does it select the additions like this : eeeeeeeeeeeeee434343434343, did you just hit the keyboard for add/sub selection or is it doing it by itself?
First off, which version are you using? I believe mine has the only -s or -a flags/options.

The target address/pubkey/rmd160 is always included in the output file. If you run it multiple times, then yes, you will have multiple targets in the output file.

The + is there when you use the -s flag, because if you find the pub/address/rmd160 that is in the file, you will have to take the private key found and then + (add) the number to the right of the key found.
Example, if your file contains this:
1AjerabryCRsi8PQmyeqVmwqn5jMVGrf1j # + 10
and you find the address 1AjerabryCRsi8PQmyeqVmwqn5jMVGrf1j it will print the address plus it's applicable private key; you will have to take the applicable private key and add + 10 to it to get the real private key of the address you are looking for.
opposite if you run the -a flag; you will have to subtract to get the real private key.

It doesn't randomly select anything. It takes the range (-r) provided and then divides the range by how many keys you want generated (-n). Sticking with decimals for ease of example.
If you used a range of -r 1:1000 and wanted -n 10 (10) keys, the program subtracts start range from end range (1000-1 = 999)(but program auto rounds it up to even number, so it would be 1000)  and then divides that by -n 10 (1000/10 = 100) so it would generate keys spread out every 100 keys, so your output file would be something like,  +100, +200, +300, +400, +500, +600, +700, +800, +900, +1000.
Make sense?
copper member
Activity: 1330
Merit: 899
🖤😏
@Op, in the output file I have several #targets, is that what we are looking for? How do I derive the private key now?
You should only have 1 target in output file unless you ran the program more than once with same output file.
The target key is the original public key you used in the settings.
To derive the private key you need to search whatever range/bits of your original public key used to generate all of the offset keys in your output file.
What now? I just double clicked on the bat file a few times, each time it finished in less than a second so I changed things and ran it again until I saw the output file is full.

Now you say #target is my input, but why is it in my output file and why did the tool add + to them instead of subtracting? Because I selected -s only.

I have 3 #targets, one of them is derived from 64 hex string and 2 of them are from 31 char hex string, should I search the one leading to the target?

And why does it select the additions like this : eeeeeeeeeeeeee434343434343, did you just hit the keyboard for add/sub selection or is it doing it by itself?
full member
Activity: 1022
Merit: 217
Shooters Shoot...
@Op, in the output file I have several #targets, is that what we are looking for? How do I derive the private key now?
You should only have 1 target in output file unless you ran the program more than once with same output file.
The target key is the original public key you used in the settings.
To derive the private key you need to search whatever range/bits of your original public key used to generate all of the offset keys in your output file.
copper member
Activity: 1330
Merit: 899
🖤😏
@Op, in the output file I have several #targets, is that what we are looking for? How do I derive the private key now?
hero member
Activity: 774
Merit: 647
how to reduce the search range of 125 to 120 ? what range i put for substract the public key of 125 to smaller range ? 0:1f>>>>> ?

there is no way to narrow it down with 100% certainty, In the best case the complexibility is the same, in the worst case the complexibility is sometimes worse. I've trying so many methods and none of then give you some certainty.
jr. member
Activity: 50
Merit: 1
how to reduce the search range of 125 to 120 ? what range i put for substract the public key of 125 to smaller range ? 0:1f>>>>> ?
newbie
Activity: 29
Merit: 0
Is 'n' 32bit limited?

sadly yes, but are you going to do a list of more of 2 billion address?


Not sure I need that but I was curious to test out and found that with 'n' higher than that the first address doesn't change.
Also when trying to make a big file I've found it working very slow. Uses only 4 threads (or maybe 2 cores). Thought the drive may be the problem but ram drive doesn't make any change.
Would be nice (and code simple I guess) to make the output file parted for such experiments
hero member
Activity: 774
Merit: 647
Is 'n' 32bit limited?

sadly yes, but are you going to do a list of more of 2 billion address?

newbie
Activity: 29
Merit: 0
Is 'n' 32bit limited?
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Quote
could you give me an example command line for puzzle #125

It really depends on what you are trying to do and which program you will use to achieve what you are trying to do.

But a basic setting would be:

Code:
WindowsKeySubtractorV2.2 -p 0233709eb11e0d4439a729f21c2c443dedb727528229713f0065721ba8fa46f00e -s -n 1000 -r 1:fffff -o 125OffsetKeys.txt
pause

Or if you are using with a program that needs only x points:

Code:
WindowsKeySubtractorV2.2 -p 0233709eb11e0d4439a729f21c2c443dedb727528229713f0065721ba8fa46f00e -z -s -n 1000 -r 1:fffff -o 125OffsetKeys.txt
pause

And with those, I used -s to subtract, but you could use -a or -s and -a to get both added and subtracted points.



copper member
Activity: 1330
Merit: 899
🖤😏
LOL 100%. My high school math teacher used to beat the hell out of me, hence my limited understanding. I have already read about the elliptic curve and all I could figure out from it was the fact that the graph looks like a vagina if you rotate it and the G spot is never on a single spot, very similar to a woman's body. Lol.


On github it says we need to save the generated data to get a private key from it, so could you give me an example command line for puzzle #125? I will take care of the rest, thanks.
full member
Activity: 1022
Merit: 217
Shooters Shoot...
New release for Windows Version (I guess it will compile and work on Linux as well).

https://github.com/WanderingPhilosopher/Windows-KeySubtractor/releases/tag/v2.2

New features/changes:

-a = add to pubkey only
-s = subtract from pubkey only

-a -s = add and subtract at same time, as before.

-z = x point only. Program will leave off leading y coord parity, 02 and/or 03. Only applicable when generating new pubkeys. Does not impact addresses or hash160s.

I added a completion percentage so people wouldn't wonder how close the program was from being finished LOL.

I converted the + and - info, from decimal to hex. I did this to save on file size/drive space. If you find a pubkey, address or hash160, you'll have to do math either way to reconstruct your target pubkey.

A few notes. You always have to use the -n flag. That tells the program how many keys you want to generate.
When using the -n, if you use -n 1000, you are telling the program to generate 1000 new pubkeys, addresses, or hash160s.
You have to use -n AND either -a, -s, or both.
If you use -a or -s alone, so if you use -a -n 1000, the program will add and generate 1000 new pubkeys.
If you use -a and -s together, so if you use -a -s -n 1000. the program will add and subtract 1000 new pubkeys, not 2000 new pubkeys.

My release section has the compiled Windows exe file. To run on Windows, download the WindowsKeySubtractorv2.2.zip folder. Unzip it. Edit the batch file settings. Make sure you run the program in the same folder as the .dll file (included in the zip folder) or you will get the "Missing libgmp-10.dll" error. Unless you have libgmp-10.dll loaded on your PC and set in the Path/environments.

Let me know of any bugs that you may find.

WP

full member
Activity: 1022
Merit: 217
Shooters Shoot...
@albert0bsd, I am facing the same error issue while running this in ubantu 22.04 LTS

having gcc version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

How to solve this please help.

thanks and Regards.

By same error, do you mean error message "collect2: error: ld returned 1 exit status"? I tried compiling this tool on newly installed Debian 11 and got similar error. My gcc version is gcc version 10.2.1 20210110 (Debian 10.2.1-6).

Code:
gcc -O3 -c sha256/sha256.c -o sha256.o
gcc -O3 -c base58/base58.c -o base58.o
gcc -O3 -c rmd160/rmd160.c -o rmd160.o
gcc -O3 -c gmpecc.c -o gmpecc.o
gcc -O3 -c util.c -o util.o
gcc -o keysubtracter keysubtracter.c gmpecc.o util.o sha256.o base58.o rmd160.o -lgmp
/usr/bin/ld: gmpecc.o:(.bss+0x2020): multiple definition of `EC'; /tmp/ccwgKfYZ.o:(.bss+0x0): first defined here
/usr/bin/ld: gmpecc.o:(.bss+0x0): multiple definition of `DoublingG'; /tmp/ccwgKfYZ.o:(.bss+0x40): first defined here
/usr/bin/ld: gmpecc.o:(.bss+0x2000): multiple definition of `G'; /tmp/ccwgKfYZ.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:7: default] Error 1


I had same issues when compiling for windows using MingW64; my work around to fix this was to:

edit the gmpecc.c
strike out #include "gmpecc.h"
and remove the code starting with void Point_Doubling...
Code:

#include
//#include "gmpecc.h"


void Point_Doubling(struct Point *P, struct Point *R) {
mpz_t slope, temp;
mpz_init(temp);
mpz_init(slope);
if(mpz_cmp_ui(P->y, 0) != 0) {
mpz_mul_ui(temp, P->y, 2);
mpz_invert(temp, temp, EC.p);
mpz_mul(slope, P->x, P->x);
mpz_mul_ui(slope, slope, 3);
mpz_mul(slope, slope, temp);
mpz_mod(slope, slope, EC.p);
mpz_mul(R->x, slope, slope);
mpz_sub(R->x, R->x, P->x);
mpz_sub(R->x, R->x, P->x);
mpz_mod(R->x, R->x, EC.p);
mpz_sub(temp, P->x, R->x);
mpz_mul(R->y, slope, temp);
mpz_sub(R->y, R->y, P->y);
mpz_mod(R->y, R->y, EC.p);
} else {
mpz_set_ui(R->x, 0);
mpz_set_ui(R->y, 0);
}
mpz_clear(temp);
mpz_clear(slope);
}

void Point_Addition(struct Point *P, struct Point *Q, struct Point *R) {
mpz_t PA_temp,PA_slope;
mpz_init(PA_temp);
mpz_init(PA_slope);
if(mpz_cmp_ui(P->x, 0) == 0 && mpz_cmp_ui(P->y, 0) == 0) {
mpz_set(R->x, Q->x);
mpz_set(R->y, Q->y);
}
else {
if(mpz_cmp_ui(Q->x, 0) == 0 && mpz_cmp_ui(Q->y, 0) == 0) {
mpz_set(R->x, P->x);
mpz_set(R->y, P->y);
}
else {
if(mpz_cmp_ui(Q->y, 0) != 0) {
mpz_sub(PA_temp, EC.p, Q->y);
mpz_mod(PA_temp, PA_temp, EC.p);
}
else {
mpz_set_ui(PA_temp, 0);
}
if(mpz_cmp(P->y, PA_temp) == 0 && mpz_cmp(P->x, Q->x) == 0) {
mpz_set_ui(R->x, 0);
mpz_set_ui(R->y, 0);
}
else {
if(mpz_cmp(P->x, Q->x) == 0 && mpz_cmp(P->y, Q->y) == 0) {
Point_Doubling(P, R);
}
else {
mpz_set_ui(PA_slope, 0);
mpz_sub(PA_temp, P->x, Q->x); //dx = B.x - A.x
mpz_mod(PA_temp, PA_temp, EC.p); ///dx = dx % p
mpz_invert(PA_temp, PA_temp, EC.p); //gmpy2.invert(dx, p) % p
mpz_sub(PA_slope, P->y, Q->y);
mpz_mul(PA_slope, PA_slope, PA_temp);
mpz_mod(PA_slope, PA_slope, EC.p);
mpz_mul(R->x, PA_slope, PA_slope); //c*c
mpz_sub(R->x, R->x, P->x); // c*c - A.x
mpz_sub(R->x, R->x, Q->x); //(c*c - A.x) - B.x
mpz_mod(R->x, R->x, EC.p); // Rx % p
mpz_sub(PA_temp, P->x, R->x);
mpz_mul(R->y, PA_slope, PA_temp);
mpz_sub(R->y, R->y, P->y);
mpz_mod(R->y, R->y, EC.p);
}
}
}
}
mpz_clear(PA_temp);
mpz_clear(PA_slope);
}

void Scalar_Multiplication(struct Point P, struct Point *R, mpz_t m) {
struct Point SM_T,SM_Q;
int no_of_bits, i;
no_of_bits = mpz_sizeinbase(m, 2);
mpz_init_set_ui(SM_Q.x,0);
mpz_init_set_ui(SM_Q.y,0);
mpz_init_set_ui(SM_T.x,0);
mpz_init_set_ui(SM_T.y,0);
mpz_set_ui(R->x, 0);
mpz_set_ui(R->y, 0);
if(mpz_cmp_ui(m, 0) != 0) {
mpz_set(SM_Q.x, P.x);
mpz_set(SM_Q.y, P.y);
for(i = 0; i < no_of_bits; i++) {
if(mpz_tstbit(m, i)) {
mpz_set(SM_T.x, R->x);
mpz_set(SM_T.y, R->y);
mpz_set(SM_Q.x,DoublingG[i].x);
mpz_set(SM_Q.y,DoublingG[i].y);
Point_Addition(&SM_T, &SM_Q, R);
}
}
}
mpz_clear(SM_T.x);
mpz_clear(SM_T.y);
mpz_clear(SM_Q.x);
mpz_clear(SM_Q.y);
}

void Point_Negation(struct Point *A, struct Point *S) {
mpz_sub(S->y, EC.p, A->y);
mpz_set(S->x, A->x);
}

/*
Precalculate G Doublings for Scalar_Multiplication
*/
void init_doublingG(struct Point *P) {
int i = 0;
mpz_init(DoublingG[i].x);
mpz_init(DoublingG[i].y);
mpz_set(DoublingG[i].x,P->x);
mpz_set(DoublingG[i].y,P->y);
i = 1;
while(i < 256){
mpz_init(DoublingG[i].x);
mpz_init(DoublingG[i].y);
Point_Doubling(&DoublingG[i-1] ,&DoublingG[i]);
mpz_mod(DoublingG[i].x, DoublingG[i].x, EC.p);
mpz_mod(DoublingG[i].y, DoublingG[i].y, EC.p);
i++;
}
}

and place it all in keysubtracter.c after :
Code:
mpz_t min_range,max_range,diff,TWO,base_key,sum_key,dst_key;
gmp_randstate_t state;

The problem, for Windows at least, was #include "gmpecc.h" was being called in keysubtracter.c and gmpecc.c 
That is what causes that error message. I tried to use the #pragma once and other flags to pass to the compiler, but it wouldn't work on Windows.

You can look at the files on my github repo if you are still confused.
https://github.com/WanderingPhilosopher/Windows-KeySubtractor

Hope that helps.
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Hola.

New release for windows; now the add only, subtract only, or both is available in my new release.

https://github.com/WanderingPhilosopher/Windows-KeySubtractor/releases/tag/v2.0

Please test and let me know of any bugs.

Thanks again albert0bsd!
copper member
Activity: 1330
Merit: 899
🖤😏
Hi, in simple terms, what can we do with it? Is it to brute force private keys using pub keys?
I'm not familiar with this tool what parameters should I use?
newbie
Activity: 5
Merit: 0
@albert0bsd, I am facing the same error issue while running this in ubantu 22.04 LTS

having gcc version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

How to solve this please help.

thanks and Regards.

By same error, do you mean error message "collect2: error: ld returned 1 exit status"? I tried compiling this tool on newly installed Debian 11 and got similar error. My gcc version is gcc version 10.2.1 20210110 (Debian 10.2.1-6).

Code:
gcc -O3 -c sha256/sha256.c -o sha256.o
gcc -O3 -c base58/base58.c -o base58.o
gcc -O3 -c rmd160/rmd160.c -o rmd160.o
gcc -O3 -c gmpecc.c -o gmpecc.o
gcc -O3 -c util.c -o util.o
gcc -o keysubtracter keysubtracter.c gmpecc.o util.o sha256.o base58.o rmd160.o -lgmp
/usr/bin/ld: gmpecc.o:(.bss+0x2020): multiple definition of `EC'; /tmp/ccwgKfYZ.o:(.bss+0x0): first defined here
/usr/bin/ld: gmpecc.o:(.bss+0x0): multiple definition of `DoublingG'; /tmp/ccwgKfYZ.o:(.bss+0x40): first defined here
/usr/bin/ld: gmpecc.o:(.bss+0x2000): multiple definition of `G'; /tmp/ccwgKfYZ.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:7: default] Error 1




@albert0bsd, I am facing the same error issue while running this in Linux PC 4.4.0-19041-Microsoft #2311-Microsoft Tue Nov 08 17:09:00 PST 2022 x86_64 GNU/Linux

┌──(pc㉿PC)-[~/keysubtracter]
└─$ sudo make
gcc -O3 -c sha256/sha256.c -o sha256.o
gcc -O3 -c base58/base58.c -o base58.o
gcc -O3 -c rmd160/rmd160.c -o rmd160.o
gcc -O3 -c gmpecc.c -o gmpecc.o
gcc -O3 -c util.c -o util.o
gcc -o keysubtracter keysubtracter.c gmpecc.o util.o sha256.o base58.o rmd160.o -lgmp
/usr/bin/ld: gmpecc.o:(.bss+0x2020): multiple definition of `EC'; /tmp/ccbXGjoT.o:(.bss+0x0): first defined here
/usr/bin/ld: gmpecc.o:(.bss+0x0): multiple definition of `DoublingG'; /tmp/ccbXGjoT.o:(.bss+0x40): first defined here
/usr/bin/ld: gmpecc.o:(.bss+0x2000): multiple definition of `G'; /tmp/ccbXGjoT.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:7: default] Error 1

┌──(pc㉿PC)-[~/keysubtracter]
└─$ uname -a
Linux PC 4.4.0-19041-Microsoft #2311-Microsoft Tue Nov 08 17:09:00 PST 2022 x86_64 GNU/Linux

┌──(pc㉿PC)-[~/keysubtracter]
└─$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-10' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-w47ffq/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-w47ffq/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Debian 12.2.0-10)


@albert0bsd, having gcc version gcc
How to solve this please help.

thanks and Regards.
newbie
Activity: 1
Merit: 0
 @albert0bsd, I am facing the same error issue while running this in ubantu 22.04 LTS

having gcc version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

How to solve this please help.

thanks and Regards.
hero member
Activity: 774
Merit: 647
What version of Ubuntu do you have?

Code:
uname -a

What version of gcc do you have?

Code:
gcc -v
newbie
Activity: 1
Merit: 0
Quote
gcc -o keysubtracter keysubtracter.c gmpecc.o util.o sha256.o base58.o rmd160.o -lgmp
/usr/bin/ld: gmpecc.o:(.bss+0x2020): multiple definition of `EC'; /tmp/ccmArVbb.o:(.bss+0x0): first defined here
/usr/bin/ld: gmpecc.o:(.bss+0x0): multiple definition of `DoublingG'; /tmp/ccmArVbb.o:(.bss+0x40): first defined here
/usr/bin/ld: gmpecc.o:(.bss+0x2000): multiple definition of `G'; /tmp/ccmArVbb.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:7: default] Error 1

Hello everyone,
i can't build this on windows ubuntu shell
member
Activity: 406
Merit: 45

I don't know subtract method will work or not? not yet have sample case for test with any puzzle improve
but many people try, I will tri to test this subtract method (not yet clear to understand on this knowledge)
Is there any other scripts keysubtracter in python language (sorry for ask, I am not expert on c++, I am not programmer)?

For this keysubtracter in c++ language, why not try to add GPU calculate to work faster (Dev both CUDA and OpenCL will be great)
hero member
Activity: 774
Merit: 647
please write easy understand make python or explain mathematicaly

I don't know python, but here is a link that explain the point Negation in eliptic curves:

https://www.youtube.com/watch?v=0EsyHJvf_JE

https://trustica.cz/en/2018/03/08/elliptic-curves-point-negation/

For you example the negated Point is : 04c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5e51e970159c23 cc65c3a7be6b99315110809cd9acd992f1edc9bce55af301705

And the result is:

0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c 4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

Regards!

jr. member
Activity: 70
Merit: 1
this code subtracte in c language https://github.com/WanderingPhilosopher/Windows-KeySubtractor/releases/tag/v1.0


yes i know this git code
i am not understand c language so,
                         
input two point
privatekey    3     -    2      =   1
                 point1 - point2 = point3
                                               X                                                                                                                         Y
point1 f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9      388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672
point2 c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5   1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a


i need 3rd point subtract value

please write easy understand make python or explain mathematicaly
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Here is the Windows version:

https://github.com/WanderingPhilosopher/Windows-KeySubtractor

albert0bsd,

You may want to add the link in your main post so people who use Windows know they can use your program as well.

WP

Edit:  If Windows users wish to compile on their own, I followed this guide  https://www.msys2.org/  to download, install, setup the mingw-w64 GCC. Follow the instructions. Once complete, you can go to the above github page that has my Windows release and download the files and unzip. Open up MSYS MinGW 64-bit, do a cd (change directory) to the folder containing the files. Once there, simply type in make.

Enjoy.
full member
Activity: 1022
Merit: 217
Shooters Shoot...
I finally figured it out...how to compile in Windows using Mingw64 with make command!

I am learning more and more outside of my comfort zone of Visual Studio.

Sorry it took me so long lol.

I will post code for this code, the keysubtracter and your new code for, ecctools

Many thanks for the 2 cool programs
full member
Activity: 1022
Merit: 217
Shooters Shoot...
I also used "make" command for KeyHunt and it compiled and worked perfectly.

OK, i see that, please edit the gmpecc.h file and add the next line at the begging of the file

Code:
#pragma once

And try to recompile it again

More info here: https://docs.microsoft.com/en-us/cpp/preprocessor/once?view=msvc-160

if that works please let me know for make that change too in the next update

This did not work...I will work on it more later today. Thanks for responding!
hero member
Activity: 774
Merit: 647
I also used "make" command for KeyHunt and it compiled and worked perfectly.

OK, i see that, please edit the gmpecc.h file and add the next line at the begging of the file

Code:
#pragma once

And try to recompile it again

More info here: https://docs.microsoft.com/en-us/cpp/preprocessor/once?view=msvc-160

if that works please let me know for make that change too in the next update
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Quote
Yes you are totally right, my logic in the first version was was the next:

if the target publickey was at the middle of the range, the subtracted keys will land from the beginning of the bit range up to the end of the same bit range.
if  the target publickey was at the begging of the range, the subtracted keys will land in the first half of the bit range and the other half will land in the previous bit range
but if the target publickey was at the end of the range, the subtracted keys will land in the last half of the bit range and the other half will land in the next bit range
Obviously those are perfect cases, but the reality is that we don't know where is the target publickey, so my orignal idea was just increase the probability to have near a subtracted key in anywhere in the selected keyspace

But I repeat you are right i will add the option of select only make a subtract or addition.

Also think in the next one:

if you are working with targets in the 256 bit space, any addition may end in a lower bit space due to cyclical behavior of the eliptic curve

I think it is good the way it is. Your logic is different that mine but your program works just fine for the way some would use it. Like I said, I can generate millions of offset keys with -b 100 and all of those offset keys will be in the original 119 keyspace for pubkey #120. You can also pre-subtract pubkey down to a specific range and then use keysubtracter, which is what I do. So I have millions of pubkeys in a 116 bit range, but only 1/8th of those new offset keys will be within that range.

I do like the option of selecting just subtract or addition, but not 100% necessary. A great, fast program that I have been looking for, for a long time. Many thanks!
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Quote
Yes i see that error before, is some re-declaration of that G variable (gmpecc.c  load the gmpecc.h but also keysubtracter is loading that header file, i manage avoid that with the Makefile), maybe  adding some header directive like #prama once can be useful , but i don't know if it can work for you.

Are you using the command "make" in Mingw64 ?

If not, can you add the command that you are using to compile it?
Yes, I am using the "make" command in Mingw64.

I also used "make" command for KeyHunt and it compiled and worked perfectly.
hero member
Activity: 774
Merit: 647

How many bits does it subtract it by?

Code:
03f1d41da8acf0506f3bf7140b5629dd33a5cf546133479530cd8065e335a97666 # - 13292279957849158729038070602803446
022ec3a210bcb8ef6cf7b703b39539a83dc0c1318ccdb42daf48db2f0742971239 # + 13292279957849158729038070602803446
02b70ae2dcb442548570313f652b91ca093a3acac3a2441cb64614e8195505b6b8 # - 26584559915698317458076141205606892
0367dabeef20a6a8b7b5555b162cc8c8489e3134dcec624fe028573c34dbbf20f6 # + 26584559915698317458076141205606892
02a1d21298779f888cd8169f9ed59e4383219cdadbdb342ba886034ef9013b89be # - 39876839873547476187114211808410338
02ae015703cbaee9570dc648d7bce78ac7cb438630e09d69eef4f1208655e1027d # + 39876839873547476187114211808410338
(Output omitted)

If you see the number after the # char, is that the number that is being substracted or added to the original given publickey.

I am not sure if I understand the reason to add and compare.

It makes total sense to subtract from the 120bit key and compare it with a smaller range.

Yes you are totally right, my logic in the first version was was the next:

  • if the target publickey was at the middle of the range, the subtracted keys will land from the beginning of the bit range up to the end of the same bit range.
  • if  the target publickey was at the begging of the range, the subtracted keys will land in the first half of the bit range and the other half will land in the previous bit range
  • but if the target publickey was at the end of the range, the subtracted keys will land in the last half of the bit range and the other half will land in the next bit range
  • Obviously those are perfect cases, but the reality is that we don't know where is the target publickey, so my orignal idea was just increase the probability to have near a subtracted key in anywhere in the selected keyspace

But I repeat you are right i will add the option of select only make a subtract or addition.

Also think in the next one:

  • if you are working with targets in the 256 bit space, any addition may end in a lower bit space due to cyclical behavior of the eliptic curve


I know you mainly build for Linux but wasn't sure if this was something you have seen/experienced before.

Yes i see that error before, is some re-declaration of that G variable (gmpecc.c  load the gmpecc.h but also keysubtracter is loading that header file, i manage avoid that with the Makefile), maybe  adding some header directive like #prama once can be useful , but i don't know if it can work for you.

Are you using the command "make" in Mingw64 ?

If not, can you add the command that you are using to compile it?
full member
Activity: 1022
Merit: 217
Shooters Shoot...
I am not sure if I understand the reason to add and compare.

It makes total sense to subtract from the 120bit key and compare it with a smaller range.



You can use this program in many ways. But if you generate millions of offset keys say with a -b 100 flag, then all of those keys, whether added or subtracted, will still all be within the 8000... through ffff.... range that the 120 key lies in.  In this way, you have created millions of keys to search in the original range. You can use this program to reduce/subtract down to a given range and extract just the subtracted keys, but you will have many keys generated that do not lie in your reduced range.
full member
Activity: 1022
Merit: 217
Shooters Shoot...
Github page: https://github.com/albertobsd/keysubtracter

I publish this code on github in April 5, but i never update it until now, this is a small tool to make some substracted publickeys, address or hashes rmd160 from a target publickey.

This can be useful to increment our chances of hit some privatekey of the puzzles.

For example to make 100 copies of the puzzle 120 you need to execute the next command:

Code:
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630 -n 100 -b 120

Output
Code:
03f1d41da8acf0506f3bf7140b5629dd33a5cf546133479530cd8065e335a97666 # - 13292279957849158729038070602803446
022ec3a210bcb8ef6cf7b703b39539a83dc0c1318ccdb42daf48db2f0742971239 # + 13292279957849158729038070602803446
02b70ae2dcb442548570313f652b91ca093a3acac3a2441cb64614e8195505b6b8 # - 26584559915698317458076141205606892
0367dabeef20a6a8b7b5555b162cc8c8489e3134dcec624fe028573c34dbbf20f6 # + 26584559915698317458076141205606892
02a1d21298779f888cd8169f9ed59e4383219cdadbdb342ba886034ef9013b89be # - 39876839873547476187114211808410338
02ae015703cbaee9570dc648d7bce78ac7cb438630e09d69eef4f1208655e1027d # + 39876839873547476187114211808410338
(Output omitted)

but what that mean:

Code:
./keysubtracter -p  -n  -b  

Output:
Code:
New Publickey 1 # offset from original publickey
New Publickey 2 # offset from original publickey
...


How many bits does it subtract it by?
It will subtract by however many bits you tell it to.
In his example:
Code:
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630 -n 100 -b 120
He is telling the program to add and subtract up to 120 bits. You could change -b 120 to whatever; -b 50, -b 74, and that would be 50 and 74 bits. You can spread the bits out over a range as well using the -n 2048 -r 0:fffffffffff option as well. That will generate 2048 keys spread out evenly over the range of 0 through fffffffffff
full member
Activity: 1022
Merit: 217
Shooters Shoot...
I have built the KeyHunt for Windows using Mingw64 -make, but I receive this error when trying to use the make for keysubtracter:

Code:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gmpecc.o:gmpecc.c:(.bss+0x2000): multiple definition of `G'; C:\msys64\tmp\ccQTx1CF.o:keysubtracter.:(.bss+0x20): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:7: default] Error 1

I know you mainly build for Linux but wasn't sure if this was something you have seen/experienced before.
newbie
Activity: 15
Merit: 3
I am not sure if I understand the reason to add and compare.

It makes total sense to subtract from the 120bit key and compare it with a smaller range.


full member
Activity: 706
Merit: 111
Github page: https://github.com/albertobsd/keysubtracter

I publish this code on github in April 5, but i never update it until now, this is a small tool to make some substracted publickeys, address or hashes rmd160 from a target publickey.

This can be useful to increment our chances of hit some privatekey of the puzzles.

For example to make 100 copies of the puzzle 120 you need to execute the next command:

Code:
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630 -n 100 -b 120

Output
Code:
03f1d41da8acf0506f3bf7140b5629dd33a5cf546133479530cd8065e335a97666 # - 13292279957849158729038070602803446
022ec3a210bcb8ef6cf7b703b39539a83dc0c1318ccdb42daf48db2f0742971239 # + 13292279957849158729038070602803446
02b70ae2dcb442548570313f652b91ca093a3acac3a2441cb64614e8195505b6b8 # - 26584559915698317458076141205606892
0367dabeef20a6a8b7b5555b162cc8c8489e3134dcec624fe028573c34dbbf20f6 # + 26584559915698317458076141205606892
02a1d21298779f888cd8169f9ed59e4383219cdadbdb342ba886034ef9013b89be # - 39876839873547476187114211808410338
02ae015703cbaee9570dc648d7bce78ac7cb438630e09d69eef4f1208655e1027d # + 39876839873547476187114211808410338
(Output omitted)

but what that mean:

Code:
./keysubtracter -p  -n  -b  

Output:
Code:
New Publickey 1 # offset from original publickey
New Publickey 2 # offset from original publickey
...


How many bits does it subtract it by?
jr. member
Activity: 38
Merit: 13
Hello Alberto,

Can you make the mapping from the list by converting all extracted keys to HASH160?

I think it would be more effective than Pub2RMD feature.

Edit : I just checked. You made an update today, exactly what I wanted. Thank you very much.
hero member
Activity: 774
Merit: 647
Github page: https://github.com/albertobsd/keysubtracter

I publish this code on github in April 5, but i never update it until now, this is a small tool to make some substracted publickeys, address or hashes rmd160 from a target publickey.

This can be useful to increment our chances of hit some privatekey of the puzzles.

For example to make 100 copies of the puzzle 120 you need to execute the next command:

Code:
./keysubtracter -p 02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630 -n 100 -b 120

Output
Code:
03f1d41da8acf0506f3bf7140b5629dd33a5cf546133479530cd8065e335a97666 # - 13292279957849158729038070602803446
022ec3a210bcb8ef6cf7b703b39539a83dc0c1318ccdb42daf48db2f0742971239 # + 13292279957849158729038070602803446
02b70ae2dcb442548570313f652b91ca093a3acac3a2441cb64614e8195505b6b8 # - 26584559915698317458076141205606892
0367dabeef20a6a8b7b5555b162cc8c8489e3134dcec624fe028573c34dbbf20f6 # + 26584559915698317458076141205606892
02a1d21298779f888cd8169f9ed59e4383219cdadbdb342ba886034ef9013b89be # - 39876839873547476187114211808410338
02ae015703cbaee9570dc648d7bce78ac7cb438630e09d69eef4f1208655e1027d # + 39876839873547476187114211808410338
(Output omitted)

but what that mean:

Code:
./keysubtracter -p  -n  -b  

Output:
Code:
New Publickey 1 # offset from original publickey
New Publickey 2 # offset from original publickey
...

Windows version thanks to WanderingPhilospher

https://github.com/WanderingPhilosopher/Windows-KeySubtractor
Jump to: