There are over $30m in bitcoins waiting to be collected, though for someone like him, this is some change in his pocket, still it's a lot of money and nobody in the world would do this other than Satoshi.
Asking him directly for money will surely upset him as it would upset anyone! Imagine if he gave some money to somebody around here and people find out about it, there will be no puzzle solving discussions anymore but just people asking constantly for BTC, you have stated your case once, and if he is reading these topics as you suggested, if he wants to help you out, he should/would contact you privately and ask for an anonymous address as well as asking you not to tell anyone.
I doubt he'd do that though, I just said what I would do, but not for any random guy saying he just needs it, I would investigate your situation first and if I know you have contributed to the system then I would consider to lift some of your financial burdens.
Hope the best for you all.
I just bought a new PC a couple of days ago and I am writing my own tool.
The tools I have seen here do not get 100% of the potential.
Some of the failures I see are:
Bad resource distribution (optimization)
misuse of CUDA+CPU+RAM
Very bad in Random Mode (is it intentional?)
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <gmpxx.h>
#include <secp256k1.h>
#include <openssl/ripemd.h>
#include <openssl/sha.h>
#include <vector>
#include <thread>
#include <mutex>
#include <chrono>
#include <omp.h>
#include <atomic>
#include <openssl/ec.h>
#include <openssl/bn.h>
#include <openssl/obj_mac.h>
std::mutex mtx;
std::atomic<bool> found(false);
std::string target_hash160 = "20d45a6a762535700ce9e0b216e31994335db8a5";
int partial_match_length = 6; // The length of the partial match, adjust as needed
bool is_partial_match(const std::string &hash160, const std::string &target_hash160, int match_length) {
return hash160.substr(0, match_length) == target_hash160.substr(0, match_length);
}
std::string private_key_to_hash160(const std::string &private_key_hex, std::string &compressed_pubkey_hex) {
// Create an EC_KEY object
EC_KEY *ec_key = EC_KEY_new_by_curve_name(NID_secp256k1);
BIGNUM *private_key_bn = BN_new();
// Convert private key from hex to BIGNUM
BN_hex2bn(&private_key_bn, private_key_hex.c_str());
// Set the private key
EC_KEY_set_private_key(ec_key, private_key_bn);
// Calculate the public key
EC_POINT *pub_key = EC_POINT_new(EC_KEY_get0_group(ec_key));
EC_POINT_mul(EC_KEY_get0_group(ec_key), pub_key, private_key_bn, nullptr, nullptr, nullptr);
EC_KEY_set_public_key(ec_key, pub_key);
// Get the compressed public key
unsigned char compressed_pubkey[33];
EC_POINT_point2oct(EC_KEY_get0_group(ec_key), pub_key, POINT_CONVERSION_COMPRESSED, compressed_pubkey, 33, nullptr);
// Convert compressed public key to hex string
std::stringstream cpk_ss;
cpk_ss << std::hex << std::setfill('0');
for (int i = 0; i < 33; i++) {
cpk_ss << std::setw(2) << static_cast<int>(compressed_pubkey
);
}
compressed_pubkey_hex = cpk_ss.str();
// Hash the public key
unsigned char sha256_digest[SHA256_DIGEST_LENGTH];
SHA256(compressed_pubkey, 33, sha256_digest);
unsigned char ripemd160_digest[RIPEMD160_DIGEST_LENGTH];
RIPEMD160(sha256_digest, SHA256_DIGEST_LENGTH, ripemd160_digest);
// Convert Hash160 to hex string
std::stringstream ss;
ss << std::hex << std::setfill('0');
for (int i = 0; i < RIPEMD160_DIGEST_LENGTH; i++) {
ss << std::setw(2) << static_cast<int>(ripemd160_digest);
}
// Free memory
EC_POINT_free(pub_key);
BN_free(private_key_bn);
EC_KEY_free(ec_key);
return ss.str();
}
void generate_random_number(const mpz_class &min_range, const mpz_class &max_range, unsigned long long seed, int num_threads) {
if (found) {
return;
}
mpz_class range = max_range - min_range + 1;
mpz_class subrange_size = range / num_threads;
std::ofstream output_file("Found.txt", std::ios_base::app);
std::ofstream partial_match_file("part.txt", std::ios_base::app);
omp_set_num_threads(num_threads);
#pragma omp parallel
{
int thread_id = omp_get_thread_num();
mpz_class subrange_min = min_range + (subrange_size * thread_id);
mpz_class subrange_max = (thread_id == num_threads - 1) ? max_range : subrange_min + subrange_size - 1;
gmp_randstate_t rand_state;
gmp_randinit_default(rand_state);
for (unsigned long long i = 0; !found && i < ULLONG_MAX; i++) {
unsigned long long thread_seed = seed + i;
gmp_randseed_ui(rand_state, thread_seed);
mpz_class random_number;
mpz_class subrange = subrange_max - subrange_min + 1;
mpz_urandomm(random_number.get_mpz_t(), rand_state, subrange.get_mpz_t());
random_number += subrange_min;
std::string private_key_hex = random_number.get_str(16);
std::string compressed_pubkey_hex;
std::string hash160 = private_key_to_hash160(private_key_hex, compressed_pubkey_hex);
if (hash160 == target_hash160) {
mtx.lock();
output_file << private_key_hex << " " << hash160 << " " << compressed_pubkey_hex << std::endl;
std::cout << "Found in subrange: [" << subrange_min << ", " << subrange_max << "]" << std::endl;
mtx.unlock();
found = true;
} else if (is_partial_match(hash160, target_hash160, partial_match_length)) {
mtx.lock();
std::cout << private_key_hex << " " << hash160 << " " << compressed_pubkey_hex << std::endl;
partial_match_file << private_key_hex << " " << hash160 << " " << compressed_pubkey_hex << std::endl;
mtx.unlock();
}
}
gmp_randclear(rand_state);
}
output_file.close();
partial_match_file.close();
}
int main() {
const int num_threads = 64; // Set the fixed number of threads to 64
mpz_class min_range("36965545741457031167");
mpz_class max_range("73714918700800278528");
auto seed = std::chrono::high_resolution_clock::now().time_since_epoch().count();
generate_random_number(min_range, max_range, seed, num_threads);
if (found) {
std::cout << "Target address found. Check Found.txt for details." << std::endl;
} else {
std::cout << "Target address not found." << std::endl;
}
return 0;
}
it will be better this way?