- time(&end);
- unsigned long elapsed_time = difftime(end, start);
- if(keys_found){
- PrintAndLog("Success! Tested %"PRIu32" states, found %u keys after %u seconds", total_states_tested, keys_found, elapsed_time);
+ // enumerate states using all hardware threads, each thread handles one bucket
+ PrintAndLog("Starting %u cracking threads to search %u buckets containing a total of %"PRIu64" states...", thread_count, bucket_count, maximum_states);
+
+ for(size_t i = 0; i < thread_count; i++){
+ pthread_create(&threads[i], NULL, crack_states_thread, (void*) i);
+ }
+ for(size_t i = 0; i < thread_count; i++){
+ pthread_join(threads[i], 0);
+ }
+
+ time(&end);
+ double elapsed_time = difftime(end, start);
+
+ if(keys_found){
+ PrintAndLog("Success! Tested %"PRIu32" states, found %u keys after %.f seconds", total_states_tested, keys_found, elapsed_time);