| 4012 | DWORD WINAPI thread_process_bsgs_random(LPVOID vargp) { |
| 4013 | #else |
| 4014 | void *thread_process_bsgs_random(void *vargp) { |
| 4015 | #endif |
| 4016 | |
| 4017 | FILE *filekey; |
| 4018 | struct tothread *tt; |
| 4019 | char xpoint_raw[32],*aux_c,*hextemp; |
| 4020 | Int base_key,keyfound,n_range_random; |
| 4021 | Point base_point,point_aux,point_found; |
| 4022 | uint32_t l,k,r,salir,thread_number,cycles; |
| 4023 | |
| 4024 | IntGroup *grp = new IntGroup(CPU_GRP_SIZE / 2 + 1); |
| 4025 | Point startP; |
| 4026 | |
| 4027 | int hLength = (CPU_GRP_SIZE / 2 - 1); |
| 4028 | |
| 4029 | Int dx[CPU_GRP_SIZE / 2 + 1]; |
| 4030 | Point pts[CPU_GRP_SIZE]; |
| 4031 | |
| 4032 | Int dy; |
| 4033 | Int dyn; |
| 4034 | Int _s; |
| 4035 | Int _p; |
| 4036 | Int km,intaux; |
| 4037 | Point pp; |
| 4038 | Point pn; |
| 4039 | grp->Set(dx); |
| 4040 | |
| 4041 | |
| 4042 | tt = (struct tothread *)vargp; |
| 4043 | thread_number = tt->nt; |
| 4044 | free(tt); |
| 4045 | |
| 4046 | cycles = bsgs_aux / 1024; |
| 4047 | if(bsgs_aux % 1024 != 0) { |
| 4048 | cycles++; |
| 4049 | } |
| 4050 | |
| 4051 | intaux.Set(&BSGS_M_double); |
| 4052 | intaux.Mult(CPU_GRP_SIZE/2); |
| 4053 | intaux.Add(&BSGS_M); |
| 4054 | |
| 4055 | do { |
| 4056 | |
| 4057 | |
| 4058 | /* | Start Range | End Range | |
| 4059 | None | 1 | EC.N | |
| 4060 | -b bit | Min bit value | Max bit value | |
| 4061 | -r A:B | A | B | |
| 4062 | */ |
| 4063 | #if defined(_WIN64) && !defined(__CYGWIN__) |
| 4064 | WaitForSingleObject(bsgs_thread, INFINITE); |
| 4065 | #else |
| 4066 | pthread_mutex_lock(&bsgs_thread); |
| 4067 | #endif |
| 4068 | |
| 4069 | base_key.Rand(&n_range_start,&n_range_end); |
| 4070 | #if defined(_WIN64) && !defined(__CYGWIN__) |
| 4071 | ReleaseMutex(bsgs_thread); |
nothing calls this directly
no test coverage detected