mcdouglasx
Member
Offline
Activity: 237
Merit: 53
New ideas will be criticized and then admired.
|
|
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?
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
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
Member
Offline
Activity: 237
Merit: 53
New ideas will be criticized and then admired.
|
|
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.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
mcdouglasx
Member
Offline
Activity: 237
Merit: 53
New ideas will be criticized and then admired.
|
|
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.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
MisterZz
Newbie
Offline
Activity: 2
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: 899
🖤😏
|
|
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
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
September 17, 2023, 06:26:03 PM Last edit: September 17, 2023, 11:57:48 PM by digaran |
|
Can you please explain in details for us noobs how this works and what we need to change when searching for our desired keys? Also what do you mean by solving 65 without needing a public key, do you search for address or something? Do you happen to have a python code for it, even if it's slow. Or isn't it better to ask ai to convert the code into python? Is that even possible?
Edit: Here is a working script which divides 2 points by start/end range and then subtracts the results of division from each other. No external module/ library needed, just run the script. # Define the EllipticCurve class class EllipticCurve: def __init__(self, a, b, p): self.a = a self.b = b self.p = p
def contains(self, point): x, y = point.x, point.y return (y * y) % self.p == (x * x * x + self.a * x + self.b) % self.p
def __str__(self): return f"y^2 = x^3 + {self.a}x + {self.b} mod {self.p}"
# Define the Point class class Point: def __init__(self, x, y, curve): self.x = x self.y = y self.curve = curve
def __eq__(self, other): return self.x == other.x and self.y == other.y and self.curve == other.curve
def __ne__(self, other): return not self == other
def __add__(self, other): if self.curve != other.curve: raise ValueError("Cannot add points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
if self.x == other.x and self.y != other.y: return Point.infinity(self.curve)
p = self.curve.p s = 0 if self == other: s = ((3 * self.x * self.x + self.curve.a) * pow(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * pow(other.x - self.x, -1, p)) % p
x = (s * s - self.x - other.x) % p y = (s * (self.x - x) - self.y) % p
return Point(x, y, self.curve)
def __sub__(self, other): if self.curve != other.curve: raise ValueError("Cannot subtract points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
return self + Point(other.x, (-other.y) % self.curve.p, self.curve)
def __mul__(self, n): if not isinstance(n, int): raise ValueError("Multiplication is defined for integers only")
n = n % (self.curve.p - 1) res = Point.infinity(self.curve) addend = self
while n: if n & 1: res += addend
addend += addend n >>= 1
return res
def __str__(self): return f"({self.x}, {self.y}) on {self.curve}"
@staticmethod def from_hex(s, curve): if len(s) == 66 and s.startswith("02") or s.startswith("03"): compressed = True elif len(s) == 130 and s.startswith("04"): compressed = False else: raise ValueError("Hex string is not a valid compressed or uncompressed point")
if compressed: is_odd = s.startswith("03") x = int(s[2:], 16)
# Calculate y-coordinate from x and parity bit y_square = (x * x * x + curve.a * x + curve.b) % curve.p y = pow(y_square, (curve.p + 1) // 4, curve.p) if is_odd != (y & 1): y = -y % curve.p
return Point(x, y, curve) else: s_bytes = bytes.fromhex(s) uncompressed = s_bytes[0] == 4 if not uncompressed: raise ValueError("Only uncompressed or compressed points are supported")
num_bytes = len(s_bytes) // 2 x_bytes = s_bytes[1 : num_bytes + 1] y_bytes = s_bytes[num_bytes + 1 :]
x = int.from_bytes(x_bytes, byteorder="big") y = int.from_bytes(y_bytes, byteorder="big")
return Point(x, y, curve)
def to_hex(self, compressed=True): if self.x is None and self.y is None: return "00" elif compressed: prefix = "03" if self.y & 1 else "02" return prefix + hex(self.x)[2:].zfill(64) else: x_hex = hex(self.x)[2:].zfill(64) y_hex = hex(self.y)[2:].zfill(64) return "04" + x_hex + y_hex
@staticmethod def infinity(curve): return Point(None, None, curve)
# Define the ec_mul function def ec_mul(point, scalar, base_point): result = Point.infinity(point.curve) addend = point
while scalar: if scalar & 1: result += addend
addend += addend scalar >>= 1
return result
# Define the ec_operations function def ec_operations(start_range, end_range, target_1, target_2, curve): # Define parameters for secp256k1 curve n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 G = Point( 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8, curve )
# Open the files for writing with open("target1_division_results.txt", "a") as file1, \ open("target2_division_results.txt", "a") as file2, \ open("subtract_results.txt", "a") as file3:
for i in range(start_range, end_range + 1): try: # Compute the inverse of i modulo n i_inv = pow(i, n-2, n)
# Divide the targets by i modulo n result_1 = ec_mul(target_1, i_inv, G) result_2 = ec_mul(target_2, i_inv, G)
# Subtract the results sub_result = result_2 - result_1
# Write the results to separate files file1.write(f"{result_1.to_hex()}\n") file2.write(f"{result_2.to_hex()}\n") file3.write(f"Subtracting results for {i}:\n") file3.write(f"Target 1 / {i}: {result_1.to_hex()}\n") file3.write(f"Target 2 / {i}: {result_2.to_hex()}\n") file3.write(f"Subtraction: {sub_result.to_hex()}\n") file3.write("="*50 + "\n")
print(f"Completed calculation for divisor {i}") except ZeroDivisionError: print(f"Error: division by zero for {i}")
print("Calculation completed. Results saved in separate files.")
if __name__ == "__main__": # Set the targets and range for the operations curve = EllipticCurve(0, 7, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) target_1 = Point.from_hex("0230210C23B1A047BC9BDBB13448E67DEDDC108946DE6DE639BCC75D47C0216B1B", curve) target_2 = Point.from_hex("02F6B787195159544330085C6014DBA627FF5B14F3203FF05D12482F76261F4FC3", curve) start_range = 2 end_range = 200
ec_operations(start_range, end_range, target_1, target_2, curve) Note that on previous page there is one similar script but operating over scalar not points. Also the credit for the division by a range part goes to @mcdouglasx, the rest goes to anyone here helping and of course the biggest idiot AI made by mankind ( all of them are for now ) aka deep.ai chatbot. As a test sample I have used puzzle 65 in target1 and target 2 is an offset after subtracting the following scalar from puzzle 65. 0x0000000000000000000000000000000000000000000000020000000000000000 The script is really slow because I had problem using multiprocessing in the code, so I decided to remove it, it also first calculates everything and then writes them to the files, since I'm not a coder, I don't know whether doing that requires more RAM or not. Feel free to optimize, improve and add other functions/operations as you see fit and please do share. Thanks.
|
🖤😏
|
|
|
BarryWood
Newbie
Offline
Activity: 4
Merit: 0
|
|
September 19, 2023, 12:09:26 PM |
|
Hi everyone, I've been reading your forum for long about this challenge and trying my luck for a long time without finding anything! So I've joined you hopefully to work as a group and split the prize.
I've got two questions please: 1) Where can i find the already scanned ranges for puzzle 66? so i won't scan it again! 2) Where can i share the ranges i've already scanned?
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
September 19, 2023, 01:52:28 PM |
|
Hi everyone, I've been reading your forum for long about this challenge and trying my luck for a long time without finding anything! So I've joined you hopefully to work as a group and split the prize.
I've got two questions please: 1) Where can i find the already scanned ranges for puzzle 66? so i won't scan it again! 2) Where can i share the ranges i've already scanned?
Oh hey Barry (west allen ) lol. Welcome to the jungle club of pointless puzzle hunters. There are some pools searching in ranges which you can join, but I won't link to them because I'm not sure whether they are safe to use or not, but if you search for the keyword pool on this thread, you will find their posts, look at top right corner search box, search while you are inside this thread. Now I have questions, what hardware do you have? What have you learned about elliptic curve cryptography? I hope you realize this is not a game only for entertainment and finding free bitcoins, the man has spared around $30 million in bitcoin for reasons other than fun and playing riddles with community members. You should know, this is a world class programming/ mathematical challenge, worth more than 30 nobel prizes combined.🤑😉
|
🖤😏
|
|
|
nomachine
Member
Offline
Activity: 245
Merit: 12
|
|
September 19, 2023, 02:33:04 PM |
|
Can you please explain in details for us noobs how this works and what we need to change when searching for our desired keys? Also what do you mean by solving 65 without needing a public key, do you search for address or something? Do you happen to have a python code for it, even if it's slow. Or isn't it better to ask ai to convert the code into python? Is that even possible?
Edit: Here is a working script which divides 2 points by start/end range and then subtracts the results of division from each other. No external module/ library needed, just run the script. # Define the EllipticCurve class class EllipticCurve: def __init__(self, a, b, p): self.a = a self.b = b self.p = p
def contains(self, point): x, y = point.x, point.y return (y * y) % self.p == (x * x * x + self.a * x + self.b) % self.p
def __str__(self): return f"y^2 = x^3 + {self.a}x + {self.b} mod {self.p}"
# Define the Point class class Point: def __init__(self, x, y, curve): self.x = x self.y = y self.curve = curve
def __eq__(self, other): return self.x == other.x and self.y == other.y and self.curve == other.curve
def __ne__(self, other): return not self == other
def __add__(self, other): if self.curve != other.curve: raise ValueError("Cannot add points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
if self.x == other.x and self.y != other.y: return Point.infinity(self.curve)
p = self.curve.p s = 0 if self == other: s = ((3 * self.x * self.x + self.curve.a) * pow(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * pow(other.x - self.x, -1, p)) % p
x = (s * s - self.x - other.x) % p y = (s * (self.x - x) - self.y) % p
return Point(x, y, self.curve)
def __sub__(self, other): if self.curve != other.curve: raise ValueError("Cannot subtract points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
return self + Point(other.x, (-other.y) % self.curve.p, self.curve)
def __mul__(self, n): if not isinstance(n, int): raise ValueError("Multiplication is defined for integers only")
n = n % (self.curve.p - 1) res = Point.infinity(self.curve) addend = self
while n: if n & 1: res += addend
addend += addend n >>= 1
return res
def __str__(self): return f"({self.x}, {self.y}) on {self.curve}"
@staticmethod def from_hex(s, curve): if len(s) == 66 and s.startswith("02") or s.startswith("03"): compressed = True elif len(s) == 130 and s.startswith("04"): compressed = False else: raise ValueError("Hex string is not a valid compressed or uncompressed point")
if compressed: is_odd = s.startswith("03") x = int(s[2:], 16)
# Calculate y-coordinate from x and parity bit y_square = (x * x * x + curve.a * x + curve.b) % curve.p y = pow(y_square, (curve.p + 1) // 4, curve.p) if is_odd != (y & 1): y = -y % curve.p
return Point(x, y, curve) else: s_bytes = bytes.fromhex(s) uncompressed = s_bytes[0] == 4 if not uncompressed: raise ValueError("Only uncompressed or compressed points are supported")
num_bytes = len(s_bytes) // 2 x_bytes = s_bytes[1 : num_bytes + 1] y_bytes = s_bytes[num_bytes + 1 :]
x = int.from_bytes(x_bytes, byteorder="big") y = int.from_bytes(y_bytes, byteorder="big")
return Point(x, y, curve)
def to_hex(self, compressed=True): if self.x is None and self.y is None: return "00" elif compressed: prefix = "03" if self.y & 1 else "02" return prefix + hex(self.x)[2:].zfill(64) else: x_hex = hex(self.x)[2:].zfill(64) y_hex = hex(self.y)[2:].zfill(64) return "04" + x_hex + y_hex
@staticmethod def infinity(curve): return Point(None, None, curve)
# Define the ec_mul function def ec_mul(point, scalar, base_point): result = Point.infinity(point.curve) addend = point
while scalar: if scalar & 1: result += addend
addend += addend scalar >>= 1
return result
# Define the ec_operations function def ec_operations(start_range, end_range, target_1, target_2, curve): # Define parameters for secp256k1 curve n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 G = Point( 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8, curve )
# Open the files for writing with open("target1_division_results.txt", "a") as file1, \ open("target2_division_results.txt", "a") as file2, \ open("subtract_results.txt", "a") as file3:
for i in range(start_range, end_range + 1): try: # Compute the inverse of i modulo n i_inv = pow(i, n-2, n)
# Divide the targets by i modulo n result_1 = ec_mul(target_1, i_inv, G) result_2 = ec_mul(target_2, i_inv, G)
# Subtract the results sub_result = result_2 - result_1
# Write the results to separate files file1.write(f"{result_1.to_hex()}\n") file2.write(f"{result_2.to_hex()}\n") file3.write(f"Subtracting results for {i}:\n") file3.write(f"Target 1 / {i}: {result_1.to_hex()}\n") file3.write(f"Target 2 / {i}: {result_2.to_hex()}\n") file3.write(f"Subtraction: {sub_result.to_hex()}\n") file3.write("="*50 + "\n")
print(f"Completed calculation for divisor {i}") except ZeroDivisionError: print(f"Error: division by zero for {i}")
print("Calculation completed. Results saved in separate files.")
if __name__ == "__main__": # Set the targets and range for the operations curve = EllipticCurve(0, 7, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) target_1 = Point.from_hex("0230210C23B1A047BC9BDBB13448E67DEDDC108946DE6DE639BCC75D47C0216B1B", curve) target_2 = Point.from_hex("02F6B787195159544330085C6014DBA627FF5B14F3203FF05D12482F76261F4FC3", curve) start_range = 2 end_range = 200
ec_operations(start_range, end_range, target_1, target_2, curve) Note that on previous page there is one similar script but operating over scalar not points. Also the credit for the division by a range part goes to @mcdouglasx, the rest goes to anyone here helping and of course the biggest idiot AI made by mankind ( all of them are for now ) aka deep.ai chatbot. As a test sample I have used puzzle 65 in target1 and target 2 is an offset after subtracting the following scalar from puzzle 65. 0x0000000000000000000000000000000000000000000000020000000000000000 The script is really slow because I had problem using multiprocessing in the code, so I decided to remove it, it also first calculates everything and then writes them to the files, since I'm not a coder, I don't know whether doing that requires more RAM or not. Feel free to optimize, improve and add other functions/operations as you see fit and please do share. Thanks. import gmpy2 as mpz from gmpy2 import powmod
# Define the EllipticCurve class class EllipticCurve: def __init__(self, a, b, p): self.a = mpz.mpz(a) self.b = mpz.mpz(b) self.p = mpz.mpz(p)
def contains(self, point): x, y = point.x, point.y return (y * y) % self.p == (x * x * x + self.a * x + self.b) % self.p
def __str__(self): return f"y^2 = x^3 + {self.a}x + {self.b} mod {self.p}"
# Define the Point class class Point: def __init__(self, x, y, curve): self.x = mpz.mpz(x) self.y = mpz.mpz(y) self.curve = curve
def __eq__(self, other): return self.x == other.x and self.y == other.y and self.curve == other.curve
def __ne__(self, other): return not self == other
def __add__(self, other): if self.curve != other.curve: raise ValueError("Cannot add points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
if self.x == other.x and self.y != other.y: return Point.infinity(self.curve)
p = self.curve.p s = 0 if self == other: s = ((3 * self.x * self.x + self.curve.a) * pow(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * pow(other.x - self.x, -1, p)) % p
x = (s * s - self.x - other.x) % p y = (s * (self.x - x) - self.y) % p
return Point(x, y, self.curve)
def __sub__(self, other): if self.curve != other.curve: raise ValueError("Cannot subtract points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
return self + Point(other.x, (-other.y) % self.curve.p, self.curve)
def __mul__(self, n): if not isinstance(n, int): raise ValueError("Multiplication is defined for integers only")
n = n % (self.curve.p - 1) res = Point.infinity(self.curve) addend = self
while n: if n & 1: res += addend
addend += addend n >>= 1
return res
def __str__(self): return f"({self.x}, {self.y}) on {self.curve}"
@staticmethod def from_hex(s, curve): if len(s) == 66 and s.startswith("02") or s.startswith("03"): compressed = True elif len(s) == 130 and s.startswith("04"): compressed = False else: raise ValueError("Hex string is not a valid compressed or uncompressed point")
if compressed: is_odd = s.startswith("03") x = mpz.mpz(s[2:], 16)
# Calculate y-coordinate from x and parity bit y_square = (x * x * x + curve.a * x + curve.b) % curve.p y = powmod(y_square, (curve.p + 1) // 4, curve.p) if is_odd != (y & 1): y = -y % curve.p
return Point(x, y, curve) else: s_bytes = bytes.fromhex(s) uncompressed = s_bytes[0] == 4 if not uncompressed: raise ValueError("Only uncompressed or compressed points are supported")
num_bytes = len(s_bytes) // 2 x_bytes = s_bytes[1 : num_bytes + 1] y_bytes = s_bytes[num_bytes + 1 :]
x = mpz.mpz(int.from_bytes(x_bytes, byteorder="big")) y = mpz.mpz(int.from_bytes(y_bytes, byteorder="big"))
return Point(x, y, curve)
def to_hex(self, compressed=True): if self.x is None and self.y is None: return "00" elif compressed: prefix = "03" if self.y & 1 else "02" return prefix + hex(self.x)[2:].zfill(64) else: x_hex = hex(self.x)[2:].zfill(64) y_hex = hex(self.y)[2:].zfill(64) return "04" + x_hex + y_hex
@staticmethod def infinity(curve): return Point(-1, -1, curve)
# Define the ec_mul function def ec_mul(point, scalar, base_point): result = Point.infinity(point.curve) addend = point
while scalar: if scalar & 1: result += addend
addend += addend scalar >>= 1
return result
# Define the ec_operations function def ec_operations(start_range, end_range, target_1, target_2, curve): # Define parameters for secp256k1 curve n = mpz.mpz("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141") G = Point( mpz.mpz("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"), mpz.mpz("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"), curve )
# Open the files for writing with open("target1_division_results.txt", "a") as file1, \ open("target2_division_results.txt", "a") as file2, \ open("subtract_results.txt", "a") as file3:
for i in range(start_range, end_range + 1): try: # Compute the inverse of i modulo n i_inv = powmod(i, n-2, n)
# Divide the targets by i modulo n result_1 = ec_mul(target_1, i_inv, G) result_2 = ec_mul(target_2, i_inv, G)
# Subtract the results sub_result = result_2 - result_1
# Write the results to separate files file1.write(f"{result_1.to_hex()}\n") file2.write(f"{result_2.to_hex()}\n") file3.write(f"Subtracting results for {i}:\n") file3.write(f"Target 1 / {i}: {result_1.to_hex()}\n") file3.write(f"Target 2 / {i}: {result_2.to_hex()}\n") file3.write(f"Subtraction: {sub_result.to_hex()}\n") file3.write("="*50 + "\n")
print(f"Completed calculation for divisor {i}") except ZeroDivisionError: print(f"Error: division by zero for {i}")
print("Calculation completed. Results saved in separate files.")
if __name__ == "__main__": # Set the targets and range for the operations curve = EllipticCurve( mpz.mpz(0), mpz.mpz(7), mpz.mpz("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F") ) target_1 = Point.from_hex("0230210C23B1A047BC9BDBB13448E67DEDDC108946DE6DE639BCC75D47C0216B1B", curve) target_2 = Point.from_hex("02F6B787195159544330085C6014DBA627FF5B14F3203FF05D12482F76261F4FC3", curve) start_range = 2 end_range = 200
ec_operations(start_range, end_range, target_1, target_2, curve)
The first thing I do is to install gmpy2 in everything where large numbers are used. gmpy2 is a highly optimized library for arbitrary-precision arithmetic. It is written in C and provides low-level access to the GMP (GNU Multiple Precision) library, which is known for its efficiency in handling large integers.
|
|
|
|
_Counselor
Member
Offline
Activity: 107
Merit: 61
|
|
September 19, 2023, 05:45:22 PM |
|
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 I tried and tested similar approach a year ago. The best result I could achieve is O(N/4) complexity for a random number, but only if this number is composite. This is 4x better than bruteforce, but it's requires a lot of scalar multiplications, therefore optimized sequential key generation is still faster despite the higher complexity of O(N).
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
September 19, 2023, 07:04:47 PM |
|
import SECP256k1 import Point import sha256 import Int import ripemd160 import boost.multiprecision.cpp_int as cpp_int import gmpy2 as mpz import math import time import threading import os
START_VALUE = 576565752303423488 END_VALUE = 900000000000000000 INCREMENT = 1
# Define a range of factors MIN_FACTOR = 64.0 MAX_FACTOR = 1028.0 FACTOR_INCREMENT = 1.00
currentValue = mpz.mpz(START_VALUE) totalKeys = 0 printMutex = threading.Lock() resultMutex = threading.Lock() ripemd160Hashes = []
startTime = None matchFound = False currentHexPrivateKey = ""
def loadRIPEMD160Hashes(): with open("wallets.txt", "r") as file: for line in file: hexHash = line.strip() if len(hexHash) != 40: print(f"Invalid RIPEMD160 hash length: {len(hexHash)}") continue
hash = bytearray.fromhex(hexHash) ripemd160Hashes.append(hash)
print(f"Loaded {len(ripemd160Hashes)} RIPEMD160 hashes from file.")
def hexBytesToHexString(bytes): return "".join([format(b, "02x") for b in bytes])
def hasMinimumMatchingCharacters(hash): for loadedHash in ripemd160Hashes: isMatch = True for j in range(19): # 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
def printProgress(): global startTime startTime = time.time()
while not matchFound: elapsed = time.time() - startTime keysPerSecond = totalKeys / elapsed if elapsed != 0 else 0
with resultMutex: print(f"\rTime: {int(elapsed)}s, Keys: {totalKeys}, Keys/s: {round(keysPerSecond, 5)}, Current: {currentValue}, Priv Key: {currentHexPrivateKey}", end="") time.sleep(5)
def counterWorker(threadId, secp256k1, numThreads): global currentHexPrivateKey, matchFound, startTime, totalKeys, currentValue current = mpz.mpz(START_VALUE + threadId * INCREMENT)
while current <= END_VALUE: for factor in range(int(MIN_FACTOR), int(MAX_FACTOR) + 1, int(FACTOR_INCREMENT)): result = current * int(factor) hexPrivateKey = format(int(result), "x") # Get hex representation directly currentHexPrivateKey = hexPrivateKey
privateKey = Int.Int(0) privateKey.SetBase16(hexPrivateKey)
publicKey = secp256k1.ComputePublicKey(privateKey)
compressedPublicKey = bytearray(secp256k1.GetPublicKeyRaw(True, publicKey)) publicKeyHash = sha256.sha256(compressedPublicKey)
ripemd160Hash = ripemd160.ripemd160(publicKeyHash)
if hasMinimumMatchingCharacters(ripemd160Hash): matchedPrivateKey = hexPrivateKey # Store the private key for printing matchedRipemd160 = hexBytesToHexString(ripemd160Hash) # Convert RIPEMD160 to hex string
with printMutex: print(f"\nMatching RIPEMD160 hash found. Private Key: {matchedPrivateKey}, RIPEMD160: {matchedRipemd160}")
with open("found.txt", "a") as foundFile: foundFile.write(f"Matched Private Key: {matchedPrivateKey}, RIPEMD160: {matchedRipemd160}\n")
matchFound = True break totalKeys += 1
# Update the currentValue atomically with resultMutex: currentValue = current
current = current + (INCREMENT * numThreads)
# Signal that this thread has completed its work with resultMutex: matchFound = True
def main(): global matchFound, totalKeys, currentValue
loadRIPEMD160Hashes()
secp256k1 = SECP256k1.SECP256k1() secp256k1.Init()
threads = [] numThreads = os.cpu_count()
# Start the progress printing thread progressThread = threading.Thread(target=printProgress) progressThread.start()
for i in range(numThreads): threads.append(threading.Thread(target=counterWorker, args=(i, secp256k1, numThreads))) for thread in threads: thread.start()
for thread in threads: thread.join()
# Wait for the progress thread to complete progressThread.join()
print()
if __name__ == "__main__": main() Script above is the python version of your code written in alien language, I'm on phone so I couldn't test to see if it works, later I will test it on my laptop and fix any issues. Insha'Allah. ( God willing ) Also; Thanks for the update on the code, appreciate it. My scripts ( small part of them ) don't need much speed because they are not supposed to auto solve a key, they are intended as learning tools, I talked about improving performance to make king of information stop whining so much. 🤣
|
🖤😏
|
|
|
s.john
Jr. Member
Offline
Activity: 38
Merit: 8
|
|
September 20, 2023, 03:11:40 AM |
|
I think the puzzle creator should reveal the public keys for all the keys bigger than 120bit except 124, 134, 144, 154, this will make the challenge reflect the true strength of bitcoin security.
|
bc1qf3utr757cp98h0hlg690qtegul0xp47rx06jse
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
September 20, 2023, 07:18:21 AM Last edit: September 20, 2023, 06:45:48 PM by digaran |
|
I think the puzzle creator should reveal the public keys for all the keys bigger than 120bit except 124, 134, 144, 154, this will make the challenge reflect the true strength of bitcoin security.
I'm not sure if a gold hoarding dragon is interested to risk more than what is already at risk. Lol. But seriously if he wants to keep the coins there forever and not touch them, it would be better to move them to exposed public keys, because address brute force is practically pointless, unless he intends to wait and see what happens to technology 40 years from now, so practically unexposed keys above 80 bits serving no purpose, while as you said it, moving those coins to public keys would increase the incentive for new bloods joining this challenge. I'm guessing he has either left the community "again" like in 2010 ( edit: this part was unfair, recently he increased the prize, I regret saying this part ), or he doesn't care about anything other than his fortune, as per usual.
We only live once, if we don't jump we'll never find out, that's why they call it leap of faith. You only find out after jumping.😉
|
🖤😏
|
|
|
BarryWood
Newbie
Offline
Activity: 4
Merit: 0
|
|
September 20, 2023, 09:25:22 AM |
|
Oh hey Barry (west allen ) lol. Welcome to the jungle club of pointless puzzle hunters.in the flash, not the fastest tho probably not the brightest too lol Now I have questions, what hardware do you have? just an old gaming computer i5 4 cores, 16 gb ram and 1060 6gb which surprisingly still run all the games! What have you learned about elliptic curve cryptography? i know absolutely nothing about it, i always see people here talking about it and doing some math i couldn't get. Thank you for the tips, I think it's not just a challenge made by one person but a security test from some big entity whom are already deep in bitcoin or willing to go deeper! Also this challenge made me worried about my own wallets if some lucky gpu "boi" scanning the whole addresses trying to get lucky. But then knowing i've been trying to get lucky myself for the past month with just "puzzle" 66 and it's very hard gave me q relief knowing it's super difficult! i always get about $200 in electricity bill, the past month using keyhunt and bitcrack every night keeping the computer on the bill came with $400 Question please: I took the unsolved address from a text file in keyhunt i think there's about 80 addresses in there, and tried to pass them to cubitcrack using -i to read from the file but it always gives me an error, but if the files has just few address cubitcrack works! any idea how to fix that or work around it?
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
September 20, 2023, 04:45:26 PM |
|
Question please: I took the unsolved address from a text file in keyhunt i think there's about 80 addresses in there, and tried to pass them to cubitcrack using -i to read from the file but it always gives me an error, but if the files has just few address cubitcrack works! any idea how to fix that or work around it?
I never used any of those tools, but if you are searching for puzzle 66 in 66 bit range, you only need puzzle 66 address, unless you are trying to search a larger range which is pointless and a waste of your time and resources. I have said this many times, brute forcing for addresses with no good hardware is futile. If you want to test your "luck" try buying a lottery ticket with closed eyes, just pick randomly, you'd have billion times more chance to win than finding a key using a gaming pc. Last year, I was like you, I spent 4 months trying to find addresses, but then I realized there is a shortcut which is elliptic curve and math, you should skip this stage and mutate into the higher stages, learn how to do EC operations, division, subtraction etc. If someone had told me this back then, I would be 4, 5 months ahead. Not that changes anything, but my time would not be wasted.
|
🖤😏
|
|
|
BarryWood
Newbie
Offline
Activity: 4
Merit: 0
|
|
September 20, 2023, 11:47:18 PM |
|
I really appreciate your advice, yeah i was just wondering if i could try my luck with all the unsolved addresses at once lmao. If anyone can correct me with this: Since Puzzle 64 was found 2022-09-10does that mean it's been a year now 2023-09-20 and still the search for Puzzle 66 on going?!
|
|
|
|
|