It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
from bitcoinaddress import Wallet
# Convert a string with hex digits, colons, and whitespace to a long integer
def hex2int(hexString):
return int("".join(hexString.replace(":", "").split()), 16)
dA = hex2int('54040CDA88EE1CA322FEB4BD61C1098224222444F9453637802FE66526674199')
# put your test key between the ' ' the key above is to demonstrate
dx = str(f'{dA:064x}')
wallet = Wallet(dx)
priv_key = wallet.key.hex
wif = wallet.key.mainnet.wif
publ_key = wallet.address.pubkey
publ_keyc = wallet.address.pubkeyc
address = wallet.address.mainnet.pubaddr1
addressc = wallet.address.mainnet.pubaddr1c
address3 =wallet.address.mainnet.pubaddr3
wifc = wallet.key.mainnet.wifc
addressd = wallet.address.mainnet.pubaddrbc1_P2WSH
addresse = wallet.address.mainnet.pubaddrbc1_P2WPKH
print('Private key : ' + str(priv_key) + '\n' +
'Public key : ' + str(publ_key) + '\n' +
'Address : ' + str(address) + '\n' +
'WIF : ' + str(wif) + "\n\n" +
'Public key C: ' + str(publ_keyc) + '\n' +
'Address C: ' + str(addressc) + '\n' +
'WIF C: ' + str(wifc) + "\n\n" +
'BC1 P2WSH : ' + str(addressd) + '\n' +
'BC1 P2WPKH : ' + str(addresse) + '\n' +
'P2SH : ' + str(address3) + '\n')
// Including required header files
#include
#include
#include
// CUDA Kernel function for generating permutations
__global__ void generatePermutations(char *baseString, char *result, unsigned long long num_permutations, unsigned long long offset) {
// Calculate the global index for this thread across all blocks
unsigned long long idx = blockIdx.x * blockDim.x + threadIdx.x + offset;
// Check if the index exceeds the number of permutations we want to generate
if (idx >= num_permutations) return;
// Create a local copy of the base string in this thread
char localString[81];
memcpy(localString, baseString, 81);
// Loop to replace '?' with hexadecimal characters based on idx
// Start from the end of the string and move toward the beginning
for (int i = 79; i >= 0; i--) {
if (localString[i] == '?') {
int hexVal = idx % 16; // Get the remainder when idx is divided by 16
if (hexVal < 10) {
localString[i] = '0' + hexVal; // If hexVal is a single-digit number
} else {
localString[i] = 'A' + (hexVal - 10); // If hexVal is a letter (A-F)
}
idx /= 16; // Divide idx by 16 for the next '?'
}
}
// Store the generated string into the result array on the GPU
memcpy(&result[(blockIdx.x * blockDim.x + threadIdx.x) * 81], localString, 81);
}
// Main program function
int main() {
// Initialize your 80-character string with 14 '?' characters, plus a null-terminator
char baseString[81] = "BASE_STRING_WITH_14_?";
// Declare device pointers for the base string and the result array
char *d_baseString, *d_result;
// Number of permutations to generate in this subset (due to memory limitations)
unsigned long long subset_size = 1e5;
size_t result_size = 81 * subset_size; // Size of the result array in bytes
// Allocate memory on the GPU for the base string and result array
cudaMalloc((void**)&d_baseString, 81);
cudaMalloc((void**)&d_result, result_size);
// Copy the base string from the CPU to the GPU
cudaMemcpy(d_baseString, baseString, 81, cudaMemcpyHostToDevice);
// Define the number of threads per block and the number of blocks per grid
int threadsPerBlock = 256;
int blocksPerGrid = (subset_size + threadsPerBlock - 1) / threadsPerBlock;
// Launch the CUDA Kernel
generatePermutations<<>>(d_baseString, d_result, subset_size, 0);
// Allocate memory on the CPU to store the result and copy it from the GPU
char *h_result = (char*) malloc(result_size);
cudaMemcpy(h_result, d_result, result_size, cudaMemcpyDeviceToHost);
// You can now process the result further or save it to a file
// Free the allocated memory on the GPU and CPU
cudaFree(d_baseString);
cudaFree(d_result);
free(h_result);
return 0;
}
nvcc filename.cu -o outputname
./outputname
char *h_result = (char*) malloc(result_size);
cudaMemcpy(h_result, d_result, result_size, cudaMemcpyDeviceToHost);
OpenSSL_add_all_algorithms();
unsigned char hash[SHA256_DIGEST_LENGTH];
SHA256_CTX sha256;
SHA256_Init(&sha256);
SHA256_Update(&sha256, permutation_string, strlen(permutation_string));
SHA256_Final(hash, &sha256);
EC_KEY *eckey = EC_KEY_new_by_curve_name(NID_secp256k1);
BIGNUM *bn = BN_bin2bn(hash, 32, NULL);
EC_KEY_set_private_key(eckey, bn);
EC_KEY_generate_key(eckey);
const EC_POINT *pub_key = EC_KEY_get0_public_key(eckey);
size_t size = EC_POINT_point2oct(group, pub_key, POINT_CONVERSION_COMPRESSED, NULL, 0, NULL);
unsigned char *compressed_key = malloc(size);
EC_POINT_point2oct(group, pub_key, POINT_CONVERSION_COMPRESSED, compressed_key, size, NULL);
free(h_result);
EC_KEY_free(eckey);
BN_free(bn);
free(compressed_key);
gcc your_file.c -o your_program -lcrypto
#include
#include
#include
#include
#include
#include
#include
__global__ void generatePermutations(char *baseString, char *result, unsigned long long num_permutations, unsigned long long offset) {
unsigned long long idx = blockIdx.x * blockDim.x + threadIdx.x + offset;
if (idx >= num_permutations) return;
char localString[81];
memcpy(localString, baseString, 81);
for (int i = 79; i >= 0; i--) {
if (localString[i] == '?') {
int hexVal = idx % 16;
localString[i] = hexVal < 10 ? '0' + hexVal : 'A' + (hexVal - 10);
idx /= 16;
}
}
memcpy(&result[(blockIdx.x * blockDim.x + threadIdx.x) * 81], localString, 81);
}
int main() {
char baseString[81] = "BASE_STRING_WITH_14_?";
char *d_baseString, *d_result;
unsigned long long subset_size = 1e3;
size_t result_size = 81 * subset_size;
cudaMalloc((void**)&d_baseString, 81);
cudaMalloc((void**)&d_result, result_size);
cudaMemcpy(d_baseString, baseString, 81, cudaMemcpyHostToDevice);
int threadsPerBlock = 256;
int blocksPerGrid = (subset_size + threadsPerBlock - 1) / threadsPerBlock;
generatePermutations<<>>(d_baseString, d_result, subset_size, 0);
char *h_result = (char*) malloc(result_size);
cudaMemcpy(h_result, d_result, result_size, cudaMemcpyDeviceToHost);
// Initialize OpenSSL
OpenSSL_add_all_algorithms();
for (int i = 0; i < subset_size; ++i) {
char *perm = &h_result[i * 81];
// Generate SHA-256 Hash
unsigned char hash[SHA256_DIGEST_LENGTH];
SHA256_CTX sha256;
SHA256_Init(&sha256);
SHA256_Update(&sha256, perm, strlen(perm));
SHA256_Final(hash, &sha256);
// Generate Public Key
EC_KEY *eckey = EC_KEY_new_by_curve_name(NID_secp256k1);
BIGNUM *bn = BN_bin2bn(hash, 32, NULL);
EC_KEY_set_private_key(eckey, bn);
EC_KEY_generate_key(eckey);
// Generate Compressed Public Key
const EC_GROUP *group = EC_KEY_get0_group(eckey);
const EC_POINT *pub_key = EC_KEY_get0_public_key(eckey);
size_t size = EC_POINT_point2oct(group, pub_key, POINT_CONVERSION_COMPRESSED, NULL, 0, NULL);
unsigned char *compressed_key = (unsigned char*) malloc(size);
EC_POINT_point2oct(group, pub_key, POINT_CONVERSION_COMPRESSED, compressed_key, size, NULL);
// TODO: Store or process the keys
// Cleanup
EC_KEY_free(eckey);
BN_free(bn);
free(compressed_key);
}
// Final Cleanup
free(h_result);
cudaFree(d_baseString);
cudaFree(d_result);
return 0;
}
nvcc -o combined_program combined_program.cu -lssl -lcrypto
./combined_program