Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added candy #283

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c68e662
Read CHANGELOG.md to see the updates
albertobsd Apr 28, 2023
765f23d
Fixed README.md
albertobsd Apr 28, 2023
63aa8fb
some fixes, check CHANGELOG.md
albertobsd Apr 30, 2023
e5d093f
Update keyhunt.cpp
seega May 4, 2023
65987aa
Update Random.cpp
seega May 4, 2023
f08dff0
Merge pull request #208 from seega/main
albertobsd May 4, 2023
d3d9ef6
cygwin fix v2
seega May 6, 2023
ec56e1f
cygwin fix
seega May 6, 2023
0253114
Revert "cygwin fix"
seega May 6, 2023
6a25033
Update Random.cpp
seega May 6, 2023
1cce3bb
Merge pull request #210 from seega/main
albertobsd May 7, 2023
d29ea17
added option -6 to skip checksums, check CHANGELOG.md
albertobsd May 7, 2023
8d54417
Update keyhunt.cpp
seega May 7, 2023
dfb710b
Merge pull request #212 from seega/main
albertobsd May 7, 2023
8a51838
Added warning for BSGS and Endomorphism, they don't work together
albertobsd May 8, 2023
5a8d6c0
Update README.md
mysterek1337 May 12, 2023
84330e6
Merge pull request #213 from mysterek1337/main
albertobsd May 12, 2023
a278e8c
added keyhunt_legacy.cpp legacy version, check README.md
albertobsd May 16, 2023
98b20ef
removed unused flags in the Makefile
albertobsd May 16, 2023
dddd177
fixed some bugs for legacy version
albertobsd May 17, 2023
3cd3376
Small editions of unused variables
albertobsd May 17, 2023
f92555a
endomorphism for eth
albertobsd May 18, 2023
88934c8
endomorphism for eth in legacy version
albertobsd May 18, 2023
d345a3c
Speed x2 for BSGS mode main
albertobsd May 19, 2023
2b3c218
Double BSGS speed for legacy version
albertobsd May 20, 2023
e3c6762
BSGS Server (Only linux)
albertobsd May 30, 2023
a19a745
Solving some BSGS Server issues
albertobsd Jun 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
endomorphism for eth in legacy version
  • Loading branch information
albertobsd committed May 18, 2023
commit 88934c841fb2be67f4c7875665f91ce193b51444
69 changes: 5 additions & 64 deletions keyhunt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,6 @@ Point _2Gn;

std::vector<Point> GSn;
Point _2GSn;
/*
std::vector<Point> GSn2;
Point _2GSn2;

std::vector<Point> GSn3;
Point _2GSn3;
*/

void menu();
void init_generator();
Expand Down Expand Up @@ -174,7 +167,6 @@ int addvanity(char *target);
int minimum_same_bytes(unsigned char* A,unsigned char* B, int length);

void writekey(bool compressed,Int *key);

void writekeyeth(Int *key);

void checkpointer(void *ptr,const char *file,const char *function,const char *name,int line);
Expand Down Expand Up @@ -217,8 +209,6 @@ void *thread_bPload(void *vargp);
void *thread_bPload_2blooms(void *vargp);
#endif

char *publickeytohashrmd160(char *pkey,int length);
void publickeytohashrmd160_dst(char *pkey,int length,char *dst);
char *pubkeytopubaddress(char *pkey,int length);
void pubkeytopubaddress_dst(char *pkey,int length,char *dst);
void rmd160toaddress_dst(char *rmd,char *dst);
Expand Down Expand Up @@ -2318,29 +2308,6 @@ char *pubkeytopubaddress(char *pkey,int length) {
return pubaddress; // pubaddress need to be free by te caller funtion
}

void publickeytohashrmd160_dst(char *pkey,int length,char *dst) {
char digest[32];
//digest [000...0]
sha256((uint8_t*)pkey, length,(uint8_t*) digest);
//digest [SHA256 32 bytes]
RMD160Data((const unsigned char*)digest,32, dst);
//hash160 [RMD160 20 bytes]
}

char *publickeytohashrmd160(char *pkey,int length) {
char *hash160 = (char*) malloc(20);
char *digest = (char*) malloc(32);
checkpointer((void *)hash160,__FILE__,"malloc","hash160" ,__LINE__ -1 );
checkpointer((void *)digest,__FILE__,"malloc","digest" ,__LINE__ -1 );
//digest [000...0]
sha256((uint8_t*)pkey, length,(uint8_t*) digest);
//digest [SHA256 32 bytes]
RMD160Data((const unsigned char*)digest,32, hash160);
//hash160 [RMD160 20 bytes]
free(digest);
return hash160; // hash160 need to be free by te caller funtion
}

int searchbinary(struct address_value *buffer,char *data,int64_t array_length) {
int64_t half,min,max,current;
int r = 0,rcmp;
Expand Down Expand Up @@ -2576,14 +2543,7 @@ void *thread_process(void *vargp) {
thread_number = tt->nt;
free(tt);
grp->Set(dx);

/*
if(FLAGDEBUG) {
printf("\n[D] thread_process\n");
fflush(stdout);
}
*/


do {
if(FLAGRANDOM){
key_mpz.Rand(&n_range_start,&n_range_end);
Expand All @@ -2606,12 +2566,6 @@ void *thread_process(void *vargp) {
continue_flag = 0;
}
}
/*
if(FLAGDEBUG) {
printf("\n[D] thread_process %i\n",__LINE__ -1 );
fflush(stdout);
}
*/
if(continue_flag) {
count = 0;
if(FLAGMATRIX) {
Expand All @@ -2629,12 +2583,6 @@ void *thread_process(void *vargp) {
THREADOUTPUT = 1;
}
}
/*
if(FLAGDEBUG) {
printf("\n[D] thread_process %i\n",__LINE__ -1 );
fflush(stdout);
}
*/
do {
temp_stride.SetInt32(CPU_GRP_SIZE / 2);
temp_stride.Mult(&stride);
Expand Down Expand Up @@ -2810,9 +2758,8 @@ void *thread_process(void *vargp) {

}
}
}

if(FLAGCRYPTO == CRYPTO_ETH){
}
else if(FLAGCRYPTO == CRYPTO_ETH){
if(FLAGENDOMORPHISM) {
for(k = 0; k < 4;k++) {
endomorphism_negeted_point[k] = secp->Negation(pts[(j*4)+k]);
Expand Down Expand Up @@ -2984,16 +2931,14 @@ void *thread_process(void *vargp) {
keyfound.SetInt32(k);
keyfound.Mult(&stride);
keyfound.Add(&key_mpz);

writekey(false,&keyfound);

}
}
}
}
}
}
if( FLAGCRYPTO == CRYPTO_ETH) {
else if( FLAGCRYPTO == CRYPTO_ETH) {
if(FLAGENDOMORPHISM) {
for(k = 0; k < 4;k++) {
for(l = 0;l < 6; l++) {
Expand Down Expand Up @@ -4927,10 +4872,9 @@ void generate_binaddress_eth(Point &publickey,unsigned char *dst_address) {
publickey.x.Get32Bytes(bin_publickey);
publickey.y.Get32Bytes(bin_publickey+32);
KECCAK_256(bin_publickey, 64, bin_publickey);
memcpy(dst_address,bin_publickey+12,20);
memcpy(dst_address,bin_publickey+12,20);
}


#if defined(_WIN64) && !defined(__CYGWIN__)
DWORD WINAPI thread_process_bsgs_dance(LPVOID vargp) {
#else
Expand Down Expand Up @@ -6325,10 +6269,7 @@ void writekeyeth(Int *key) {
#else
pthread_mutex_unlock(&write_keys);
#endif

free(hextemp);


}

bool isBase58(char c) {
Expand Down
Loading