oftopic. better open a new topic.
https://aioo.be/2015/07/28/Decoding-a-partial-QR-code.html
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.
0x00000000000000000000000000000000003aab07a231499b94e9412cb6d34334
0x0000000000000000000000000000000000000000000000000000000000000034
3fffffffffffffffffffffffffffffffaeabc5e46dbab46156d9d1f37f3b4521
3fffffffffffffffffffffffffffffffaeabb739abd2280eeff497a3340d9050
0000000000000000000000000000000000000eaac1e88c5266e53a504b2db4d1
00000000000000000000000000000000003aab07a231499b94e9412cb6d34400
0x00000000000000000000000000000000003aab07a231499b94e9412cb6d34334
0x0000000000000000000000000000000000000000000000000000000000000034
3fffffffffffffffffffffffffffffffaeabc5e46dbab46156d9d1f37f3b4521
3fffffffffffffffffffffffffffffffaeabb739abd2280eeff497a3340d9050
0000000000000000000000000000000000000eaac1e88c5266e53a504b2db4d1
00000000000000000000000000000000003aab07a231499b94e9412cb6d34400
Puzzle 65 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\xa88\xb15\x05\xb2hg'
Puzzle 64 b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\x05\x1f'\xb0\x91\x12\xd4"
Puzzle 63 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00|\xce^\xfd\xac\xcfh\x08'
and so on....
unsigned char derivedKey[64]; // SHA-512 produces a 64-byte key
if (PKCS5_PBKDF2_HMAC((const char*)BN_bn2hex(minKey), BN_num_bytes(minKey), salt, sizeof(salt), 0, EVP_sha512(), sizeof(derivedKey), derivedKey) != 1) {
// Handle error
return nullptr;
}
****************************************************************************************
int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
const unsigned char *salt, int saltlen, int iter,
const EVP_MD *digest,
int keylen, unsigned char *out);
****************************************************************************************
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 = 31464123230573852164273674364426950
target2 = 6331078
print("Target results:")
for x in range(8388608, 8388700):
result1 = ters(x, target1)
(f"T1: {result1:x}")
for x in range(8388608, 8388700):
result2 = ters(x, target2)
(f"T2: {result2:x}")
for x in range(8388608, 8388700):
result1 = ters(x, target1)
result2 = ters(x, target2)
subtraction = (result1 - result2) % N
print(f"S:{subtraction:x}")
#include
#include
#include
// Function to generate a random private key with PBKDF2-HMAC-SHA512 using OpenSSL's EVP library
BIGNUM* generateRandomPrivateKey(const BIGNUM* minKey, const BIGNUM* maxKey) {
BIGNUM* randomPrivateKey = BN_new();
BIGNUM* range = BN_new();
// Calculate the range (maxKey - minKey)
BN_sub(range, maxKey, minKey);
unsigned char salt[16];
// Generate a random salt
if (RAND_bytes(salt, sizeof(salt)) != 1) {
// Handle error
return nullptr;
}
unsigned char derivedKey[64]; // SHA-512 produces a 64-byte key
if (PKCS5_PBKDF2_HMAC((const char*)BN_bn2hex(minKey), BN_num_bytes(minKey), salt, sizeof(salt), 0, EVP_sha512(), sizeof(derivedKey), derivedKey) != 1) {
// Handle error
return nullptr;
}
// Copy the entire derived key to the BIGNUM
BN_bin2bn(derivedKey, sizeof(derivedKey), randomPrivateKey);
// Ensure that the derived key is within the desired range
BN_mod(randomPrivateKey, randomPrivateKey, range, nullptr);
// Add the minimum value to the generated random number
BN_add(randomPrivateKey, randomPrivateKey, minKey);
// Cleanup the range BIGNUM
BN_free(range);
return randomPrivateKey;
}
// Get Keys from SEED
void VanitySearch::getKeysFromRandomSeed(int nbitL, int nbitU, bool master, int nbThread, Int *keys) {
// Generate a seed byte sequence S of a chosen length (between 128 and 512 bits; 256 bits is advised) from a (P)RNG.
// Calculate I = HMAC-SHA512(Key = "Bitcoin seed", Data = S)
// Split I into two 32-byte sequences, IL and IR.
// Use parse256(IL) as master secret key, and IR as master chain code.
// Variables
Int IL;// IL as master secret key
Int IR;// IR as master chain code
Int pKey;
Int sKey;
// Master key generation
for (int i = 0; i < nbThread; i++) {
newSeed:
string seed = Timer::getSeed(32);// Used the random seed ???
// test seed
//seed = "bla bla bla";// Mnemonic code words
string salt = "Bitcoin seed";// = "VanitySearch";
unsigned char hseed[64];
pbkdf2_hmac_sha512(hseed, 64, (const uint8_t *)seed.c_str(), seed.length(),
(const uint8_t *)salt.c_str(), salt.length(),
hmac_sha512_nb_round);// 1024 Electrum ?
//2048);// 2048 rounds of hashing required by the BIP 39 Standard ???
// Reverse bytes (not use sha256)
unsigned char hseed_r[64];
int b = 0;
for (b = 0; b < 64; b++) hseed_r[63 - b] = hseed[b];
// Split I into two 32-byte sequences, IL and IR.
// Use parse256(IL) as master secret key, and IR as master chain code.
// Split IL and IR
unsigned long long *vTmp_IL = (unsigned long long *)&hseed_r[32];// IL as master secret key
unsigned long long *vTmp_IR = (unsigned long long *)&hseed_r;// IR as master chain code
IL.bits64[0] = vTmp_IL[0];
IL.bits64[1] = vTmp_IL[1];
IL.bits64[2] = vTmp_IL[2];
IL.bits64[3] = vTmp_IL[3];
IL.bits64[4] = 0;
//
IR.bits64[0] = vTmp_IR[0];
IR.bits64[1] = vTmp_IR[1];
IR.bits64[2] = vTmp_IR[2];
IR.bits64[3] = vTmp_IR[3];
IR.bits64[4] = 0;
// end Split
// debug printf
printf("\n[i] Nb: %d Key IL: %s ", i, IL.GetBase16().c_str());
printf("\n[i] Nb: %d Key IR: %s ", i, IR.GetBase16().c_str());
// Set Keys 256 bits
pKey.SetInt32(0);
sKey.SetInt32(0);
// Switch IL or IR
if (master) {
pKey.Set(&IL);// IL as master secret key
} else {
pKey.Set(&IR);// IR as master chain code
}
// Set Key in ranges nbitL and nbitU
uint32_t nb = nbitU / 32;
uint32_t leftBit = nbitU % 32;
uint32_t mask = 1;
mask = (mask << leftBit) - 1;
uint32_t j = 0;
for(j = 0; j < nb; j++)
sKey.bits[j] = pKey.bits[j];
sKey.bits[j] = pKey.bits[j] & mask;
//sha256(hseed, 64, (unsigned char *)sKey.bits64);// No used this function
// Trim with zeros ???
// We do not know how the high byte of the key were edited. 32 BTC Puzzle.
if (nbitU == 66) {
//printf("\n[i] Nb: %d sKey: %s ", i, sKey.GetBase16().c_str());
//sKey.SetByte(8, 0x02);// The high byte is 0x02
sKey.SetByte(8, (unsigned char)KEY66_HIGH_BYTE);// The high byte is 0x03
//printf("\n[i] Nb: %d sKey: %s ", i, sKey.GetBase16().c_str());
}
// Check length
int len = sKey.GetBitLength();
if (len < nbitL) goto newSeed;
keys[i].Set(&sKey);// Set Keys
// Hi ;-) The END ???
}
}
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 = 31464123230573852164273674364426950
target2 = 6331078
print("Target results:")
for x in range(8388608, 8388700):
result1 = ters(x, target1)
(f"T1: {result1:x}")
for x in range(8388608, 8388700):
result2 = ters(x, target2)
(f"T2: {result2:x}")
for x in range(8388608, 8388700):
result1 = ters(x, target1)
result2 = ters(x, target2)
subtraction = (result1 - result2) % N
print(f"S:{subtraction:x}")