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

Function thread_process_bsgs_backward

keyhunt.cpp:5072–5324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5070DWORD WINAPI thread_process_bsgs_backward(LPVOID vargp) {
5071#else
5072void *thread_process_bsgs_backward(void *vargp) {
5073#endif
5074 FILE *filekey;
5075 struct tothread *tt;
5076 char xpoint_raw[32],*aux_c,*hextemp;
5077 Int base_key,keyfound;
5078 Point base_point,point_aux,point_found;
5079 uint32_t k,l,r,salir,thread_number,entrar,cycles;
5080
5081 IntGroup *grp = new IntGroup(CPU_GRP_SIZE / 2 + 1);
5082 Point startP;
5083
5084 int hLength = (CPU_GRP_SIZE / 2 - 1);
5085
5086 Int dx[CPU_GRP_SIZE / 2 + 1];
5087 Point pts[CPU_GRP_SIZE];
5088
5089 Int dy;
5090 Int dyn;
5091 Int _s;
5092 Int _p;
5093 Int km,intaux;
5094 Point pp;
5095 Point pn;
5096 grp->Set(dx);
5097
5098 tt = (struct tothread *)vargp;
5099 thread_number = tt->nt;
5100 free(tt);
5101
5102 cycles = bsgs_aux / 1024;
5103 if(bsgs_aux % 1024 != 0) {
5104 cycles++;
5105 }
5106
5107 intaux.Set(&BSGS_M_double);
5108 intaux.Mult(CPU_GRP_SIZE/2);
5109 intaux.Add(&BSGS_M);
5110
5111 entrar = 1;
5112 /*
5113 while base_key is less than n_range_end then:
5114 */
5115 do {
5116
5117#if defined(_WIN64) && !defined(__CYGWIN__)
5118 WaitForSingleObject(bsgs_thread, INFINITE);
5119#else
5120 pthread_mutex_lock(&bsgs_thread);
5121#endif
5122 if(n_range_end.IsGreater(&n_range_start)) {
5123 n_range_end.Sub(&BSGS_N_double);
5124 if(n_range_end.IsLower(&n_range_start)) {
5125 base_key.Set(&n_range_start);
5126 }
5127 else {
5128 base_key.Set(&n_range_end);
5129 }

Callers

nothing calls this directly

Calls 15

bloom_checkFunction · 0.85
bsgs_secondcheckFunction · 0.70
SetMethod · 0.45
MultMethod · 0.45
AddMethod · 0.45
IsGreaterMethod · 0.45
SubMethod · 0.45
IsLowerMethod · 0.45
GetBase16Method · 0.45
ComputePublicKeyMethod · 0.45
NegMethod · 0.45
AddDirectMethod · 0.45

Tested by

no test coverage detected