nomachine
Member
Offline
Activity: 244
Merit: 12
|
|
October 24, 2023, 08:12:15 PM Last edit: October 25, 2023, 03:25:13 AM by nomachine |
|
Maybe you are on to something, maybe not.
Maybe maybe not.
|
|
|
|
|
|
Even in the event that an attacker gains more than 50% of the network's
computational power, only transactions sent by the attacker could be
reversed or double-spent. The network would not be destroyed.
|
|
|
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
🖤😏
|
|
October 24, 2023, 09:50:33 PM |
|
For now digest this and penetrate order of the group n. On line 27, change (result_2 - result_1) % n to +, then compare the results starting with 7, a, 6 etc with both targets. Then Ask me what is scalar torsion, and I will give you another script to work with, remember to work with the results by sub/adding them with different values to find a short cut, I simply subtracted target 2 from n and then removed all leading Fs from it, both targets can be divided by each other, you just need to find the right divisor, also remember to remove # from line 30 and 31 separately to see each target's division results as well. import gmpy2 as mpz from gmpy2 import powmod
# Define the ec_operations function def ec_operations(start_range, end_range, scalar_1, scalar_2, n, divide_1_by_odd=True, divide_1_by_even=True, divide_2_by_odd=True, divide_2_by_even=True): for i in range(start_range + (start_range%2), end_range, 1): # divide scalar 1 by odd or even numbers if i%2 == 0 and not divide_1_by_even: continue elif i%2 == 1 and not divide_1_by_odd: continue try: # calculate inverse modulo of i i_inv = powmod(i, n-2, n)
# multiply the scalar targets by i modulo n result_1 = scalar_2 * i_inv % n result_2 = scalar_1 * i_inv % n
# divide scalar 2 by odd or even numbers if i%2 == 0 and not divide_2_by_even: continue elif i%2 == 1 and not divide_2_by_odd: continue
# subtract the results sub_result = (result_2 - result_1) % n
# print results separately # print(f"{hex(result_1)[2:]}") # print(f"{hex(result_2)[2:]}") print(f"{hex(sub_result)[2:]}")
except ZeroDivisionError: pass
if __name__ == "__main__": # Set the targets and range for the operations scalar_1 = 0x0000000000000000000000000000000b011d90a8cba60d550a2e332b5ef58546 scalar_2 = 0x00000000000000000000000000000003b9914c3de3a292e6b5a42b617140bbfb
n = mpz.mpz("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141")
start_range = 57896044618658097711785492504343953926418782139537452191302581570759080747160 end_range = 57896044618658097711785492504343953926418782139537452191302581570759080747180
ec_operations(start_range, end_range, scalar_1, scalar_2, n) When you are done, go for this one : 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) * powmod(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * powmod(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, divide_1_by_odd=True, divide_1_by_even=True, divide_2_by_odd=True, divide_2_by_even=True): # Define parameters for secp256k1 curve n = mpz.mpz("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141") G = Point( mpz.mpz("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"), mpz.mpz("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"), curve )
for i in range(start_range + ( start_range%2), end_range, 1): # divide target 1 by odd or even numbers if i%2 == 0 and not divide_1_by_even: continue elif i%2 == 1 and not divide_1_by_odd: continue try: # calculate inverse modulo of i 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)
# divide target 2 by odd or even numbers if i%2 == 0 and not divide_2_by_even: continue elif i%2 == 1 and not divide_2_by_odd: continue
# subtract the results sub_result = result_2 - result_1
# print the results separately # print(f"{result_1.to_hex()}") # print(f"{result_1.to_hex()}") print(f"{sub_result.to_hex()}") # data = open("result.txt","a") # data.write(str(sub_result.to_hex()) +"\n") # data.close()
except ZeroDivisionError: pass
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("03439acdf494f8ed30baa5f465da96c62625dbf0f474535ad9bedefd3f23663f4d", curve)
target_2 = Point.from_hex("02617125f42749f748bd047f3688f79f8e2a1bf5ef9eca7929bb2daa6fa467b8e1", curve) start_range = 57896044618658097711785492504343953926418782139537452191302581570759080747160 end_range = 57896044618658097711785492504343953926418782139537452191302581570759080747180 ec_operations(start_range, end_range, target_2, target_1, curve) When you are done, repeat the same with unknown points, whatever you do with scalars on first script and whatever results you get, perform them on the points as well, all results will be the same.
|
🖤😏
|
|
|
rosengold
Jr. Member
Offline
Activity: 149
Merit: 7
|
|
October 25, 2023, 02:10:47 PM |
|
#include <iostream> #include <vector>...
- Bytea HASH160 Search by NoMachine
- Sat Oct 21 10:39:23 2023
- Puzzle: 15
- Public Key Hash (Hash 160): fe7c45126731f7384640b0b0045fd40bac72e2a2
- PUZZLE SOLVED: 2023-10-21 10:39:24
- Target Public Key Hash (Hash160) found! Private Key: 00000000000000000000000000000000000000000
Hi @nomachine how to make it work sequential instead of random ?
|
|
|
|
k3ntINA
Newbie
Offline
Activity: 14
Merit: 0
|
|
October 25, 2023, 03:19:02 PM |
|
Hi friends, after a few months of trying I have found what is definitely the key to this puzzle. I am not a professional programmer or math teacher. I am a graphic designer and through the drawing of figures and maps, I reached a place where the relationship of these numbers and how they support each other through the 4 main mathematical operations (* + - /) is clearly visible. Numbers have a strange order and order in chaos! I don't know what to call it In this order, you can see outputs that are a few numbers of private keys, mostly the first 3 digits My shape and drawing is animated and with each key it has its own shape, but with all its changes, the connection and order of the numbers is not lost. I have a triangle which, by changing its size and moving in the range and even rotating from 0 to 360 degrees, displays the three sides of a single number or the sum of the other two sides. We all know that the shapes are some kind of mathematical formulas, and this means that there is an algorithm, only a formula has not been written for it. My friends, I need a programmer to program my shapes and actions so that the key is fully calculated. Because the keys are related to each other from any direction, angle and distance. It was not without reason that the creator revealed the public keys in 5 steps. Anyway, after a few years of heavy problems, I have now reached a point where I need to trust someone again. Now there is a possibility that this trust will destroy my life like in the past, but there is no other way. Friends, I only work with an experienced programmer. Someone who has a portfolio on GitHub. Because there is nothing that can be told to a few people. The next thing is that this algorithm is definitely correct, and the programmer and I should collect a maximum of 20 bits so that the rights of those who are trying and working on this puzzle are not lost and they can reach the keys in their own way. All this money is not for us. My email is amir.k3nt@gmail.comI used Google translation, so I apologize if there is a mistake.
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1050
Merit: 219
Shooters Shoot...
|
|
October 25, 2023, 03:35:09 PM |
|
Hi friends, after a few months of trying I have found what is definitely the key to this puzzle. I am not a professional programmer or math teacher. I am a graphic designer and through the drawing of figures and maps, I reached a place where the relationship of these numbers and how they support each other through the 4 main mathematical operations (* + - /) is clearly visible. Numbers have a strange order and order in chaos! I don't know what to call it In this order, you can see outputs that are a few numbers of private keys, mostly the first 3 digits My shape and drawing is animated and with each key it has its own shape, but with all its changes, the connection and order of the numbers is not lost. I have a triangle which, by changing its size and moving in the range and even rotating from 0 to 360 degrees, displays the three sides of a single number or the sum of the other two sides. We all know that the shapes are some kind of mathematical formulas, and this means that there is an algorithm, only a formula has not been written for it. My friends, I need a programmer to program my shapes and actions so that the key is fully calculated. Because the keys are related to each other from any direction, angle and distance. It was not without reason that the creator revealed the public keys in 5 steps. Anyway, after a few years of heavy problems, I have now reached a point where I need to trust someone again. Now there is a possibility that this trust will destroy my life like in the past, but there is no other way. Friends, I only work with an experienced programmer. Someone who has a portfolio on GitHub. Because there is nothing that can be told to a few people. The next thing is that this algorithm is definitely correct, and the programmer and I should collect a maximum of 20 bits so that the rights of those who are trying and working on this puzzle are not lost and they can reach the keys in their own way. All this money is not for us. My email is amir.k3nt@gmail.comI used Google translation, so I apologize if there is a mistake. What are the 3 first digits? If your shapes/drawings are correct, we would know within a day or two. Then you would probably have lots of people trying to help code your idea for #67, #68, etc. If you send me the first 3 digits of #66, and I find the key; I would split it with you 50/50. I can guarantee you, 1000% I have ranges ran for every first 3 digit combination; so I would only have to check so many keys vs starting from scratch.
|
|
|
|
rosengold
Jr. Member
Offline
Activity: 149
Merit: 7
|
|
October 25, 2023, 03:46:47 PM |
|
Hi friends, after a few months of trying I have found what is definitely the key to this puzzle. I am not a professional programmer or math teacher. I am a graphic designer and through the drawing of figures and maps, I reached a place where the relationship of these numbers and how they support each other through the 4 main mathematical operations (* + - /) is clearly visible. Numbers have a strange order and order in chaos! I don't know what to call it In this order, you can see outputs that are a few numbers of private keys, mostly the first 3 digits My shape and drawing is animated and with each key it has its own shape, but with all its changes, the connection and order of the numbers is not lost. I have a triangle which, by changing its size and moving in the range and even rotating from 0 to 360 degrees, displays the three sides of a single number or the sum of the other two sides. We all know that the shapes are some kind of mathematical formulas, and this means that there is an algorithm, only a formula has not been written for it. My friends, I need a programmer to program my shapes and actions so that the key is fully calculated. Because the keys are related to each other from any direction, angle and distance. It was not without reason that the creator revealed the public keys in 5 steps. Anyway, after a few years of heavy problems, I have now reached a point where I need to trust someone again. Now there is a possibility that this trust will destroy my life like in the past, but there is no other way. Friends, I only work with an experienced programmer. Someone who has a portfolio on GitHub. Because there is nothing that can be told to a few people. The next thing is that this algorithm is definitely correct, and the programmer and I should collect a maximum of 20 bits so that the rights of those who are trying and working on this puzzle are not lost and they can reach the keys in their own way. All this money is not for us. My email is amir.k3nt@gmail.comI used Google translation, so I apologize if there is a mistake. Interesting, I have built my own searcher to find it, If you share the correct first 3 characters of #66 I'm ready to share 50/50 with you, I have all CUDA scripts to find it in about 5 days using some vast.ai instances.
|
|
|
|
nomachine
Member
Offline
Activity: 244
Merit: 12
|
|
October 25, 2023, 04:35:53 PM Last edit: October 25, 2023, 05:29:05 PM by nomachine |
|
#include <iostream> #include <vector>...
- Bytea HASH160 Search by NoMachine
- Sat Oct 21 10:39:23 2023
- Puzzle: 15
- Public Key Hash (Hash 160): fe7c45126731f7384640b0b0045fd40bac72e2a2
- PUZZLE SOLVED: 2023-10-21 10:39:24
- Target Public Key Hash (Hash160) found! Private Key: 00000000000000000000000000000000000000000
Hi @nomachine how to make it work sequential instead of random ? here you go, buddy #include <iostream> #include <vector> #include <iomanip> #include <openssl/bn.h> #include <openssl/ec.h> #include <openssl/obj_mac.h> #include <openssl/sha.h> #include <openssl/evp.h> #include <openssl/ripemd.h> #include <ctime> #include <sstream> #include <fstream>
// Function to convert a byte vector to a hexadecimal string std::string bytesToHex(const std::vector<unsigned char>& bytes) { std::stringstream ss; for (unsigned char byte : bytes) { ss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(byte); } return ss.str(); }
// Function to calculate the RIPEMD160 hash of a byte vector std::vector<unsigned char> calculateRIPEMD160(const std::vector<unsigned char>& data) { std::vector<unsigned char> hash(RIPEMD160_DIGEST_LENGTH); RIPEMD160(data.data(), data.size(), hash.data()); return hash; }
int main() { // Initialize the OpenSSL library if (OpenSSL_add_all_algorithms() != 1) { std::cerr << "OpenSSL initialization failed." << std::endl; return 1; }
// Define the range std::string start_range_hex = "000000000000000000000000000000000000000000000001ffffffffffffffff"; std::string end_range_hex = "000000000000000000000000000000000000000000000003ffffffffffffffff"; // Set the target Hash160 value (replace with your target hash) std::string target_hash160_hex = "20d45a6a762535700ce9e0b216e31994335db8a5";
// Create an EC_KEY object EC_KEY* ec_key = EC_KEY_new_by_curve_name(NID_secp256k1);
// Calculate the SHA-256 hash of the public key unsigned char sha256_result[SHA256_DIGEST_LENGTH];
// Calculate the RIPEMD160 hash of the SHA-256 hash std::vector<unsigned char> ripemd160_result(RIPEMD160_DIGEST_LENGTH);
BIGNUM* start_range = BN_new(); BIGNUM* end_range = BN_new(); BN_hex2bn(&start_range, start_range_hex.c_str()); BN_hex2bn(&end_range, end_range_hex.c_str());
while (BN_cmp(start_range, end_range) <= 0) { // Create a BIGNUM from the current value in the range BIGNUM* bn_private_key = BN_dup(start_range);
// Set the private key in the EC_KEY object EC_KEY_set_private_key(ec_key, bn_private_key);
// Compute the public key from the private key EC_POINT* public_key_point = EC_POINT_new(EC_KEY_get0_group(ec_key)); EC_POINT_mul(EC_KEY_get0_group(ec_key), public_key_point, bn_private_key, NULL, NULL, NULL);
// Convert the public key point to binary representation (compressed) size_t public_key_length = EC_POINT_point2oct(EC_KEY_get0_group(ec_key), public_key_point, POINT_CONVERSION_COMPRESSED, NULL, 0, NULL); std::vector<unsigned char> public_key_bytes(public_key_length); EC_POINT_point2oct(EC_KEY_get0_group(ec_key), public_key_point, POINT_CONVERSION_COMPRESSED, public_key_bytes.data(), public_key_length, NULL);
SHA256(public_key_bytes.data(), public_key_bytes.size(), sha256_result); ripemd160_result = calculateRIPEMD160(std::vector<unsigned char>(sha256_result, sha256_result + SHA256_DIGEST_LENGTH));
// Convert the calculated RIPEMD160 hash to a hexadecimal string std::string calculated_hash160_hex = bytesToHex(ripemd160_result);
// Display the generated public key hash (Hash160) and private key std::string message = "\r\033[01;33m[+] Public Key Hash (Hash 160): " + calculated_hash160_hex; std::cout << message << "\e[?25l"; std::cout.flush();
// Check if the generated public key hash matches the target if (calculated_hash160_hex == target_hash160_hex) { // Get the current time std::time_t currentTime; std::time(¤tTime); std::tm tmStruct = *std::localtime(¤tTime);
// Format the current time into a human-readable string std::stringstream timeStringStream; timeStringStream << std::put_time(&tmStruct, "%Y-%m-%d %H:%M:%S"); std::string formattedTime = timeStringStream.str();
std::cout << "\n\033[32m[+] PUZZLE SOLVED: " << formattedTime << "\033[0m" << std::endl; std::cout << "\r\033[32m[+] Target Public Key Hash (Hash160) found! Private Key: " << BN_bn2hex(bn_private_key) << std::endl;
// Append the private key information to a file if it matches std::ofstream file("KEYFOUNDKEYFOUND.txt", std::ios::app); if (file.is_open()) { file << "\nPUZZLE SOLVED " << formattedTime; file << "\nPrivate Key (hex): " << BN_bn2hex(bn_private_key); file << "\n--------------------------------------------------------------------------------------------------------------------------------------------"; file.close(); }
BN_free(bn_private_key); break; }
// Increment the current value in the range BN_add_word(start_range, 1); }
// Free the EC_KEY and BIGNUM objects BN_free(start_range); BN_free(end_range); EC_KEY_free(ec_key);
return 0; }
g++ -m64 -march=native -pthread -O3 -I. -o puzzle66 puzzle.cpp -lssl -lcrypto -ldl
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
October 25, 2023, 04:58:40 PM |
|
By any chance, are you from middle east? If yes you can explain yourself here : https://bitcointalk.org/index.php?topic=620798.0Or you could find your local language and seek help from a homie.😉 Also note that, the puzzle designer doesn't know how to solve these puzzles, and he didn't leave any clues, because there are no clues. Ps, I like it the way you attribute trustworthiness to having a github page.😂
|
🖤😏
|
|
|
nomachine
Member
Offline
Activity: 244
Merit: 12
|
|
October 25, 2023, 05:45:29 PM Last edit: October 25, 2023, 06:22:34 PM by nomachine |
|
puzzle designer doesn't know how to solve these puzzles, and he didn't leave any clues, because there are no clues.
It's hard to believe he manually write each puzzle after extracting 256 keys from HD wallet... He masked them (one by one) with leading 000...0001 to set difficulty. it is done with some script, with errors = ZERO So his script knows precisely how to solve the second part. Or to put it another way, he knows how to solve these puzzles.
|
|
|
|
rosengold
Jr. Member
Offline
Activity: 149
Merit: 7
|
|
October 25, 2023, 05:47:36 PM |
|
#include <iostream> #include <vector>...
- Bytea HASH160 Search by NoMachine
- Sat Oct 21 10:39:23 2023
- Puzzle: 15
- Public Key Hash (Hash 160): fe7c45126731f7384640b0b0045fd40bac72e2a2
- PUZZLE SOLVED: 2023-10-21 10:39:24
- Target Public Key Hash (Hash160) found! Private Key: 00000000000000000000000000000000000000000
Hi @nomachine how to make it work sequential instead of random ? here you go, buddy #include <iostream> #include <vector> #include <iomanip> #include <openssl/bn.h> #include <openssl/ec.h> #include <openssl/obj_mac.h> #include <openssl/sha.h> #include <openssl/evp.h> #include <openssl/ripemd.h> #include <ctime> #include <sstream> #include <fstream>
// Function to convert a byte vector to a hexadecimal string std::string bytesToHex(const std::vector<unsigned char>& bytes) { std::stringstream ss; for (unsigned char byte : bytes) { ss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(byte); } return ss.str(); }
// Function to calculate the RIPEMD160 hash of a byte vector std::vector<unsigned char> calculateRIPEMD160(const std::vector<unsigned char>& data) { std::vector<unsigned char> hash(RIPEMD160_DIGEST_LENGTH); RIPEMD160(data.data(), data.size(), hash.data()); return hash; }
int main() { // Initialize the OpenSSL library if (OpenSSL_add_all_algorithms() != 1) { std::cerr << "OpenSSL initialization failed." << std::endl; return 1; }
// Define the range std::string start_range_hex = "000000000000000000000000000000000000000000000001ffffffffffffffff"; std::string end_range_hex = "000000000000000000000000000000000000000000000003ffffffffffffffff"; // Set the target Hash160 value (replace with your target hash) std::string target_hash160_hex = "20d45a6a762535700ce9e0b216e31994335db8a5";
// Create an EC_KEY object EC_KEY* ec_key = EC_KEY_new_by_curve_name(NID_secp256k1);
// Calculate the SHA-256 hash of the public key unsigned char sha256_result[SHA256_DIGEST_LENGTH];
// Calculate the RIPEMD160 hash of the SHA-256 hash std::vector<unsigned char> ripemd160_result(RIPEMD160_DIGEST_LENGTH);
BIGNUM* start_range = BN_new(); BIGNUM* end_range = BN_new(); BN_hex2bn(&start_range, start_range_hex.c_str()); BN_hex2bn(&end_range, end_range_hex.c_str());
while (BN_cmp(start_range, end_range) <= 0) { // Create a BIGNUM from the current value in the range BIGNUM* bn_private_key = BN_dup(start_range);
// Set the private key in the EC_KEY object EC_KEY_set_private_key(ec_key, bn_private_key);
// Compute the public key from the private key EC_POINT* public_key_point = EC_POINT_new(EC_KEY_get0_group(ec_key)); EC_POINT_mul(EC_KEY_get0_group(ec_key), public_key_point, bn_private_key, NULL, NULL, NULL);
// Convert the public key point to binary representation (compressed) size_t public_key_length = EC_POINT_point2oct(EC_KEY_get0_group(ec_key), public_key_point, POINT_CONVERSION_COMPRESSED, NULL, 0, NULL); std::vector<unsigned char> public_key_bytes(public_key_length); EC_POINT_point2oct(EC_KEY_get0_group(ec_key), public_key_point, POINT_CONVERSION_COMPRESSED, public_key_bytes.data(), public_key_length, NULL);
SHA256(public_key_bytes.data(), public_key_bytes.size(), sha256_result); ripemd160_result = calculateRIPEMD160(std::vector<unsigned char>(sha256_result, sha256_result + SHA256_DIGEST_LENGTH));
// Convert the calculated RIPEMD160 hash to a hexadecimal string std::string calculated_hash160_hex = bytesToHex(ripemd160_result);
// Display the generated public key hash (Hash160) and private key std::string message = "\r\033[01;33m[+] Public Key Hash (Hash 160): " + calculated_hash160_hex; std::cout << message << "\e[?25l"; std::cout.flush();
// Check if the generated public key hash matches the target if (calculated_hash160_hex == target_hash160_hex) { // Get the current time std::time_t currentTime; std::time(¤tTime); std::tm tmStruct = *std::localtime(¤tTime);
// Format the current time into a human-readable string std::stringstream timeStringStream; timeStringStream << std::put_time(&tmStruct, "%Y-%m-%d %H:%M:%S"); std::string formattedTime = timeStringStream.str();
std::cout << "\n\033[32m[+] PUZZLE SOLVED: " << formattedTime << "\033[0m" << std::endl; std::cout << "\r\033[32m[+] Target Public Key Hash (Hash160) found! Private Key: " << BN_bn2hex(bn_private_key) << std::endl;
// Append the private key information to a file if it matches std::ofstream file("KEYFOUNDKEYFOUND.txt", std::ios::app); if (file.is_open()) { file << "\nPUZZLE SOLVED " << formattedTime; file << "\nPrivate Key (hex): " << BN_bn2hex(bn_private_key); file << "\n--------------------------------------------------------------------------------------------------------------------------------------------"; file.close(); }
BN_free(bn_private_key); break; }
// Increment the current value in the range BN_add_word(start_range, 1); }
// Free the EC_KEY and BIGNUM objects BN_free(start_range); BN_free(end_range); EC_KEY_free(ec_key);
return 0; }
g++ -m64 -march=native -pthread -O3 -I. -o puzzle66 puzzle.cpp -lssl -lcrypto -ldl Amazing thanks
|
|
|
|
patsat
Newbie
Offline
Activity: 3
Merit: 0
|
|
October 25, 2023, 06:28:38 PM |
|
Anyone can find one bit of the K nonce ?
|
|
|
|
nomachine
Member
Offline
Activity: 244
Merit: 12
|
|
October 25, 2023, 06:42:20 PM Last edit: October 25, 2023, 06:59:02 PM by nomachine |
|
Anyone can find one bit of the K nonce ?
What exactly do you mean? There are 2^32 possible values, which means there are 4,294,967,296 different nonces. Scientists from Sorbonne University claim to be able to solve the entire 256-bit SECP256K1 in 9 Hours with Cat Qubits However, it's important to exercise caution when evaluating such claims, as cryptographic claims in the context of quantum computing are often met with skepticism and scrutiny. Quantum computing is still an emerging field, and practical quantum computers capable of breaking widely used cryptographic algorithms are not yet a reality. But I wouldn't be surprised if some government organizations make this first.
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
October 25, 2023, 10:44:43 PM Last edit: October 26, 2023, 08:19:16 AM by digaran |
|
I love it how knowledge sharing works in our favour, every time I share I gain more. I can see a solution for low bit range keys, especially because when we use their inverse, -n keys, they all start with Fs, and since we can work with scalar, if we try to divide 2 scalar mod n and then add/sub the results, you can see keys starting with many leading hexadecimal characters, it depends on the size of the keys we are dividing. Another thing to note, if you try to divide then add/sub 2 keys larger than this one: 000000000000000000000000000000014551231950b75fc4402da1732fc9bebf You could find the results of addition/subtraction starting with 8, a, b etc following with many zeros, what that means, when we are dividing a key we must consider that we are dividing a key like this : fffffffffffffffffffffffffffffffd755db9cd5e9140777fa4bd19a06c8282 Instead of the first one above, so when you divide a key, try to either add 31 leading Fs, or subtract 31 leading Fs before doing your thing. Btw, puzzle 130 has 33 characters right? Anyways good luck.
Edit: I just got this idea, where is our code genius @mcdouglasx, 😉 how about a script which subtracts G as many times as we want from target and divides target and all subtracted keys by a number we decide, then subtracts the same from all the results and does the same division, but it should discard all the previously generated keys. And when we reach a low range and find a known key, we can multiply and add the same way we subtracted and divided, but in order to do that, we just need to keep an index in order of subtraction, example: we will call target a, -1 of target b, -2 of target c, etc and when we reach a known key, it could have a name like f,d,k,o,a,r,p,m,a,r,w etc then we'd know exactly which one of the keys on each step was the actual result.
This has become boring, lets make some noise.
|
🖤😏
|
|
|
frozenen
Newbie
Offline
Activity: 20
Merit: 0
|
|
October 26, 2023, 08:29:09 AM |
|
Hi friends, after a few months of trying I have found what is definitely the key to this puzzle. I am not a professional programmer or math teacher. I am a graphic designer and through the drawing of figures and maps, I reached a place where the relationship of these numbers and how they support each other through the 4 main mathematical operations (* + - /) is clearly visible. Numbers have a strange order and order in chaos! I don't know what to call it In this order, you can see outputs that are a few numbers of private keys, mostly the first 3 digits My shape and drawing is animated and with each key it has its own shape, but with all its changes, the connection and order of the numbers is not lost. I have a triangle which, by changing its size and moving in the range and even rotating from 0 to 360 degrees, displays the three sides of a single number or the sum of the other two sides. We all know that the shapes are some kind of mathematical formulas, and this means that there is an algorithm, only a formula has not been written for it. My friends, I need a programmer to program my shapes and actions so that the key is fully calculated. Because the keys are related to each other from any direction, angle and distance. It was not without reason that the creator revealed the public keys in 5 steps. Anyway, after a few years of heavy problems, I have now reached a point where I need to trust someone again. Now there is a possibility that this trust will destroy my life like in the past, but there is no other way. Friends, I only work with an experienced programmer. Someone who has a portfolio on GitHub. Because there is nothing that can be told to a few people. The next thing is that this algorithm is definitely correct, and the programmer and I should collect a maximum of 20 bits so that the rights of those who are trying and working on this puzzle are not lost and they can reach the keys in their own way. All this money is not for us. My email is amir.k3nt@gmail.comI used Google translation, so I apologize if there is a mistake. What are the 3 first digits? If your shapes/drawings are correct, we would know within a day or two. Then you would probably have lots of people trying to help code your idea for #67, #68, etc. If you send me the first 3 digits of #66, and I find the key; I would split it with you 50/50. I can guarantee you, 1000% I have ranges ran for every first 3 digit combination; so I would only have to check so many keys vs starting from scratch. Yo, Ill take you all up on that offer 50/50 split , #66 first 3 digits = 37A is the most likely then 33A or 35A, here is my wallet 1Dqsy2uo24Mq9Awg1gU4R7tjs3XYRrHyTZ
|
|
|
|
nomachine
Member
Offline
Activity: 244
Merit: 12
|
|
October 26, 2023, 09:24:38 AM Last edit: October 26, 2023, 12:46:19 PM by nomachine |
|
This has become boring, lets make some noise.
I already have a collection of completely ridiculous programs. import ecdsa import hashlib
start_bytes = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\xff\xff\xff\xff\xff\xff\xff') end_bytes = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xff\xff\xff\xff\xff\xff\xff\xff') target_binary = b'\x20\xd4Zjv%5p\x0c\xe9\xe0\xb2\x16\xe3\x19\x9435\xb8\xa5'
current_bytes = start_bytes[:]
while current_bytes <= end_bytes: signing_key = ecdsa.SigningKey.from_string(bytes(current_bytes), curve=ecdsa.SECP256k1) HASH160 = hashlib.new('ripemd160', hashlib.sha256(signing_key.get_verifying_key().to_string("compressed")).digest()).digest() if HASH160 == target_binary: with open("KEYFOUNDKEYFOUND.txt", "a") as f: wif = current_bytes.hex().upper() f.write("WIF: " + wif + '\n\n') # Increment the bytes from the right (little-endian) for i in range(len(current_bytes) - 1, -1, -1): if current_bytes[i] != 255: current_bytes[i] += 1 break else: current_bytes[i] = 0 This is Puzzle 66 believe it or not . .
|
|
|
|
MoreForUs
Newbie
Offline
Activity: 17
Merit: 0
|
|
October 26, 2023, 01:46:18 PM |
|
import ecdsa import hashlib import base58 import random import time
def generate_bitcoin_address(private_key_hex): private_key = ecdsa.SigningKey.from_string(bytes.fromhex(private_key_hex), curve=ecdsa.SECP256k1) public_key = private_key.get_verifying_key() public_key_bytes = public_key.to_string("compressed") sha256_hash = hashlib.sha256(public_key_bytes) ripemd160_hash = hashlib.new("ripemd160") ripemd160_hash.update(sha256_hash.digest()) bitcoin_address = ripemd160_hash.digest()
# Mainnet prefix (0x00) network_byte = b'\x00' bitcoin_address = network_byte + bitcoin_address
# Double SHA-256 hash for checksum checksum = hashlib.sha256(hashlib.sha256(bitcoin_address).digest()).digest()[:4] bitcoin_address += checksum base58_address = base58.b58encode(bitcoin_address)
return base58_address.decode()
# Define the lower and upper bounds for the private key hex range lower_bound = '20000000000000000' upper_bound = '2ffffffffffffffff' batch_size = 1000 # Number of private keys to search in each batch total_parts = 100 # Total number of parts to break the range into
# Calculate the part size to make them equal start_int = int(lower_bound, 16) end_int = int(upper_bound, 16) total_keys = end_int - start_int part_size = total_keys // total_parts
# Generate a list of parts to search and reverse it parts_to_search = [i for i in range(total_parts)][::-1]
target_addresses = ['13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so', '1BY8GQbnueYofwSuFAT3USAhGjPrkxDdW9', '1MVDYgVaSN6iKKEsbzRUAYFrYJadLYZvvZ']
additional_hex_numbers = ['2','3','4','5','6','7','8','9','a','b','c','d','e','f']
update_interval = 1 iteration_count = 0
found_addresses = set()
for current_part in parts_to_search: current_private_key_hex_start = start_int + current_part * part_size current_private_key_hex_end = current_private_key_hex_start + part_size iteration_start_time = time.time()
while time.time() - iteration_start_time < 30: # Iterate for 15 seconds if current_private_key_hex_start >= current_private_key_hex_end: break
private_key_hex = hex(current_private_key_hex_start)[2:].zfill(64) # Ensure the hex string is 64 characters long
# Check if the private_key_hex contains non-hexadecimal characters if all(c in '0123bcdef' for c in private_key_hex): bitcoin_address = generate_bitcoin_address(private_key_hex) iteration_count += 1
if iteration_count % update_interval == 0: print(f"Current Iteration Count: {iteration_count}") print(f"Current Private Key Hex: {private_key_hex}") print(f"Current Bitcoin Address: {bitcoin_address}")
if bitcoin_address in target_addresses: print(f"Target address found: {bitcoin_address}") print(f"Private Key Hex: {private_key_hex}") found_addresses.add((bitcoin_address, private_key_hex)) with open("found_addresses.txt", "a") as file: file.write(f"Address: {bitcoin_address}, Private Key: {private_key_hex}\n") break
found_match = False for hex_number in additional_hex_numbers: modified_private_key_hex = private_key_hex.replace('2', hex_number, 1).zfill(64)
# Check if the modified_private_key_hex contains non-hexadecimal characters if all(c in '0123456789abcdef' for c in modified_private_key_hex): modified_bitcoin_address = generate_bitcoin_address(modified_private_key_hex) iteration_count += 1
if iteration_count % update_interval == 0: print(f"Current Iteration Count: {iteration_count}") print(f"Current Private Key Hex (Modified): {modified_private_key_hex}") print(f"Current Bitcoin Address (Modified): {modified_bitcoin_address}")
if modified_bitcoin_address in target_addresses: print(f"Target address found (Modified): {modified_bitcoin_address}") print(f"Modified Private Key Hex: {modified_private_key_hex}") found_addresses.add((modified_bitcoin_address, modified_private_key_hex)) with open("found_addresses.txt", "a") as file: file.write(f"Address: {modified_bitcoin_address}, Private Key: {modified_private_key_hex}\n") found_match = True break if found_match: break current_private_key_hex_start += -1
Lets make some noise
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
October 26, 2023, 06:00:39 PM |
|
Guys come on, seeing a few things like puzzle 66, sha256 double, base58 in your scripts is a turn off.🤣
For how long you are going to stick with finding addresses? I believe I have said this before, you don't need to go beyond rmd160 check, just generate public key, do a sha256 and a rmd160 then compare with rmd160 of puzzle, when you convert rmd160 to address, you are doing the following which is unnecessary : adding network byte + sha256d + taking checksum + adding checksum + encoding to base58. So 5 extra steps, 5 useless operations per key.
Anyways, try this one, subtract G 99 times from target, you will have 100 keys in total, then divide them all by 100, one of the results will definitely be the target/100. Then come here ask me what's next. But first I would need to test your script to see if it does what I said.😉
|
🖤😏
|
|
|
nomachine
Member
Offline
Activity: 244
Merit: 12
|
|
October 26, 2023, 06:24:59 PM Last edit: November 04, 2023, 01:12:24 PM by nomachine |
|
So 5 extra steps, 5 useless operations per key.
import os, random, secrets, hashlib, ecdsa while True: dec = secrets.SystemRandom().randrange(36893488147419103231, 2361183241434822606847) h160 = hashlib.new('ripemd160', hashlib.sha256(ecdsa.SigningKey.from_string((b'\x00' * 32)[:-len(dec.to_bytes((dec.bit_length() + 7) // 8, 'big'))] + dec.to_bytes((dec.bit_length() + 7) // 8, 'big'), curve=ecdsa.SECP256k1).get_verifying_key().to_string("compressed")).digest()).digest() if h160 == "20d45a6a762535700ce9e0b216e31994335db8a5": dec = int.from_bytes(full_bytes, byteorder='big') print(dec) break It can't be simpler than this.. But even for this you have to wait 5000 years.
|
|
|
|
mcdouglasx
Member
Offline
Activity: 237
Merit: 53
New ideas will be criticized and then admired.
|
|
October 26, 2023, 07:36:44 PM |
|
subtract G 99 times from target, you will have 100 keys in total, then divide them all by 100, one of the results will definitely be the target/100. Then come here ask me what's next. But first I would need to test your script to see if it does what I said.😉
Hello, is this what you need? import secp256k1 as ice import bitcoin
target= "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852" print("Target:", target) Target_upub= ice.pub2upub(target)
for i in range (100): A= ice.scalar_multiplication(i) B= ice.point_subtraction(Target_upub, A) C= ice.to_cpub(B.hex()) D= bitcoin.divide(C, 100)
data = open("S-1.txt","a") data.write(str(i)+" = "+str(C)+"\n") data.close()
data = open("D-1.txt","a") data.write(str(i)+" = "+str(D)+"\n") data.close()
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
LuckyRandomFisher
Newbie
Offline
Activity: 3
Merit: 0
|
|
October 26, 2023, 09:15:13 PM |
|
Hello folks! I've just got a new PC (latest i9 + 4090) and allocated it full-time for #66 just ~1h ago Set it up in complete random mode (keyhunt & bitcrack) and it randomeforces #66 with the following pace: CPU (keyhunt)Total 50247107966976 keys in 10095 seconds: ~4 Gkeys/s (4977425256 keys/s) GPU (bitcrack)NVIDIA GeForce R / 24217MB | 1 target 3307.00 MKey/s (11,423,035,949,056 total) [00:56:47] Here is my plan: gonna polish and tune up these scripts to get more performance out of it. As soon as I reach the ceil, I'll start looking into the algo part) Gonna be fun) Luck + Fun + Polishing and 6.6 BTC is mine
|
|
|
|
|