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

Function thread_process_bsgs_dance

keyhunt.cpp:4794–5067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4792DWORD WINAPI thread_process_bsgs_dance(LPVOID vargp) {
4793#else
4794void *thread_process_bsgs_dance(void *vargp) {
4795#endif
4796
4797 Point pts[CPU_GRP_SIZE];
4798 Int dx[CPU_GRP_SIZE / 2 + 1];
4799 Point pp,pn,startP,base_point,point_aux,point_found;
4800 FILE *filekey;
4801 struct tothread *tt;
4802 char xpoint_raw[32],*aux_c,*hextemp;
4803 Int base_key,keyfound,dy,dyn,_s,_p,km,intaux;
4804 IntGroup *grp = new IntGroup(CPU_GRP_SIZE / 2 + 1);
4805 uint32_t k,l,r,salir,thread_number,entrar,cycles;
4806 int hLength = (CPU_GRP_SIZE / 2 - 1);
4807
4808 grp->Set(dx);
4809
4810 tt = (struct tothread *)vargp;
4811 thread_number = tt->nt;
4812 free(tt);
4813
4814 cycles = bsgs_aux / 1024;
4815 if(bsgs_aux % 1024 != 0) {
4816 cycles++;
4817 }
4818
4819 intaux.Set(&BSGS_M_double);
4820 intaux.Mult(CPU_GRP_SIZE/2);
4821 intaux.Add(&BSGS_M);
4822
4823 entrar = 1;
4824
4825
4826 /*
4827 while base_key is less than n_range_end then:
4828 */
4829 do {
4830 r = rand() % 3;
4831#if defined(_WIN64) && !defined(__CYGWIN__)
4832 WaitForSingleObject(bsgs_thread, INFINITE);
4833#else
4834 pthread_mutex_lock(&bsgs_thread);
4835#endif
4836 switch(r) {
4837 case 0: //TOP
4838 if(n_range_end.IsGreater(&BSGS_CURRENT)) {
4839 /*
4840 n_range_end.Sub(&BSGS_N);
4841 n_range_end.Sub(&BSGS_N);
4842 */
4843 n_range_end.Sub(&BSGS_N_double);
4844 if(n_range_end.IsLower(&BSGS_CURRENT)) {
4845 base_key.Set(&BSGS_CURRENT);
4846 }
4847 else {
4848 base_key.Set(&n_range_end);
4849 }
4850 }
4851 else {

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
RandMethod · 0.45
GetBase16Method · 0.45
ComputePublicKeyMethod · 0.45
NegMethod · 0.45

Tested by

no test coverage detected