# Password Cracking with Brute Force Algorithm and Dictionary Attack Using Parallel Programming
## 5 Results and Discussion
However, the lower the number of chunks used in dynamic scheduling, the slower the execution time becomes compared to the sequential code. In other words, the more chunks we have in the dynamic scheduling, the higher speedup we obtain in comparison with the sequential program. Below is a graph that shows the different settings used on ten different passwords with their elapsed times recorded. Figure 13 below shows the results of the third technique. In addition, we made sure the output contained the iteration number in which the password was found (equal to the index of the password in the dictionary list), the thread number that processed the list of the entered password, and, most importantly, the elapsed time taken when running the thread. In the screenshot below, one of the tests was captured related to testing the dynamic scheduling with four chunks in eight threads. For the four chunks, the program divides the password list into four equal parts, and each part is processed by a separate thread. This means that the workload is evenly distributed across four threads, which can lead to faster execution times than sequential processing. However, if one thread finishes its part of the workload earlier than the others, it does not have to wait until the remaining threads finish processing their parts because it is dynamic, in contrast to static, where it has to wait for the remaining threads to finish their parts. In our fourth approach, we aim to examine the efficiency of various GPU types for password cracking using the widely known tool Hashcat, as shown in Figure 14. The results of our study indicate that without including special characters in the Hashcat parameters, GPU 0 (Intel(R) HD Graphics 630) took 23 s to crack the password list mentioned earlier with a speed of 254.8 MH/s, whereas GPU 1 (NVIDIA GeForce GTX 1050 Ti) completed the same task in just 2 s with a speed of 2558.3 MH/s. This means that GPU 1 is approximately 11.5 times faster than GPU 0 for cracking passwords at hand, despite the fact that the machine's CPU supported GPU 0. Regarding the inclusion of special characters in the character set, the combination of CPU and GPU 0 took 197 s to crack the specified password list, while GPU 1 was able to complete the same task in just 19 s. Therefore, GPU 1 is approximately 10.4 times faster than the combination of CPU and GPU 0 for the given  
Figure 12: Ten various passwords being tested for the Dictionary Attack. task of cracking the password list. Our results reveal that the elapsed time for cracking passwords increased significantly when special characters were added to the Hashcat parameters. Specifically, the combination of CPU and GPU 0 required 197 s to complete the task, which is significantly longer than the 23 s it took to crack the same password list without special characters. This indicates that the inclusion of special characters in passwords can make the cracking process more challenging. Similarly, GPU1 required 19 s to crack the password list when special characters were added, compared to just 2 s when no special characters were included. Table 5 below shows the brute force attack test results. In the dictionary attack, our experiment demonstrates that GPU 1 (NVIDIA GeForce GTX 1050 Ti) with CUDA performs significantly better than CPU + GPU 0 (the combination of Intel(R) Core(TM) i7-7700 HQ CPU and Intel(R) HD Graphics 630). In terms of units, GPU 1 (CUDA) has an average speed of 10,650 kHz/s, while the average speed of CPU + GPU 0 is 2864.3 kHz/s. The speed difference between the two is substantial. Regarding the elapsed time, CPU + GPU 0 required five more seconds to complete the task, which is three seconds slower than GPU 1 (CUDA). Table 6 shows the dictionary attack test results. Figure 13: A comparison dictionary attack by varying parameters using OpenMP.