MCPcopy Create free account
hub / github.com/albertobsd/keyhunt / thread_process

Function thread_process

keyhunt.cpp:2511–3099  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2509DWORD WINAPI thread_process(LPVOID vargp) {
2510#else
2511void *thread_process(void *vargp) {
2512#endif
2513 struct tothread *tt;
2514 Point pts[CPU_GRP_SIZE];
2515 Point endomorphism_beta[CPU_GRP_SIZE];
2516 Point endomorphism_beta2[CPU_GRP_SIZE];
2517 Point endomorphism_negeted_point[4];
2518
2519 Int dx[CPU_GRP_SIZE / 2 + 1];
2520 IntGroup *grp = new IntGroup(CPU_GRP_SIZE / 2 + 1);
2521 Point startP;
2522 Int dy;
2523 Int dyn;
2524 Int _s;
2525 Int _p;
2526 Point pp;
2527 Point pn;
2528 int i,l,pp_offset,pn_offset,hLength = (CPU_GRP_SIZE / 2 - 1);
2529 uint64_t j,count;
2530 Point R,temporal,publickey;
2531 int r,thread_number,continue_flag = 1,k;
2532 char *hextemp = NULL;
2533
2534 char publickeyhashrmd160[20];
2535 char publickeyhashrmd160_uncompress[4][20];
2536 char rawvalue[32];
2537
2538 char publickeyhashrmd160_endomorphism[12][4][20];
2539
2540 bool calculate_y = FLAGSEARCH == SEARCH_UNCOMPRESS || FLAGSEARCH == SEARCH_BOTH || FLAGCRYPTO == CRYPTO_ETH;
2541 Int key_mpz,keyfound,temp_stride;
2542 tt = (struct tothread *)vargp;
2543 thread_number = tt->nt;
2544 free(tt);
2545 grp->Set(dx);
2546
2547 do {
2548 if(FLAGRANDOM){
2549 key_mpz.Rand(&n_range_start,&n_range_end);
2550 }
2551 else {
2552 if(n_range_start.IsLower(&n_range_end)) {
2553#if defined(_WIN64) && !defined(__CYGWIN__)
2554 WaitForSingleObject(write_random, INFINITE);
2555 key_mpz.Set(&n_range_start);
2556 n_range_start.Add(N_SEQUENTIAL_MAX);
2557 ReleaseMutex(write_random);
2558#else
2559 pthread_mutex_lock(&write_random);
2560 key_mpz.Set(&n_range_start);
2561 n_range_start.Add(N_SEQUENTIAL_MAX);
2562 pthread_mutex_unlock(&write_random);
2563#endif
2564 }
2565 else {
2566 continue_flag = 0;
2567 }
2568 }

Callers

nothing calls this directly

Calls 15

bloom_checkFunction · 0.85
generate_binaddress_ethFunction · 0.70
searchbinaryFunction · 0.70
writekeyFunction · 0.70
writekeyethFunction · 0.70
SetMethod · 0.45
RandMethod · 0.45
IsLowerMethod · 0.45
AddMethod · 0.45
GetBase16Method · 0.45
SetInt32Method · 0.45
MultMethod · 0.45

Tested by

no test coverage detected