Bitcoin Forum
November 01, 2024, 01:36:21 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 [202] 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 ... 326 »
  Print  
Author Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it  (Read 221856 times)
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
November 14, 2023, 08:34:45 PM
 #4021

   
o.0 🧐 Can I play a bit as well with your new tool Zahid? 🤤 I don't know whether this emoji has died from drowning with a happy face or is just drooling 🤤, So that means we want both of your new scripts/ tools, the one with colors and this one. 😮


🖤😏
k3ntINA
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
November 18, 2023, 02:52:15 AM
 #4022

Hello friends, I found more interesting things.
As I said before, many triangles are connected in a chain.
After a change, the shapes behaved strangely.
I did one thing, but it was done automatically for all triangles, but on the contrary, the output I expected is outside the rules of geometry and mathematics! It's as if the numbers went into the void...
One digit was separated from the private key and appeared among other numbers.
I want to say that this reaction has nothing to do with what I did. I know graphics and shapes well.
This reaction is definitely private key guide 66.
One of the dear programmers would like to write a code in Python language:
Get a text file containing numbers
Check the numbers line by line for puzzle 66 and if the key is correct, output it in a text file.
It will definitely be a few hours of brute force...
Hey, the puzzle that was solved, I'm paying attention to the programmer's reward.
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
November 18, 2023, 03:03:20 AM
 #4023

Hello friends, I found more interesting things.
As I said before, many triangles are connected in a chain.
After a change, the shapes behaved strangely.
I did one thing, but it was done automatically for all triangles, but on the contrary, the output I expected is outside the rules of geometry and mathematics! It's as if the numbers went into the void...
One digit was separated from the private key and appeared among other numbers.
I want to say that this reaction has nothing to do with what I did. I know graphics and shapes well.
This reaction is definitely private key guide 66.
One of the dear programmers would like to write a code in Python language:
Get a text file containing numbers
Check the numbers line by line for puzzle 66 and if the key is correct, output it in a text file.
It will definitely be a few hours of brute force...
Hey, the puzzle that was solved, I'm paying attention to the programmer's reward.
So you have been trolling us all this time? I thought you were working on public keys when you talked about shapes and whatnot, now you are talking about #66 which is an unknown number and there are no known possible mathematical relations between addresses, rmd160 hashes which are the only available data we have on the unexposed puzzles.

You can't even post a single example to show us what you are talking about,  this is disappointing, I really thought someone has finally cracked the code.😐

🖤😏
alek76
Member
**
Offline Offline

Activity: 93
Merit: 16


View Profile
November 18, 2023, 03:01:33 PM
Last edit: May 01, 2024, 08:38:15 PM by Mr. Big
 #4024

Im made new modification 011.
https://github.com/alek76-2/VanitySearch/tree/main/mod/011

Added functions:
- BIP32 Derivation Path m/0
- Normal Child extended private key
- Serialization Extended Private Key

Vector Test is successful.
SECP256K1.cpp - Output data keys string switch to lowercase.
Enable OpenSSL - Generate Random Seed.
Option: -verbose 4 Enable all info.
Option: -verbose 0 Disable all info.
Rekey multiply by 1000.

Run cmd: VanitySearch.exe -stop -verbose 4 -bip39 12 -level 1 -t 1 -bits 28 -r 10000 12jbtzBb54r97TCwW3G1gCFoumpckRAPdY
Code:
[ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ]
[                                                           ]
[===========================================================]
[                Changes by Alek76 modify 0.11              ]
[===========================================================]
[          Tips: 1NULY7DhzuNvSDtPkFzNo6oRTZQWBqXNE9         ]
[===========================================================]
[    Options added argv [-start] [-bits] and disable SSE    ]
[===========================================================]
[    Options added argv [-bip39] [-level] [-brainwallet]    ]
[===========================================================]
[                                                           ]
[ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ]

[i] Uses OpenSSL for random seed
[i] Use BIP-39 nb Word: 12
[i] Use PBKDF2 2048 Rounds of Seed for Expansion to 512 bits
[i] Verbose level info: 4 Option: -verbose 1 (use 0-4)

Search: 12jbtzBb54r97TCwW3G1gCFoumpckRAPdY [Compressed]

[i] First Seed: slot almost promote quantum say like copy focus anchor book indoor tattoo

[i] BIP32 Extended Private Key index: 0 Serialized:
xprv9s21ZrQH143K3AobdVoCZE3994h4WUcPtNkQ7zNZhBDBD5ZH9SYAMAwFhrpPn77pGPWDuGQYUHJFRtA3mfoxsMjRCDx4ZFkzLvHDrwn6b8G Length: 164

[i] BIP32 Extended Private Key index: 0 Serialized:
xprv9ua3Un4XBSp5TxXso3YWzM8FpnEM6C3zNrcF2wfGiHtX47UWHkHsAySs1aM3RzDiic9muwJ3NmrSmSwAoguDDAaEcGQZfwr2Pfh5gkvREqJ Length: 164
Start Sat Nov 18 17:27:57 2023
Base Key: Randomly changed every 10000 Kkeys
Number of CPU thread: 1

[i] First Seed: long speak broccoli panel vital thumb wedding member rebuild dentist image survey

[i] BIP32 Extended Private Key index: 0 Serialized:
xprv9s21ZrQH143K4CEVbkjazggoWBkBu5wiZfoW9Bjt1ychZyuws6f3xBVgnSPBp4vxAx7yEvdh9badAXe2H2CEDJ65gfZxwXGRN1wrbk2Q5eY Length: 164

[i] BIP32 Extended Private Key index: 0 Serialized:
xprv9udHcaDVg7rQeELQdY8AMEyENhkhu2DccsAPminDg9AjrwhsuwaoGYpGX8bpyfXF2eno5jMWqKprDMV6eMnbS3JLP6Diez8PVGW5dsck2aM Length: 164

[i] Seed: b3fff4545ac167fdc34d52f0834b21ecfa14f2c42e3f0476607c637a4afb67b01245d859d3f7b6287f4ab0f12ddd36e954c000b50943515f50b81ddf840f76dd

Bit 28 CPU Base Key thId 0: d661f3b
[0.00 Mkey/s][GPU 0.00 Mkey/s][Total 2^21.44][Found 0]

    Addr : 12jbtzBb54r97TCwW3G1gCFoumpckRAPdY
    Check: 12jbtzBb54r97TCwW3G1gCFoumpckRAPdY

!!! Result.txt Found key: d916ce8
!!! Result.txt Found key: d916ce8
!!! Result.txt Found key: d916ce8
!!! Result.txt Found key: d916ce8
!!! Result.txt Found key: d916ce8


New function drvKey() - Key derivation. Added Extended_flag.
Code:
void VanitySearch::drvKey(std::string &InData, std::string &InKey, std::string &outMaster, std::string &outChain, bool master_key_fl, uint32_t key_ind, uint8_t depth_ind, std::string &extended_key, Int &outIL, Int &outIR, std::string &pubkey) {

string seed = InData;// seed 64 bytes
string salt = InKey;// salt
unsigned char hseed[64];

Int parentMasterKey;
parentMasterKey.SetInt32(0);// clr
parentMasterKey.Set(&outIL);// Set parent of master key IL

Int parentChainKey;
parentChainKey.SetInt32(0);// clr
parentChainKey.Set(&outIR);// Set parent of chain key IR

//printf("\n  Parent Master Key: %s\n", parentMasterKey.GetBase16().c_str());// check
//printf("\n  Parent Chain Key:  %s\n", parentChainKey.GetBase16().c_str());

//printf("\ndrvKey len: %d seed: %s", (int)seed.length(), seed.c_str());
//printf("\ndrvKey len: %d salt: %s\n", (int)salt.length(), salt.c_str());

// Get index
uint32_t index_u32;
string index_str = "";
uint32_t Normal_Child_index_start = 0;// Use an index between 0 and 2147483647.
// Indexes in this range are designated for normal child extended keys.
// Put data and key through HMAC.
// data = public key + index (concatenated)
// key = chain code
// Indexes in this range are designated for hardened child extended keys.
uint32_t Hardened_Child_index_start = 2147483648;// Use an index between 2147483648 and 4294967295.

if (Hardened_Child_flag) {
index_u32 = Hardened_Child_index_start + key_ind;
} else {
index_u32 = Normal_Child_index_start + key_ind;
}
char itmp[16];
sprintf(itmp, "%08x", index_u32);
index_str = "";
index_str.append(itmp);
//printf("\n[i] index_str: %s ", index_str.c_str());// check index_str

string in_data = "";
// Set index
if (Hardened_Child_flag) {
in_data = "00" + outMaster + index_str;// in_data = outMaster + index_str;
} else {
in_data = pubkey + index_str;
}
//printf("\n[i] !! in_data: %s ", in_data.c_str());// check

// end Get index

// Set input data
if (!master_key_fl) {
seed = in_data;
}
InData = in_data;// update

// Bug fix!!! We hash the data, not the string.
// Get hex of input data
int len_in_data = (int)seed.length() / 2;
if ((seed.length() & 1) == 1 ) len_in_data += 1;// if the data length is not even
unsigned char *hex_buff_in_data = new unsigned char[len_in_data];
for (int j = 0; j < len_in_data; j++) {
unsigned char my1ch_data = 0;
sscanf(&seed[2 * j], "%02hhx", &my1ch_data);
hex_buff_in_data[j] = my1ch_data;// 1 byte
}
// Get hex of input key
int len_in_key = (int)salt.length() / 2;
if ((salt.length() & 1) == 1 ) len_in_key += 1;// if the key length is not even
unsigned char *hex_buff_in_key = new unsigned char[len_in_key];
for (int j = 0; j < len_in_key; j++) {
unsigned char my1ch_key = 0;
sscanf(&salt[2 * j], "%02hhx", &my1ch_key);
hex_buff_in_key[j] = my1ch_key;// 1 byte
}
// Hash function
if (master_key_fl) {
// HMAC sha512
hmac_sha512((unsigned char *)salt.c_str(), (int)salt.length(), (unsigned char *)hex_buff_in_data, len_in_data, hseed);
// the salt "Bitcoin seed" no converting in hex
} else {
// HMAC sha512
hmac_sha512((unsigned char *)hex_buff_in_key, len_in_key, (unsigned char *)hex_buff_in_data, len_in_data, hseed);
// the salt converting in hex!
}

// Reverse bytes
unsigned char hseed_r[64];
int b = 0;
for (b = 0; b < 64; b++) hseed_r[63 - b] = hseed[b];

// Split IL and IR
Int IL;
Int 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.SetInt32(0);
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.SetInt32(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

// Childing Master Key
// MasterKey = (parentMasterKey + MasterKey) % Order _O
if (!master_key_fl) {
IL.ModAddK1order(&parentMasterKey);
}

outIL.Set(&IL);
outIR.Set(&IR);

// debug printf
//printf("\n[i] Output Master Key IL: %s ", IL.GetBase16().c_str());
//printf("\n[i] Output Chain Key  IR: %s \n", IR.GetBase16().c_str());

// Use IL as master secret key, and IR as master chain code.
string masterSecretKey = "";
string masterChainKey = "";
string extended_private_key = "";

string masterSecretKey_tmp = IL.GetBase16().c_str();// 32 bytes
string masterChainKey_tmp = IR.GetBase16().c_str();// The chain code is just an extra 32 bytes that we couple with the private key to create what we call an extended key.

// Output and Normalize lengh 64
string ret1 = "";
string s0 = "0";
for (int i = 0; i < 64 - (int)masterSecretKey_tmp.length(); i++) ret1.append(s0);
masterSecretKey.append(ret1);
masterSecretKey.append(masterSecretKey_tmp);
string ret2 = "";
for (int b = 0; b < 64 - (int)masterChainKey_tmp.length(); b++) ret2.append(s0);
masterChainKey.append(ret2);
masterChainKey.append(masterChainKey_tmp);
// Set output
outMaster = masterSecretKey;
outChain = masterChainKey;
// We use these 64 bytes to create our master extended private key.

// Get Parent Public Key for get check sum
Point pp;
Int pk;
pk.SetInt32(0);

if (master_key_fl) {
pk.Set(&IL);
} else {
pk.Set(&parentMasterKey);
}

pp = secp->ComputePublicKey(&pk);

// The publick key to output for create new input msg HMAC-SHA512
pubkey = secp->GetPublicKeyHex(true, pp);// SECP256K1.cpp changes string uppercase to lowercase !!

// Parrent address for check
string parrent_addr = secp->GetAddress(0, 1, pp);
//printf("\n[i] Parrent Pub key:  %s ", pubkey.c_str());
//printf("\n[i] Parrent address: %s \n", parrent_addr.c_str());

if (Extended_flag) {// test extended ?

// Public key
Point child_Point;
Int child_Key;
child_Key.SetInt32(0);// clr
child_Key.Set(&IL);
child_Point = secp->ComputePublicKey(&child_Key);
// Address
string child_pub_key = secp->GetPublicKeyHex(true, child_Point);
string child_addr = secp->GetAddress(0, 1, child_Point);

//printf("\n[i] Child Pub key: %s ", child_pub_key.c_str());
//printf("\n[i] Child address: %s \n", child_addr.c_str());

  pubkey = child_pub_key;// Use as extended

}

// BIP32 Extended Private Key Serialize:
// Places “xprv” 0488ade4 or “xpub” 0488b21e at the start.
string version = "0488ade4";// 0488ade4 Bitcoin Mainnet private key.
string depth = "00";// How many derivations deep this extended key is from the master key.
string parent_fingerprint = "00000000";// The first 4 bytes of the hash160 of the parent’s public key. This helps to identify the parent later.
string child_index = "00000000";// The index number of this child from the parent.
string chain_code = masterChainKey;// The extra 32 byte secret. This prevents others from deriving child keys without it.
string prepend = "00";
string key = "";// 33 bytes - The private key (prepend 0x00) or public key.

key = prepend + masterSecretKey;

if (!master_key_fl){
child_index = index_str;
}

// Set depth
depth = "";
char dep[8];//char dep[1];
sprintf(dep, "%02x", depth_ind);
depth.append(dep);

// Get hash160
unsigned char hash160_buf[20];
unsigned char first4_buf[4];
secp->GetHash160(P2PKH, true, pp, hash160_buf);
memcpy(first4_buf, hash160_buf, 4);
// unsigned char to string
string my4str = "";
char tmp0[8];
for (int s = 0; s < 4; s++ ) {
sprintf(tmp0, "%02x", first4_buf[s]);
my4str.append(tmp0);
}
// Set parent fingerprint
if (!master_key_fl){
parent_fingerprint = my4str;
}

// check
//printf("\n              depth: %s \n", depth.c_str());
//printf("\n parent_fingerprint: %s \n", parent_fingerprint.c_str());
//printf("\n        child_index: %s \n", child_index.c_str());

// Get check check sum
string in_checksum = version + depth + parent_fingerprint + child_index + chain_code + key;
string checksum = "";// First 4 bytes of 32

// Get check sum
unsigned char key_buff[32];
unsigned char key_buff_ret[32];
// Get hex input data 78 bytes to check sum 4 bytes
unsigned char hex_buff_in[78];
for (int j = 0; j < 78; j++) {
unsigned char my1ch_chk = 0;
sscanf(&in_checksum[2 * j], "%02hhx", &my1ch_chk);
hex_buff_in[j] = my1ch_chk;// 1 byte
}
// Double sha256()
sha256(hex_buff_in, 78, (unsigned char *)key_buff);
sha256((unsigned char *)key_buff, 32, (unsigned char *)key_buff_ret);
char tmp[8];
string ret = "";
for (int s = 0; s < 4; s++ ) {
sprintf(tmp, "%02x", key_buff_ret[s]);
ret.append(tmp);
}
checksum.append(ret);
// end check sum

extended_private_key = in_checksum + checksum;

// Extended private key - num bytes
// 4 + 1 + 4 + 4 + 32 + 1 + 32 + 4 = 82
// 78 bytes data and 4 bytes check sum

// Finally converting everything to Base58
string extended_private_key_base58 = "";// Output data Extended Private Key Serialized.

// Get hex all data 82 bytes
unsigned char hex_buff_ex_priv_key[82];
for (int j = 0; j < 82; j++) {
unsigned char my1ch = 0;
sscanf(&extended_private_key[2 * j], "%02hhx", &my1ch);
hex_buff_ex_priv_key[j] = my1ch;// 1 byte
}
//printf("\n[i] extended_private_key: %s ", extended_private_key.c_str());// check

// Encode Base58
extended_private_key_base58 = EncodeBase58((const unsigned char *)hex_buff_ex_priv_key, (const unsigned char *)hex_buff_ex_priv_key + 82);
// Output data
extended_key = extended_private_key_base58;

if (verbose_fl >= 4) {
int len = (int)extended_private_key.length();
printf("\n[i] BIP32 Extended Private Key index: %u Serialized: \n%s Length: %d \n", key_ind, extended_private_key_base58.c_str(), len);
}

// memory leak ?
delete [] hex_buff_in_data;
delete [] hex_buff_in_key;

}


No one was waiting? I'm back for a while  Smiley



I finally have 2^30.75+ (1,806,000,000) wild kangaroo points stored (offsets of #130s public key). Now it's time to release the tame kangaroos. Hopefully within 2-3 months, I'll have a tame land on a wild trap.
I imagine I am behind the group that found #120 & #125, but maybe luck will be on my side.
Long journey ahead, let's go.
Imagine this situation.
Two kangaroos collided - tame and wild. What will they do next? They will jump with the same jumps and constantly collide. Next, the selected points (DP modulo) are saved several times.
Now the question. What's better? Should you regularly save the path traveled and P points (for each kangaroo in a separate line - in a 243 MB file) or save tens of Gigabytes of selected points?
When you restart the program, startup keys are not created. They load them from the Work_Kangaroos.txt file they saved earlier.
So what would be better, do you need old saved points?
Well, if only one video card is used  Wink
WanderingPhilospher
Full Member
***
Offline Offline

Activity: 1204
Merit: 237

Shooters Shoot...


View Profile
November 18, 2023, 05:46:44 PM
 #4025

I finally have 2^30.75+ (1,806,000,000) wild kangaroo points stored (offsets of #130s public key). Now it's time to release the tame kangaroos. Hopefully within 2-3 months, I'll have a tame land on a wild trap.
I imagine I am behind the group that found #120 & #125, but maybe luck will be on my side.
Long journey ahead, let's go.
Imagine this situation.
Two kangaroos collided - tame and wild. What will they do next? They will jump with the same jumps and constantly collide. Next, the selected points (DP modulo) are saved several times.
Now the question. What's better? Should you regularly save the path traveled and P points (for each kangaroo in a separate line - in a 243 MB file) or save tens of Gigabytes of selected points?
When you restart the program, startup keys are not created. They load them from the Work_Kangaroos.txt file they saved earlier.
So what would be better, do you need old saved points?
Well, if only one video card is used  Wink
Not sure what you mean? If a tame and wild collide; the key is solved. Why do anything else except sweep the funds.
alek76
Member
**
Offline Offline

Activity: 93
Merit: 16


View Profile
November 18, 2023, 07:03:12 PM
 #4026

Not sure what you mean? If a tame and wild collide; the key is solved. Why do anything else except sweep the funds.
Still, they collide at different times. Probably everything needs to be saved. Very large volume. I launched dp 2^20 and already got 7Gb. I load the starting keys from a file. I save working files every 10 minutes, checking the tame kangaroos for compliance with the secp key-point. The loading and saving code is in the Backup.cpp file.
kachev87
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
November 21, 2023, 12:47:17 PM
Last edit: November 21, 2023, 01:42:06 PM by kachev87
 #4027

Has anyone tried this approach? The count of powers of 2 as sum?

Number 1: 2^0
Number 3: 2^0 + 2^1
Number 7: 2^0 + 2^1 + 2^2
Number 8: 2^3
Number 21: 2^0 + 2^2 + 2^4
Number 49: 2^0 + 2^4 + 2^5
Number 76: 2^2 + 2^3 + 2^6
Number 224: 2^5 + 2^6 + 2^7
Number 467: 2^0 + 2^1 + 2^4 + 2^6 + 2^7 + 2^8
Number 514: 2^1 + 2^9
Number 1155: 2^0 + 2^1 + 2^7 + 2^10
Number 2683: 2^0 + 2^1 + 2^3 + 2^4 + 2^5 + 2^6 + 2^9 + 2^11
Number 5216: 2^5 + 2^6 + 2^10 + 2^12
Number 10544: 2^4 + 2^5 + 2^8 + 2^11 + 2^13
Number 26867: 2^0 + 2^1 + 2^4 + 2^5 + 2^6 + 2^7 + 2^11 + 2^13 + 2^14
Number 51510: 2^1 + 2^2 + 2^4 + 2^5 + 2^8 + 2^11 + 2^14 + 2^15
Number 95823: 2^0 + 2^1 + 2^2 + 2^3 + 2^6 + 2^9 + 2^10 + 2^12 + 2^13 + 2^14 + 2^16
Number 198669: 2^0 + 2^2 + 2^3 + 2^11 + 2^16 + 2^17
Number 357535: 2^0 + 2^1 + 2^2 + 2^3 + 2^4 + 2^7 + 2^10 + 2^12 + 2^13 + 2^14 + 2^16 + 2^18
Number 863317: 2^0 + 2^2 + 2^4 + 2^6 + 2^10 + 2^11 + 2^13 + 2^16 + 2^18 + 2^19
Number 1811764: 2^2 + 2^4 + 2^5 + 2^8 + 2^10 + 2^13 + 2^15 + 2^16 + 2^17 + 2^19 + 2^20
Number 3007503: 2^0 + 2^1 + 2^2 + 2^3 + 2^10 + 2^13 + 2^14 + 2^15 + 2^16 + 2^18 + 2^19 + 2^21
Number 5598802: 2^1 + 2^4 + 2^6 + 2^9 + 2^10 + 2^11 + 2^13 + 2^14 + 2^16 + 2^18 + 2^20 + 2^22
Number 14428676: 2^2 + 2^9 + 2^11 + 2^13 + 2^18 + 2^19 + 2^20 + 2^22 + 2^23
Number 33185509: 2^0 + 2^2 + 2^5 + 2^6 + 2^7 + 2^9 + 2^10 + 2^11 + 2^12 + 2^14 + 2^17 + 2^19 + 2^20 + 2^21 + 2^22 + 2^23 + 2^24
Number 54538862: 2^1 + 2^2 + 2^3 + 2^5 + 2^6 + 2^9 + 2^12 + 2^13 + 2^22 + 2^24 + 2^25
Number 111949941: 2^0 + 2^2 + 2^4 + 2^5 + 2^6 + 2^11 + 2^12 + 2^13 + 2^18 + 2^19 + 2^21 + 2^23 + 2^25 + 2^26
Number 227634408: 2^3 + 2^5 + 2^6 + 2^7 + 2^10 + 2^11 + 2^13 + 2^14 + 2^16 + 2^20 + 2^23 + 2^24 + 2^26 + 2^27
Number 400708894: 2^1 + 2^2 + 2^3 + 2^4 + 2^8 + 2^10 + 2^12 + 2^14 + 2^17 + 2^21 + 2^22 + 2^23 + 2^24 + 2^25 + 2^26 + 2^28
Number 1033162084: 2^2 + 2^5 + 2^6 + 2^8 + 2^10 + 2^11 + 2^14 + 2^15 + 2^18 + 2^20 + 2^23 + 2^24 + 2^26 + 2^27 + 2^28 + 2^29
Number 2102388551: 2^0 + 2^1 + 2^2 + 2^6 + 2^8 + 2^9 + 2^10 + 2^13 + 2^14 + 2^15 + 2^16 + 2^17 + 2^18 + 2^19 + 2^22 + 2^24 + 2^26 + 2^27 + 2^28 + 2^29 + 2^30
Number 3093472814: 2^1 + 2^2 + 2^3 + 2^5 + 2^9 + 2^10 + 2^13 + 2^15 + 2^17 + 2^21 + 2^22 + 2^27 + 2^28 + 2^29 + 2^31
Number 7137437912: 2^3 + 2^4 + 2^6 + 2^7 + 2^11 + 2^13 + 2^15 + 2^18 + 2^19 + 2^21 + 2^22 + 2^24 + 2^27 + 2^29 + 2^31 + 2^32
Number 14133072157: 2^0 + 2^2 + 2^3 + 2^4 + 2^8 + 2^12 + 2^15 + 2^16 + 2^18 + 2^21 + 2^22 + 2^25 + 2^27 + 2^30 + 2^32 + 2^33
Number 20112871792: 2^4 + 2^5 + 2^6 + 2^8 + 2^12 + 2^17 + 2^20 + 2^22 + 2^23 + 2^25 + 2^26 + 2^27 + 2^29 + 2^31 + 2^34
Number 42387769980: 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^9 + 2^11 + 2^17 + 2^23 + 2^25 + 2^26 + 2^27 + 2^28 + 2^30 + 2^31 + 2^32 + 2^35
Number 100251560595: 2^0 + 2^1 + 2^4 + 2^7 + 2^9 + 2^11 + 2^13 + 2^14 + 2^16 + 2^18 + 2^20 + 2^21 + 2^22 + 2^24 + 2^25 + 2^26 + 2^28 + 2^30 + 2^32 + 2^33 + 2^34 + 2^36
Number 146971536592: 2^4 + 2^6 + 2^7 + 2^10 + 2^11 + 2^13 + 2^15 + 2^16 + 2^17 + 2^18 + 2^19 + 2^21 + 2^27 + 2^28 + 2^29 + 2^33 + 2^37
Number 323724968937: 2^0 + 2^3 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9 + 2^16 + 2^17 + 2^23 + 2^24 + 2^25 + 2^26 + 2^27 + 2^28 + 2^30 + 2^32 + 2^33 + 2^35 + 2^38
Number 1003651412950: 2^1 + 2^2 + 2^4 + 2^6 + 2^7 + 2^8 + 2^9 + 2^12 + 2^13 + 2^16 + 2^19 + 2^22 + 2^25 + 2^26 + 2^27 + 2^29 + 2^31 + 2^32 + 2^35 + 2^37 + 2^38 + 2^39
Number 1458252205147: 2^0 + 2^1 + 2^3 + 2^4 + 2^6 + 2^10 + 2^11 + 2^14 + 2^15 + 2^17 + 2^19 + 2^20 + 2^23 + 2^25 + 2^26 + 2^31 + 2^32 + 2^33 + 2^36 + 2^38 + 2^40
Number 2895374552463: 2^0 + 2^1 + 2^2 + 2^3 + 2^7 + 2^8 + 2^10 + 2^11 + 2^15 + 2^16 + 2^18 + 2^22 + 2^23 + 2^24 + 2^29 + 2^33 + 2^37 + 2^39 + 2^41
Number 7409811047825: 2^0 + 2^4 + 2^7 + 2^8 + 2^10 + 2^14 + 2^15 + 2^16 + 2^17 + 2^18 + 2^21 + 2^24 + 2^25 + 2^27 + 2^28 + 2^29 + 2^32 + 2^34 + 2^35 + 2^36 + 2^37 + 2^39 + 2^41 + 2^42
Number 15404761757071: 2^0 + 2^1 + 2^2 + 2^3 + 2^7 + 2^8 + 2^10 + 2^12 + 2^13 + 2^17 + 2^19 + 2^20 + 2^22 + 2^24 + 2^25 + 2^28 + 2^29 + 2^31 + 2^33 + 2^41 + 2^42 + 2^43
Number 19996463086597: 2^0 + 2^2 + 2^10 + 2^11 + 2^12 + 2^13 + 2^18 + 2^20 + 2^25 + 2^27 + 2^30 + 2^31 + 2^32 + 2^33 + 2^34 + 2^35 + 2^37 + 2^41 + 2^44
Number 51408670348612: 2^2 + 2^6 + 2^8 + 2^10 + 2^12 + 2^14 + 2^15 + 2^19 + 2^23 + 2^24 + 2^25 + 2^31 + 2^32 + 2^38 + 2^39 + 2^41 + 2^42 + 2^43 + 2^45
Number 119666659114170: 2^1 + 2^3 + 2^4 + 2^5 + 2^7 + 2^10 + 2^11 + 2^12 + 2^13 + 2^16 + 2^18 + 2^20 + 2^21 + 2^23 + 2^28 + 2^33 + 2^34 + 2^36 + 2^38 + 2^39 + 2^42 + 2^43 + 2^45 + 2^46
Number 191206974700443: 2^0 + 2^1 + 2^3 + 2^4 + 2^7 + 2^8 + 2^9 + 2^11 + 2^12 + 2^13 + 2^17 + 2^18 + 2^19 + 2^22 + 2^23 + 2^24 + 2^25 + 2^26 + 2^28 + 2^30 + 2^31 + 2^33 + 2^34 + 2^37 + 2^38 + 2^39 + 2^40 + 2^42 + 2^43 + 2^45 + 2^47
Number 409118905032525: 2^0 + 2^2 + 2^3 + 2^6 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^14 + 2^16 + 2^24 + 2^25 + 2^27 + 2^29 + 2^30 + 2^32 + 2^33 + 2^34 + 2^36 + 2^42 + 2^44 + 2^45 + 2^46 + 2^48
Number 611140496167764: 2^2 + 2^4 + 2^6 + 2^8 + 2^9 + 2^12 + 2^15 + 2^17 + 2^18 + 2^19 + 2^21 + 2^26 + 2^27 + 2^28 + 2^29 + 2^34 + 2^36 + 2^38 + 2^39 + 2^40 + 2^41 + 2^43 + 2^45 + 2^49
Number 2058769515153876: 2^2 + 2^4 + 2^6 + 2^7 + 2^8 + 2^11 + 2^21 + 2^23 + 2^24 + 2^29 + 2^31 + 2^36 + 2^37 + 2^38 + 2^44 + 2^46 + 2^48 + 2^49 + 2^50
Number 4216495639600700: 2^2 + 2^3 + 2^4 + 2^5 + 2^9 + 2^10 + 2^11 + 2^12 + 2^15 + 2^16 + 2^17 + 2^19 + 2^22 + 2^23 + 2^26 + 2^29 + 2^30 + 2^32 + 2^37 + 2^38 + 2^39 + 2^41 + 2^43 + 2^44 + 2^45 + 2^46 + 2^47 + 2^49 + 2^50 + 2^51
Number 6763683971478124: 2^2 + 2^3 + 2^5 + 2^6 + 2^9 + 2^12 + 2^13 + 2^17 + 2^18 + 2^19 + 2^20 + 2^21 + 2^22 + 2^26 + 2^29 + 2^30 + 2^31 + 2^35 + 2^39 + 2^40 + 2^41 + 2^42 + 2^51 + 2^52
Number 9974455244496707: 2^0 + 2^1 + 2^6 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^16 + 2^18 + 2^19 + 2^21 + 2^23 + 2^24 + 2^26 + 2^28 + 2^30 + 2^31 + 2^33 + 2^34 + 2^36 + 2^37 + 2^39 + 2^40 + 2^41 + 2^42 + 2^43 + 2^45 + 2^46 + 2^48 + 2^49 + 2^53
Number 30045390491869460: 2^2 + 2^4 + 2^8 + 2^13 + 2^14 + 2^15 + 2^16 + 2^17 + 2^18 + 2^21 + 2^22 + 2^24 + 2^25 + 2^27 + 2^28 + 2^31 + 2^32 + 2^33 + 2^34 + 2^35 + 2^36 + 2^41 + 2^42 + 2^43 + 2^44 + 2^45 + 2^47 + 2^49 + 2^51 + 2^53 + 2^54
Number 44218742292676575: 2^0 + 2^1 + 2^2 + 2^3 + 2^4 + 2^6 + 2^7 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^13 + 2^14 + 2^15 + 2^18 + 2^22 + 2^23 + 2^25 + 2^27 + 2^28 + 2^29 + 2^33 + 2^34 + 2^36 + 2^37 + 2^39 + 2^43 + 2^44 + 2^48 + 2^50 + 2^51 + 2^52 + 2^55
Number 138245758910846492: 2^2 + 2^3 + 2^4 + 2^9 + 2^10 + 2^12 + 2^14 + 2^15 + 2^16 + 2^18 + 2^20 + 2^23 + 2^24 + 2^25 + 2^26 + 2^32 + 2^35 + 2^38 + 2^39 + 2^40 + 2^42 + 2^45 + 2^48 + 2^49 + 2^51 + 2^53 + 2^54 + 2^55 + 2^56
Number 199976667976342049: 2^0 + 2^5 + 2^9 + 2^11 + 2^12 + 2^15 + 2^19 + 2^20 + 2^25 + 2^28 + 2^30 + 2^35 + 2^36 + 2^37 + 2^39 + 2^40 + 2^42 + 2^44 + 2^45 + 2^46 + 2^49 + 2^50 + 2^54 + 2^55 + 2^57
Number 525070384258266191: 2^0 + 2^1 + 2^2 + 2^3 + 2^6 + 2^10 + 2^12 + 2^13 + 2^15 + 2^17 + 2^19 + 2^22 + 2^23 + 2^24 + 2^25 + 2^26 + 2^31 + 2^32 + 2^33 + 2^35 + 2^36 + 2^37 + 2^39 + 2^42 + 2^43 + 2^45 + 2^46 + 2^48 + 2^51 + 2^54 + 2^56 + 2^57 + 2^58
Number 1135041350219496382: 2^1 + 2^2 + 2^3 + 2^4 + 2^5 + 2^7 + 2^8 + 2^9 + 2^11 + 2^12 + 2^13 + 2^14 + 2^17 + 2^18 + 2^20 + 2^21 + 2^24 + 2^26 + 2^29 + 2^35 + 2^36 + 2^41 + 2^43 + 2^44 + 2^45 + 2^46 + 2^54 + 2^55 + 2^56 + 2^57 + 2^58 + 2^59
Number 1425787542618654982: 2^1 + 2^2 + 2^8 + 2^11 + 2^14 + 2^17 + 2^18 + 2^20 + 2^21 + 2^22 + 2^23 + 2^25 + 2^30 + 2^32 + 2^33 + 2^34 + 2^36 + 2^37 + 2^41 + 2^43 + 2^45 + 2^46 + 2^48 + 2^51 + 2^54 + 2^55 + 2^56 + 2^57 + 2^60
Number 3908372542507822062: 2^1 + 2^2 + 2^3 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9 + 2^11 + 2^13 + 2^15 + 2^16 + 2^20 + 2^25 + 2^26 + 2^28 + 2^29 + 2^31 + 2^33 + 2^34 + 2^35 + 2^36 + 2^42 + 2^44 + 2^46 + 2^48 + 2^50 + 2^51 + 2^52 + 2^53 + 2^57 + 2^58 + 2^60 + 2^61
Number 8993229949524469768: 2^3 + 2^11 + 2^13 + 2^14 + 2^16 + 2^17 + 2^18 + 2^19 + 2^22 + 2^23 + 2^26 + 2^27 + 2^29 + 2^31 + 2^32 + 2^34 + 2^35 + 2^36 + 2^37 + 2^38 + 2^39 + 2^41 + 2^42 + 2^43 + 2^44 + 2^46 + 2^49 + 2^50 + 2^51 + 2^54 + 2^55 + 2^58 + 2^59 + 2^60 + 2^61 + 2^62
Number 17799667357578236628: 2^2 + 2^4 + 2^6 + 2^7 + 2^9 + 2^12 + 2^16 + 2^20 + 2^23 + 2^28 + 2^29 + 2^31 + 2^32 + 2^33 + 2^34 + 2^37 + 2^40 + 2^41 + 2^42 + 2^43 + 2^44 + 2^48 + 2^50 + 2^56 + 2^57 + 2^58 + 2^60 + 2^61 + 2^62 + 2^63
Number 30568377312064202855: 2^0 + 2^1 + 2^2 + 2^5 + 2^6 + 2^11 + 2^13 + 2^14 + 2^17 + 2^20 + 2^21 + 2^23 + 2^24 + 2^26 + 2^32 + 2^34 + 2^36 + 2^37 + 2^40 + 2^44 + 2^45 + 2^47 + 2^51 + 2^52 + 2^53 + 2^59 + 2^61 + 2^63 + 2^64

If you can see the count of the powers of 2 are increasing.
I wrote a small script to try this but if someone can make multy gpu Windows/Linux program with that approach to try it.
in the script 2^65 is always present and random randint to try combinations of powers of 2 from 28 to 36 (27,35 in the script) counts in random for the puzzle #66.

import bitcoin
import ecdsa
import base58
import random
import logging

# Function to convert private key to Wallet Import Format (WIF)
def private_key_to_wif(private_key):
    wif = bitcoin.encode_privkey(bitcoin.decode_privkey(private_key, 'hex'), 'wif')
    return wif

# Function to convert private key to Bitcoin address (P2PKH)
def private_key_to_address(private_key):
    sk = ecdsa.SigningKey.from_string(bytes.fromhex(private_key), curve=ecdsa.SECP256k1)
    vk = sk.get_verifying_key()
    compressed_vk = vk.to_string('compressed').hex()
    address = bitcoin.pubkey_to_address(compressed_vk)
    return address

# Function to calculate Hash 160 of a Bitcoin address
def address_to_hash160(address):
    decoded_address = base58.b58decode_check(address)
    return decoded_address[1:].hex()

# Function to generate a Bitcoin private key and check if the corresponding address matches the target address
def generate_private_key(target_hash160):
    while True:
        try:
            num_objects = random.randint(27,35)
            random_values = random.sample(range(0, 65), num_objects)
            random_values.append(65)
            private_key_num = sum([2 ** power for power in random_values])
            private_key = format(private_key_num, '064x')
            bitcoin_address = private_key_to_address(private_key)
            hash160 = address_to_hash160(bitcoin_address)

            print("Private Key:", private_key)

            if hash160 == target_hash160:
                with open('private_key.txt', 'w') as file:
                    file.write(private_key)
                logging.info("Private key saved to 'private_key.txt' file.")
                break
        except Exception as e:
            logging.error(f"Error: {str(e)}")

def main():
    target_hash160 = '20d45a6a762535700ce9e0b216e31994335db8a5'
    logging.basicConfig(filename='bitcoin_keygen.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
    logging.info("Generating private keys...")
    generate_private_key(target_hash160)

if __name__ == "__main__":
    main()
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
November 21, 2023, 04:55:30 PM
 #4028


Hey there, what you are doing is practically breaking "known" keys in to small chunks, in another words, you are looking at those numbers and calculate how to divide them by powers of 2.

If you could find a way to land on any unknown number using your method, it'd be something, but now is just kind of random mode but in a different way.

Why don't you work on public keys? Start by figuring things out in small ranges and then scale up to higher bit ranges. Solution is there if you are after one.

🖤😏
mcdouglasx
Member
**
Offline Offline

Activity: 349
Merit: 90

New ideas will be criticized and then admired.


View Profile WWW
November 21, 2023, 04:58:29 PM
 #4029

Has anyone tried this approach? The count of powers of 2 as sum?

If you can see the count of the powers of 2 are increasing.
I wrote a small script to try this but if someone can make multy gpu Windows/Linux program with that approach to try it.
in the script 2^65 is always present and random randint to try combinations of powers of 2 from 28 to 36 (27,35 in the script) counts in random for the puzzle #66.



I think it is basically the same but consuming more resources, if I wanted to try my luck I would do something like this in C, it is more likely that the pub starts with "03". I would omit the ones that start with "02".



Code:
import secp256k1 as ice
import random

print("scaning pub 03...")

target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"

start= 50000000000000000000
end=   70000000000000000000
while True:
    
    A0 = random.randint(start, end)
    A1 = ice.scalar_multiplication(A0)
    B0 = ice.to_cpub(A1.hex())
    
    if B0.startswith("03"):
        A2 = ice.pubkey_to_address(0,1, A1)
        print(A2)
        if target in A2:
            print("venga rata")
            data = open("Win.txt","a")
            data.write(str(A0)+" = "+A2+"\n")
            data.close()

BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
November 21, 2023, 06:50:17 PM
 #4030

it is more likely that the pub starts with "03". I would omit the ones that start with "02".
Nice approach, but do you think there is any possibility to determine how often permutations occur and if there is a solution to find out any pattern of y parity, like if we could figure out how many 02, and 03 keys exist in a certain range and if that could give us a pattern being repeated in all ranges.

That way we could use strides to ignore at least %40 of the whole bit range.

🖤😏
mcdouglasx
Member
**
Offline Offline

Activity: 349
Merit: 90

New ideas will be criticized and then admired.


View Profile WWW
November 21, 2023, 07:49:22 PM
 #4031

it is more likely that the pub starts with "03". I would omit the ones that start with "02".
Nice approach, but do you think there is any possibility to determine how often permutations occur and if there is a solution to find out any pattern of y parity, like if we could figure out how many 02, and 03 keys exist in a certain range and if that could give us a pattern being repeated in all ranges.

That way we could use strides to ignore at least %40 of the whole bit range.

I suppose that to verify this you would have to store a large amount of data to look for a repetition pattern.
We change "02" to 1 and "03" to 0 (as binary).

Code:
import secp256k1 as ice


start= 1
end=   10000
for i in  range (start, end+1):
   
   
    A1 = ice.scalar_multiplication(i)
    B0 = ice.to_cpub(A1.hex())
   
    data = open("test03.txt","a")
    data.write(str(B0)[ :2])
    data.close()

with open('test03.txt', 'r') as file:
  filedata = file.read()

# Replace the target string
filedata = filedata.replace('02', '1')

with open('fileP.txt', 'w') as file:
  file.write(filedata)
 
filedata = filedata.replace('03', '0')

with open('binary.txt', 'w') as file:
  file.write(filedata) 

Then you look for some pattern in the binary sequence.

And if there were, you would only sequentially subtract or add "x" amount to your target, compare it with the pattern and you would know at what point in your pattern the target is, which would mean the end of ecc, if said pattern existed.

BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
November 21, 2023, 09:44:43 PM
 #4032


Do you know anything about secp256k1's P % 4 = 3 ? or if we could identify y parity of all keys based on such formula?
I know this is very complicated but you can get p-x % 4 = 3 every 3 keys apart, for example if you have p % 4 = 3 then p-3 % 4 = 3, p-7 % 4 = 3 etc, maybe that could be used to also find a pattern in determining the exact order of parity of y coordinates.

Do you know I genuinely forget most of the things I discover, I mean I had found a way to always get a result with a float ending in 1, like dividing by a certain scalar and then multiplying  by a different scalar to land on something like 433.000001, I have lost my interest for this puzzle, I need some fuel.🤔

🖤😏
mcdouglasx
Member
**
Offline Offline

Activity: 349
Merit: 90

New ideas will be criticized and then admired.


View Profile WWW
November 22, 2023, 01:57:51 AM
 #4033


Do you know anything about secp256k1's P % 4 = 3 ? or if we could identify y parity of all keys based on such formula?
I know this is very complicated but you can get p-x % 4 = 3 every 3 keys apart, for example if you have p % 4 = 3 then p-3 % 4 = 3, p-7 % 4 = 3 etc, maybe that could be used to also find a pattern in determining the exact order of parity of y coordinates.

Do you know I genuinely forget most of the things I discover, I mean I had found a way to always get a result with a float ending in 1, like dividing by a certain scalar and then multiplying  by a different scalar to land on something like 433.000001, I have lost my interest for this puzzle, I need some fuel.🤔

By being able to partially predict an outcome, you could find a way to get the private key.

BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
nomachine
Member
**
Offline Offline

Activity: 476
Merit: 35


View Profile
November 22, 2023, 09:34:10 PM
Last edit: November 22, 2023, 10:13:12 PM by nomachine
 #4034


Code:
import secp256k1 as ice
import random

print("scaning pub 03...")

target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"

start= 50000000000000000000
end=   70000000000000000000
while True:
    
    A0 = random.randint(start, end)
    A1 = ice.scalar_multiplication(A0)
    B0 = ice.to_cpub(A1.hex())
    
    if B0.startswith("03"):
        A2 = ice.pubkey_to_address(0,1, A1)
        print(A2)
        if target in A2:
            print("venga rata")
            data = open("Win.txt","a")
            data.write(str(A0)+" = "+A2+"\n")
            data.close()

Same script, but with concurrent.futures.


Code:
import concurrent.futures
import sys
import os
import time
import secp256k1 as ice
import random
import multiprocessing


os.system("clear");t = time.ctime();sys.stdout.write(f"\033[?25l")
sys.stdout.write(f"\033[01;33m[+] {t}\n")

def generate_key():
    start = 36893488147419103231
    end = 73786976294838206463
   
    A0 = random.randint(start, end)
    A1 = ice.scalar_multiplication(A0)
    B0 = ice.to_cpub(A1.hex())
   
    if B0.startswith("03"):
        A2 = ice.pubkey_to_address(0, 1, A1)
        message = "[+] {}".format(A2);messages = [];messages.append(message);output = ''.join(messages) + "\r";sys.stdout.write(output);sys.stdout.flush()
        return A0, A2
    else:
        return None, None

def main():
    target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
   
    num_cores = multiprocessing.cpu_count()
   
    with concurrent.futures.ProcessPoolExecutor(max_workers=num_cores) as executor:
        while True:
            futures = [executor.submit(generate_key) for _ in range(num_cores)]
           
            for future in concurrent.futures.as_completed(futures):
                A0, A2 = future.result()
               
                if A2 and target in A2:
                    print("venga rata")
                    with open("Win.txt", "a") as data:
                        data.write(f"{A0} = {A2}\n")
                    break

if __name__ == "__main__":
    main()

You can imagine how this works on a 128 Core machine Grin

bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
BabyBandit
Member
**
Offline Offline

Activity: 392
Merit: 88

The forum of keyboard warriors & crypto pro's!


View Profile WWW
November 23, 2023, 10:34:25 AM
Last edit: November 23, 2023, 12:14:27 PM by BabyBandit
 #4035

This seems funny and interesting =) Tho I don't understand a thing here...  But I still want to join you and try to solve this puzzle so if you have a spot open please keep me know =)
Meanwhile I will go deep in YouTube-tutorial's. See you soon and keep grinding.   Cool

- Regards BabyB. 👼

rosengold
Jr. Member
*
Offline Offline

Activity: 149
Merit: 7


View Profile
November 23, 2023, 11:19:05 AM
 #4036

...

it would be awesome if there's a CUDA version for it.
nomachine
Member
**
Offline Offline

Activity: 476
Merit: 35


View Profile
November 23, 2023, 01:15:48 PM
Last edit: November 23, 2023, 02:13:22 PM by nomachine
 #4037

...

it would be awesome if there's a CUDA version for it.

I can give you this same script that works in C++ but you have to do the GPU part yourself.CUDA programming can be complex, and proper error handling and synchronization are crucial. Also, not all parts of your program may benefit from GPU acceleration, so it's essential to profile and optimize as needed.

puzzle66.cpp
Code:
#include <iostream>
#include <vector>
#include <iomanip>
#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/obj_mac.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/sha.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;
    }

    // Set the target Hash160 value (replace with your target hash)
    std::string target_hash160_hex = "20d45a6a762535700ce9e0b216e31994335db8a5";

    int puzzle = 66;   // The puzzle number (Bits)

    // Clear the console
    std::system("clear");
    std::cout << "\r\033[01;33m[+] Bytea HASH160 Search by NoMachine" << "\n";
    time_t currentTime = std::time(nullptr);
    std::cout << "\r\033[01;33m[+] " << std::ctime(&currentTime) << "\r";
    std::cout << "\r\033[01;33m[+] Puzzle: " << puzzle << "\033[0m" << std::endl;
    std::cout.flush();

    // Calculate the maximum bytes value based on the puzzle
    BIGNUM* limit_int = BN_new();
    BN_set_word(limit_int, 1);
    BN_lshift(limit_int, limit_int, puzzle);
    BN_sub_word(limit_int, 1);
    int max_bytes = (BN_num_bits(limit_int) + 7) / 8;

    // 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);

    while (true) {
        // Create a 32-byte private key with 32 zeros followed by random bytes
        std::vector<unsigned char> private_key_bytes(32, 0);

        // Generate random bytes for the remaining part of the private key
        std::vector<unsigned char> random_bytes(max_bytes);
        if (RAND_bytes(random_bytes.data(), random_bytes.size()) != 1) {
            std::cerr << "Error generating random bytes." << std::endl;
            BN_free(limit_int);
            EC_KEY_free(ec_key);
            return 1;
        }

        // Append the random bytes to the private key
        std::copy(random_bytes.begin(), random_bytes.end(), private_key_bytes.begin() + 32 - max_bytes);

        // Create a BIGNUM from the private key bytes
        BIGNUM* bn_private_key = BN_bin2bn(private_key_bytes.data(), private_key_bytes.size(), NULL);

        // 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);

        // Check if the public key starts with "02" (compressed format)
        if (public_key_bytes[0] == 0x02) {
            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(&currentTime);
                std::tm tmStruct = *std::localtime(&currentTime);

                // 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: " << bytesToHex(private_key_bytes) << 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): " << bytesToHex(private_key_bytes);
                    file << "\n--------------------------------------------------------------------------------------------------------------------------------------------";
                    file.close();
                }

                break;
            }
        }
    }

    // Free the EC_KEY and BIGNUM objects
    BN_free(limit_int);
    EC_KEY_free(ec_key);

    return 0;
}

Script check if the public key starts with "02" (compressed format)  and you can change to "03".

Makefile
Code:
# Makefile

# Source files
SRC = puzzle66.cpp

# Compiler and flags
CXX = g++
CXXFLAGS = -m64 -march=native -mtune=native  -mfpmath=sse -Wall -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -msse4a -mavx -pthread -O3 -I.

# OpenSSL libraries
LIBS = -lssl -lcrypto

# Output executable
TARGET = puzzle66

# Default target
all: $(TARGET)

# Rule for compiling the source code
$(TARGET): $(SRC)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)

# Clean target to remove generated files
clean:
rm -f $(TARGET)

.PHONY: all clean

I am running this on an AMD Ryzen 9 7950X.
It has  compiler flags for AMD which accelerate mathematical crypto functions. A similar file must be created for CUDA.
Good luck....

p.s.
Tested on Puzzle 15 - works fine......
  • Bytea HASH160 Search by NoMachine
  • Thu Nov 23 15:11:22 2023
  • Puzzle: 15
  • Public Key Hash (Hash 160): fe7c45126731f7384640b0b0045fd40bac72e2a2
  • PUZZLE SOLVED: 2023-11-23 15:11:24
  • Target Public Key Hash (Hash160) found! Private Key: 00000000000000000000000000000000000000000000000000000000000068f3

bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
rosengold
Jr. Member
*
Offline Offline

Activity: 149
Merit: 7


View Profile
November 23, 2023, 02:09:12 PM
 #4038


awesome ! I have some cuda functions for Point add and Point Mult, and a basic script working but I need to fix it, sometimes it works and sometimes not... Huh

Code:
[DEV: NVIDIA GeForce G 1111/4095MB] [00000000000000000000000000000000000000000000000000022004DA800000 (50 bit) 
[DEV: NVIDIA GeForce G 1111/4095MB] [000000000000000000000000000000000000000000000000000222B60D800000 (50 bit)
[DEV: NVIDIA GeForce G 1111/4095MB] [0000000000000000000000000000000000000000000000000002256266000000 (50 bit)
[DEV: NVIDIA GeForce G 1111/4095MB] [0000000000000000000000000000000000000000000000000002281873800000 (50 bit)
[DEV: NVIDIA GeForce G 1111/4095MB] [00000000000000000000000000000000000000000000000000022AC9A6800000 (50 bit)
[TARGET: 1] [SPEED: 1632701.66 MKey/s] [TOTAL: 48,937,041,920] [00:05:18]
[2023-11-23.11:08:30] [Info] Found key for address '1MEzite4ReNuWaL5Ds17ePKt2dCxWEofwk'. Written to 'found.txt'

[2023-11-23.11:08:30] [Info] No targets remaining

found the #50 in 5 minutes...
dextronomous
Full Member
***
Offline Offline

Activity: 436
Merit: 105


View Profile
November 23, 2023, 02:28:33 PM
 #4039

wow shit, 1632701.66 MKey/s a second, is this version available somewhere. thanks for the sharing.
btw looking like you are getting there, keep it going,

7isce
Jr. Member
*
Offline Offline

Activity: 61
Merit: 6


View Profile
November 23, 2023, 03:52:14 PM
 #4040

[TARGET: 1] [SPEED: 1632701.66 MKey/s] [TOTAL: 48,937,041,920] [00:05:18]
search 48,937,041,920 keys in 318 seconds

48,937,041,920 / 318
So the real speed is 153,890,068 ~= 153 MKey/s
Pages: « 1 ... 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 [202] 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 ... 326 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!