albert0bsd
|
 |
September 12, 2023, 09:45:45 PM |
|
Because all the funds from 161 through 255 were redundant (Bitcoin addresses only use 160 bits) the author of the puzzle moved all the funds from the 160-255 ranged down into the 1-160 range. It is explained up thread.
Is it? I thought it uses almost 256 bits (the last possible private key is FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140) The maximum value of a Privatekey is the value that you pointed, what they actually want to said is that address is a reduction of the public key, it is a 160 bit hash, so if you are capable to fin a collision on a 160 bits hash, that mean that you are capable to find any collision, regarless that those private keys are up to 256 bits
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 12, 2023, 10:20:10 PM Last edit: September 12, 2023, 11:12:17 PM by digaran |
|
from sympy import mod_inverse import secp256k1 as ice pub=ice.pub2upub('Here Compressed Public Key') N=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
k=mod_inverse(2,N) neg1=ice.point_negation(ice.scalar_multiplication(1))
def ters(Qx,Scalar): ScalarBin = str(bin(Scalar))[2:] le=len(ScalarBin) for i in range (1,le+1): if ScalarBin[le-i] == "0": Qx=ice.point_multiplication(k,Qx) else: Qx=ice.point_addition(Qx,neg1) Qx=ice.point_multiplication(k,Qx) return ice.point_to_cpub(Qx)
for x in range(1,65536): f= (ters(pub,x)) data= open(“halfpub.txt”,”a”) data.write(f+”\n”) data.close() Note this is where you decide how many bits should be reduced for x in range(1,65536): For example reducing 26 bits requires 67108864 to be generated, 1 of them is the correct 26 bit reduced key. Will you release for public to use? Yes this is my code, I can write bit reduction code in another way if you want. If you want, you can reduce bits by subtraction. I'm developing a new algorithm for downgrading from a known bit range to the bit range I want. When I complete it by giving only 1 correct pubkey, I will share it here. @lordfrs, I was thinking, why do we need to keep all the 65556 keys if we are reducing 16 bits? One other thing, if we multiply one of the keys from the end of the output file by 65556 we should see our target, correct? I haven't thought about on how to calculate, since we are subtracting one dividing by 2, one result if multiplied by 2^16 should reach the target or close to target, so why not discarding 90% of the generated keys and start multiplying the remaining 10% by 2^16? Could you add such operation to your script? I guess if we could operate on private keys instead of public keys using your script, we could reach some results, ( as a test of course ) To test with scalar only, I use this script : from sympy import mod_inverse N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
def ters(scalar): k = mod_inverse(2, N) scalar_bin = bin(scalar)[2:] result = 2 for i in range(len(scalar_bin)): if scalar_bin[i] == '0': result = (result * k) % N else: result = ((result * k) % N + N - 1) % N return hex(result)[2:].zfill(64)
for x in range(1, 20): f = ters(x) print(f) It was a lucky shot at AI generated code and it worked.😅 Btw, the first "result" in the script above, represents your target, I couldn't risk the AI to mess one thing she has done right. So result = 2, replace 2 with your own scalar in decimal.
|
🖤😏
|
|
|
kalos15btc
Jr. Member
Offline
Activity: 50
Merit: 1
|
 |
September 13, 2023, 09:53:17 PM |
|
By the way, and you know why their puzzle addresses were removed from the 161st? My thought is that this is the limit of public addresses. That is the further search in the theory goes on a circle.
Because all the funds from 161 through 255 were redundant (Bitcoin addresses only use 160 bits) the author of the puzzle moved all the funds from the 160-255 ranged down into the 1-160 range. It is explained up thread. Is it? I thought it uses almost 256 bits (the last possible private key is FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140) OH, HIII, Good morning from sympy import mod_inverse import secp256k1 as ice pub=ice.pub2upub('Here Compressed Public Key') N=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
k=mod_inverse(2,N) neg1=ice.point_negation(ice.scalar_multiplication(1))
def ters(Qx,Scalar): ScalarBin = str(bin(Scalar))[2:] le=len(ScalarBin) for i in range (1,le+1): if ScalarBin[le-i] == "0": Qx=ice.point_multiplication(k,Qx) else: Qx=ice.point_addition(Qx,neg1) Qx=ice.point_multiplication(k,Qx) return ice.point_to_cpub(Qx)
for x in range(1,65536): f= (ters(pub,x)) data= open(“halfpub.txt”,”a”) data.write(f+”\n”) data.close() Note this is where you decide how many bits should be reduced for x in range(1,65536): For example reducing 26 bits requires 67108864 to be generated, 1 of them is the correct 26 bit reduced key. Will you release for public to use? Yes this is my code, I can write bit reduction code in another way if you want. If you want, you can reduce bits by subtraction. I'm developing a new algorithm for downgrading from a known bit range to the bit range I want. When I complete it by giving only 1 correct pubkey, I will share it here. @lordfrs, I was thinking, why do we need to keep all the 65556 keys if we are reducing 16 bits? One other thing, if we multiply one of the keys from the end of the output file by 65556 we should see our target, correct? I haven't thought about on how to calculate, since we are subtracting one dividing by 2, one result if multiplied by 2^16 should reach the target or close to target, so why not discarding 90% of the generated keys and start multiplying the remaining 10% by 2^16? Could you add such operation to your script? I guess if we could operate on private keys instead of public keys using your script, we could reach some results, ( as a test of course ) To test with scalar only, I use this script : from sympy import mod_inverse N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
def ters(scalar): k = mod_inverse(2, N) scalar_bin = bin(scalar)[2:] result = 2 for i in range(len(scalar_bin)): if scalar_bin[i] == '0': result = (result * k) % N else: result = ((result * k) % N + N - 1) % N return hex(result)[2:].zfill(64)
for x in range(1, 20): f = ters(x) print(f) It was a lucky shot at AI generated code and it worked.😅 Btw, the first "result" in the script above, represents your target, I couldn't risk the AI to mess one thing she has done right. So result = 2, replace 2 with your own scalar in decimal. bro please stop replying with those comments copy past from chatgpt you are doing nothing except replying and talk too much, you are doing nothing for real men, stop it bro,  thank you
|
|
|
|
albert0bsd
|
 |
September 13, 2023, 11:24:16 PM Last edit: September 14, 2023, 05:04:05 AM by albert0bsd |
|
Personally i believe that this post just lost its purpose there is a lot of non-sense post or just some offtopic (Some moderator should close it) A lot of discutions if some slowly python code do this or that, if you have something substantial to contribute to that discussion, it would be best to start a new thread. In the field of the search of the solucion of this challenge there is no new algorithms or programs. We can resume the progress of the last year in the next. - Puzzle/challenge 64 solve by Unknown a year ago 2022-09-09 privatekey f7051f27b09112d4 - Puzzle/challenge 120 solve by unknown on 2023-02-27 and the private key remains unknown. - Puzzle/challenge 125 solve by unknown on 2023-07-09 and the private key remains unknown. And there is not clue of who solve those and what hardware they use, the wallet 3Emiwzxme7Mrj4d89uqohXNncnRM15YESs is still untouch Next challenges to be solve are 66 bits with just brute force/pool and puzzle 130 with kangaroo/pool  Best idea to solve puzzle 66 proposed on this thread is giving less priotiry to some repeated patterns. (But the expected time that the user give was ridiculus) And thats all.
|
|
|
|
GR Sasa
Member

Offline
Activity: 200
Merit: 14
|
 |
September 14, 2023, 08:37:21 AM Last edit: September 14, 2023, 09:32:52 AM by GR Sasa |
|
Just for more info:
The owner of "3Emiwzxme7Mrj4d89uqohXNncnRM15YESs" will cashout his coins when he finishes targeting other puzzles.
In the meantime, he's aiming for #130 right now, and probably after he solves it in the next months, he will cashout all his coins at once. (Unless he deceides again to go on for #135).
EDIT: Hello Satoshi, maybe you could motivate us by increasing the prize by 10x times again? We would be greatful. We know that you have the ability to do it, but we need your Motivation so programmers can wake up and continute their work.
Thank you, your friend GR Sasa
|
|
|
|
Kamoheapohea
Jr. Member
Offline
Activity: 48
Merit: 12
|
 |
September 14, 2023, 10:41:22 AM |
|
Just for more info:
The owner of "3Emiwzxme7Mrj4d89uqohXNncnRM15YESs" will cashout his coins when he finishes targeting other puzzles.
In the meantime, he's aiming for #130 right now, and probably after he solves it in the next months, he will cashout all his coins at once. (Unless he deceides again to go on for #135).
EDIT: Hello Satoshi, maybe you could motivate us by increasing the prize by 10x times again? We would be greatful. We know that you have the ability to do it, but we need your Motivation so programmers can wake up and continute their work.
Thank you, your friend GR Sasa
There is already more than enough motivation. I think he should withdraw all the remaining funds. He knows the practical limits now. There will be no suprises.
|
|
|
|
Dexed
Newbie
Offline
Activity: 16
Merit: 0
|
 |
September 14, 2023, 12:33:50 PM |
|
- Puzzle/challenge 64 solve by Unknown a year ago 2022-09-09 privatekey f7051f27b09112d4
If the solver is unknown, where is this private key came from?
|
|
|
|
_Counselor
Member

Offline
Activity: 111
Merit: 61
|
 |
September 14, 2023, 12:41:58 PM Merited by albert0bsd (1) |
|
- Puzzle/challenge 64 solve by Unknown a year ago 2022-09-09 privatekey f7051f27b09112d4
If the solver is unknown, where is this private key came from? When the solver move reward from 64 puzzle, it public key has been revealed; after that, finding a key in such a small range is trivial.
|
|
|
|
MisterZz
Newbie
Offline
Activity: 11
Merit: 1
|
 |
September 14, 2023, 07:55:38 PM |
|
By the way, and you know why their puzzle addresses were removed from the 161st? My thought is that this is the limit of public addresses. That is the further search in the theory goes on a circle.
Because all the funds from 161 through 255 were redundant (Bitcoin addresses only use 160 bits) the author of the puzzle moved all the funds from the 160-255 ranged down into the 1-160 range. It is explained up thread. Is it? I thought it uses almost 256 bits (the last possible private key is FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140) OH, HIII, Good morning from sympy import mod_inverse import secp256k1 as ice pub=ice.pub2upub('Here Compressed Public Key') N=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
k=mod_inverse(2,N) neg1=ice.point_negation(ice.scalar_multiplication(1))
def ters(Qx,Scalar): ScalarBin = str(bin(Scalar))[2:] le=len(ScalarBin) for i in range (1,le+1): if ScalarBin[le-i] == "0": Qx=ice.point_multiplication(k,Qx) else: Qx=ice.point_addition(Qx,neg1) Qx=ice.point_multiplication(k,Qx) return ice.point_to_cpub(Qx)
for x in range(1,65536): f= (ters(pub,x)) data= open(“halfpub.txt”,”a”) data.write(f+”\n”) data.close() Note this is where you decide how many bits should be reduced for x in range(1,65536): For example reducing 26 bits requires 67108864 to be generated, 1 of them is the correct 26 bit reduced key. Will you release for public to use? Yes this is my code, I can write bit reduction code in another way if you want. If you want, you can reduce bits by subtraction. I'm developing a new algorithm for downgrading from a known bit range to the bit range I want. When I complete it by giving only 1 correct pubkey, I will share it here. @lordfrs, I was thinking, why do we need to keep all the 65556 keys if we are reducing 16 bits? One other thing, if we multiply one of the keys from the end of the output file by 65556 we should see our target, correct? I haven't thought about on how to calculate, since we are subtracting one dividing by 2, one result if multiplied by 2^16 should reach the target or close to target, so why not discarding 90% of the generated keys and start multiplying the remaining 10% by 2^16? Could you add such operation to your script? I guess if we could operate on private keys instead of public keys using your script, we could reach some results, ( as a test of course ) To test with scalar only, I use this script : from sympy import mod_inverse N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
def ters(scalar): k = mod_inverse(2, N) scalar_bin = bin(scalar)[2:
bro please stop replying with those comments copy past from chatgpt you are doing nothing except replying and talk too much, you are doing nothing for real men, stop it bro, :) thank you [/quote]
He is learning maths and programming, so I think is not a waste of time.. Hello to everyone
|
|
|
|
nomachine
Member

Offline
Activity: 507
Merit: 38
|
 |
September 15, 2023, 07:01:29 AM |
|
Personally i believe that this post just lost its purpose there is a lot of non-sense post or just some offtopic (Some moderator should close it)
A lot of discutions if some slowly python code do this or that, if you have something substantial to contribute to that discussion, it would be best to start a new thread.
I think that you're right. That the further story is pointless. Regarding the speed of python programs. All are fast enough if someone knows the approximate range and public key. 
|
bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
Kostelooscoin
Member

Offline
Activity: 206
Merit: 16
|
 |
September 15, 2023, 11:17:57 AM |
|
Hello, I would like to know if it is possible to divide 2 public keys between them. ex: 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 / 02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5 with "secp256k1 as ice" or even something else?
|
|
|
|
mcdouglasx
|
 |
September 15, 2023, 12:52:57 PM |
|
Personally i believe that this post just lost its purpose there is a lot of non-sense post or just some offtopic (Some moderator should close it) A lot of discutions if some slowly python code do this or that, if you have something substantial to contribute to that discussion, it would be best to start a new thread. In the field of the search of the solucion of this challenge there is no new algorithms or programs. We can resume the progress of the last year in the next. - Puzzle/challenge 64 solve by Unknown a year ago 2022-09-09 privatekey f7051f27b09112d4 - Puzzle/challenge 120 solve by unknown on 2023-02-27 and the private key remains unknown. - Puzzle/challenge 125 solve by unknown on 2023-07-09 and the private key remains unknown. And there is not clue of who solve those and what hardware they use, the wallet 3Emiwzxme7Mrj4d89uqohXNncnRM15YESs is still untouch Next challenges to be solve are 66 bits with just brute force/pool and puzzle 130 with kangaroo/pool  Best idea to solve puzzle 66 proposed on this thread is giving less priotiry to some repeated patterns. (But the expected time that the user give was ridiculus) And thats all. I really don't share anything you say, if this post is deleted then there would only be more information scattered everywhere, according to what you say about python, you are right, it is slower than C, but it is excellent, even better than C for testing. of new ideas, the fact that you think that there are no new things is simply the result of your own mental fatigue, innovative ideas will always continue to exist, and yes, there is spam, I can't deny it, but on what website? there is no spam?
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 15, 2023, 01:00:44 PM Last edit: September 15, 2023, 01:11:53 PM by digaran |
|
Hello, I would like to know if it is possible to divide 2 public keys between them. ex: 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 / 02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5 with "secp256k1 as ice" or even something else?
I can give you the result for your example, here it is : Pub = 0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63 Private = 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1 But if we don't know the private key of at least one of the points, we can never directly reach any meaningful result. If we don't know k for one of the points, how can an algorithm/library know it? There are ways to indirectly divide 2 points by using a k greater than 1 and smaller than the other. It would be nonsense/off topic if I try to explain it, so I just save everybody the headache and cut the nonsense.😉
He is learning maths and programming, so I think is not a waste of time..
Hello to everyone
Agreed, we should never stop learning, for example learning how to quote someone properly, lol I mean OMG, look the mess you posted. Jokes aside, welcome to the jungle.🤝
|
🖤😏
|
|
|
albert0bsd
|
 |
September 15, 2023, 01:37:05 PM |
|
but it is excellent, even better than C for testing. of new ideas,
I agree with this, personally i think that testing and proof of concept are the only thing that python is good for. But once that the proof of concept is proven to be useful or good then is time to move to another language. If speed is determining for the algorithm the fact that you think that there are no new things is simply the result of your own mental fatigue
What F.. mental Fatigue? I already shared here a lot of programs, ideas, users share with me their ideas on telegram and there is nothing new... What i am tryting to said is if you have a vague idea without math background or without enough testing, then OPEN a new thread discuss their idea there and if the idea was proven to be good, then link that new topic here sharing a brief sumary of it and how to use.
|
|
|
|
mcdouglasx
|
 |
September 15, 2023, 01:51:44 PM |
|
Hello, I would like to know if it is possible to divide 2 public keys between them. ex: 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 / 02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5 with "secp256k1 as ice" or even something else?
I can give you the result for your example, here it is : Pub = 0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63 Private = 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1 But if we don't know the private key of at least one of the points, we can never directly reach any meaningful result. If we don't know k for one of the points, how can an algorithm/library know it? The division does not depend directly on the private keys, each public key is itself the representation of a number. There are ten (10) numbers represented by these symbols. 0123456789 in hex it would be 16 0123456789abcdef in public key are 57896044618658097711785492504343953926418782139537452191302581570759080747168 (including decimals, although these are not valid for bitcoin, they exist and this is what makes division difficult) represented differently (public keys), and this is the complicated part of the matter.
|
|
|
|
mcdouglasx
|
 |
September 15, 2023, 04:25:21 PM |
|
but it is excellent, even better than C for testing. of new ideas,
I agree with this, personally i think that testing and proof of concept are the only thing that python is good for. But once that the proof of concept is proven to be useful or good then is time to move to another language. If speed is determining for the algorithm the fact that you think that there are no new things is simply the result of your own mental fatigue
What F.. mental Fatigue? I already shared here a lot of programs, ideas, users share with me their ideas on telegram and there is nothing new... What i am tryting to said is if you have a vague idea without math background or without enough testing, then OPEN a new thread discuss their idea there and if the idea was proven to be good, then link that new topic here sharing a brief sumary of it and how to use. What I want to say is that information should not be repressed, if information was repressed you could not have made your software, your software is made based on the work of others, like everything in life, one idea leads to another and so on until it is put to practical use. If the basic scripts bother you, ignore them (if you live in the city and the pedestrians bother you, you cannot eliminate the pedestrians, the solution is to move out of the city) and come back later, but we cannot expect others to have our own knowledge and denigrate them for not Know, we all ignore something in life.
|
|
|
|
MisterZz
Newbie
Offline
Activity: 11
Merit: 1
|
 |
September 15, 2023, 08:29:34 PM |
|
Hello, I would like to know if it is possible to divide 2 public keys between them. ex: 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 / 02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5 with "secp256k1 as ice" or even something else?
I can give you the result for your example, here it is : Pub = 0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63 Private = 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1 But if we don't know the private key of at least one of the points, we can never directly reach any meaningful result. If we don't know k for one of the points, how can an algorithm/library know it? There are ways to indirectly divide 2 points by using a k greater than 1 and smaller than the other. It would be nonsense/off topic if I try to explain it, so I just save everybody the headache and cut the nonsense.😉
He is learning maths and programming, so I think is not a waste of time..
Hello to everyone
Agreed, we should never stop learning, for example learning how to quote someone properly, lol I mean OMG, look the mess you posted. Jokes aside, welcome to the jungle.🤝 LOL I havn’t posted on forums in a long time, since AIO’s time I would say. Give me sometime 😌 Something I had made 😁 https://i.ibb.co/8m9sHPN/puzzle.png
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 16, 2023, 04:00:55 AM |
|
Oh, look another useless and extremely slow python script which can only be used to test and then solve puzzle keys.😉, Idea was mine, I had to make a few changes, but the code is generated by the use of deep.ai chat bot. And I have no other way than copy paste it here, so don't take offence for it. from sympy import mod_inverse
N = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
def ters(scalar, target): k = mod_inverse(2, N) scalar_bin = bin(scalar)[2:] for i in range(len(scalar_bin)): if scalar_bin[i] == '0': result = (target * k) % N else: result = ((target * k) % N + N - 1) % N target = result return result
target1 = 508467739815150526153708316710194877073 target2 = 73909945130129581315154379935980065
print("Target results:") for x in range(1, 10): result1 = ters(x, target1) print(f"{x}-T1: {result1:x}") for x in range(1, 10): result2 = ters(x, target2) print(f"{x}-T2: {result2:x}") for x in range(1, 10): result1 = ters(x, target1) result2 = ters(x, target2) subtraction = (result1 - result2) % N print(f"{x}-Sub: {subtraction:x}") Think of target 1 as a puzzle key, and target 2 is known, if we subtract target2 from target1 ( puzzle key) before using the script, we would have this third ( also unknown ) key : 508393829870020396572393162330258897008 And yeah, that's it, I'm not gonna keep talking to actually reach the real puzzle key.😅
I hope nobody takes any offence because I talk too much, if they do, IDRC. 😘 Ps, I'm wearing it as avatar @MisterZz
|
🖤😏
|
|
|
bestie1549
Jr. Member
Offline
Activity: 75
Merit: 5
|
 |
September 16, 2023, 07:59:50 AM |
|
but it is excellent, even better than C for testing. of new ideas,
I agree with this, personally i think that testing and proof of concept are the only thing that python is good for. But once that the proof of concept is proven to be useful or good then is time to move to another language. If speed is determining for the algorithm the fact that you think that there are no new things is simply the result of your own mental fatigue
What F.. mental Fatigue? I already shared here a lot of programs, ideas, users share with me their ideas on telegram and there is nothing new... What i am tryting to said is if you have a vague idea without math background or without enough testing, then OPEN a new thread discuss their idea there and if the idea was proven to be good, then link that new topic here sharing a brief sumary of it and how to use. I have this code already which is not an idea for now but a work in progress but we might be needing to know if it's a good idea #include "SECP256k1.h" #include "Point.h" #include "sha256.h" #include "Int.h" #include "ripemd160.h" #include <iostream> #include <iomanip> #include <cstring> #include <chrono> #include <thread> #include <mutex> #include <atomic> #include <vector> #include <fstream> #include <sstream> #include <ctime> #include <boost/multiprecision/cpp_int.hpp> #include <gmpxx.h>
constexpr uint64_t START_VALUE = 576565752303423488ULL; constexpr uint64_t END_VALUE = 900'000'000'000'000'000ULL; constexpr uint64_t INCREMENT = 1ULL;
// Define a range of factors constexpr double MIN_FACTOR = 64.0; constexpr double MAX_FACTOR = 1028.0; constexpr double FACTOR_INCREMENT = 1.00;
std::atomic<uint64_t> currentValue(START_VALUE); std::atomic<uint64_t> totalKeys(0); std::mutex printMutex; std::mutex resultMutex; std::vector<std::array<uint8_t, 20>> ripemd160Hashes;
std::chrono::time_point<std::chrono::system_clock> startTime; std::atomic<bool> matchFound(false); std::string currentHexPrivateKey;
void loadRIPEMD160Hashes() { std::ifstream file("wallets.txt"); if (file.is_open()) { std::string hexHash; while (file >> hexHash) { if (hexHash.length() != 40) { std::cerr << "Invalid RIPEMD160 hash length: " << hexHash.length() << std::endl; continue; // Skip invalid hashes }
std::array<uint8_t, 20> hash; for (int i = 0; i < 20; ++i) { std::string byteHex = hexHash.substr(2 * i, 2); hash[i] = static_cast<uint8_t>(std::stoi(byteHex, nullptr, 16)); }
ripemd160Hashes.push_back(hash); } file.close(); std::cout << "Loaded " << ripemd160Hashes.size() << " RIPEMD160 hashes from file." << std::endl; } }
std::string hexBytesToHexString(const uint8_t* bytes, size_t length) { std::stringstream ss; ss << std::hex << std::setfill('0'); for (size_t i = 0; i < length; ++i) { ss << std::setw(2) << static_cast<int>(bytes[i]); } return ss.str(); }
bool hasMinimumMatchingCharacters(const uint8_t (&hash)[20]) { for (const std::array<uint8_t, 20>& loadedHash : ripemd160Hashes) { bool isMatch = true; for (int j = 0; j < 19; ++j) { // Loop through the first 5 bytes (40 bits) if (hash[j] != loadedHash[j]) { isMatch = false; break; // If any character doesn't match, stop checking } } if (isMatch) { return true; } } return false; }
void printProgress() { startTime = std::chrono::system_clock::now();
while (!matchFound.load(std::memory_order_relaxed)) { { std::lock_guard<std::mutex> lock(resultMutex);
auto now = std::chrono::system_clock::now(); auto elapsed = std::chrono::duration_cast<std::chrono::seconds>(now - startTime); double keysPerSecond = static_cast<double>(totalKeys.load()) / elapsed.count();
std::cout << "\rTime: " << elapsed.count() << "s, Keys: " << totalKeys.load() << ", Keys/s: " << std::fixed << std::setprecision(5) << keysPerSecond << ", Current: " << currentValue.load() << ", Priv Key: " << currentHexPrivateKey << std::flush; } std::this_thread::sleep_for(std::chrono::seconds(5)); } }
void counterWorker(int threadId, Secp256K1& secp256k1, int numThreads) { mpz_class current(START_VALUE + threadId * INCREMENT);
while (current <= END_VALUE) { for (double factor = MIN_FACTOR; factor <= MAX_FACTOR; factor += FACTOR_INCREMENT) { mpz_class result = current * static_cast<uint64_t>(factor);
std::string hexPrivateKey = result.get_str(16); // Get hex representation directly currentHexPrivateKey = hexPrivateKey;
Int privateKey; privateKey.SetBase16(hexPrivateKey.c_str());
Point publicKey = secp256k1.ComputePublicKey(&privateKey);
uint8_t compressedPublicKey[33]; secp256k1.GetPublicKeyRaw(true, publicKey, reinterpret_cast<char*>(compressedPublicKey));
uint8_t publicKeyHash[32]; sha256_33(compressedPublicKey, publicKeyHash);
uint8_t ripemd160Hash[20]; ripemd160(publicKeyHash, 32, ripemd160Hash);
if (hasMinimumMatchingCharacters(ripemd160Hash)) { std::string matchedPrivateKey = hexPrivateKey; // Store the private key for printing std::string matchedRipemd160 = hexBytesToHexString(ripemd160Hash, 20); // Convert RIPEMD160 to hex string
{ std::lock_guard<std::mutex> lock(printMutex); std::cout << "\nMatching RIPEMD160 hash found. Private Key: " << matchedPrivateKey << ", RIPEMD160: " << matchedRipemd160 << std::endl; }
{ std::ofstream foundFile("found.txt", std::ios::app); // Append mode if (foundFile.is_open()) { foundFile << "Matched Private Key: " << matchedPrivateKey << ", RIPEMD160: " << matchedRipemd160 << std::endl; foundFile.close(); } } } }
totalKeys.fetch_add(1);
// Convert the mpz_class to uint64_t and update the currentValue atomically currentValue.store(static_cast<uint64_t>(current.get_ui()), std::memory_order_relaxed);
current += INCREMENT * numThreads; }
// Signal that this thread has completed its work matchFound.store(true, std::memory_order_relaxed); }
int main() { loadRIPEMD160Hashes();
Secp256K1 secp256k1; secp256k1.Init();
std::vector<std::thread> threads;
// Start the progress printing thread std::thread progressThread(printProgress);
const int numThreads = std::thread::hardware_concurrency(); for (int i = 0; i < numThreads; ++i) { threads.emplace_back(counterWorker, i, std::ref(secp256k1), numThreads); }
for (auto& thread : threads) { thread.join(); }
// Wait for the progress thread to complete progressThread.join();
std::cout << std::endl;
return 0; }
now I get 1.5million/s if I have 1 factor on my 16 threaded pc which I normally get nothing less than 55 million/s on keyhunt compress and exhomorphism the more the factor to be multiplied the less the keys/s and come to think of it, so many private keys are just numbers and these numbers have factors except it's a prime number Now I can solve puzzle 65 without the public key in just a few seconds if you have the right factors in place we need to see if we can get this code working on GPU which will also make so much momentum and also if we can get it faster on cpu it's just an idea in progress and I don't know if it's a good idea that's why I have decided to put it on here
|
|
|
|
albert0bsd
|
 |
September 16, 2023, 10:58:30 PM Last edit: September 17, 2023, 06:41:38 PM by albert0bsd |
|
Now I can solve puzzle 65 without the public key in just a few seconds if you have the right factors in place
Hi, nice code  The prime numbers approach is a good idea, I also try it some time ago, but it only works as you said if you have the right factors if no then the brute force approach of the prime numbers is also some exhaustive, we can try some small and common factors but those don't provide much speed, but if the prime factors aren't common then the probabilities of some prime number is factor of our key are very low probabilities. IMHO this prime number approach is a nice as proof of concept but with some low success
|
|
|
|
|