# Password Cracking with Brute Force Algorithm and Dictionary Attack Using Parallel Programming
## 6 Comparison and Analysis  
Experiments were performed by the authors of [7] using both brute force and dictionary attack methods. The brute force method effectively cracked relatively short passwords (six to seven characters) on SHA-1 password hash. However, the tests demonstrated that brute force was not very successful in cracking passwords consisting of eight or more characters. Similarly, our experiment showed that the longer the passwords are, the longer it takes to crack them successfully by the brute force attack. The authors of [7] implemented their work using a cybersecurity software called \"Hashcat\" with the 5.1.0 version. Nevertheless, we have written codes in Python and C++ from scratch to perform brute force and dictionary attacks. Moreover, we assessed hardware configurations for the two cybersecurity attacks mentioned using Hashcat version 6.2.6. The password encryption employed was MD5, which differed from the SHA-1 encryption used in [7]. Although the authors of [7]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Performance Metrics** & **CPU + GPU 0** & **GPU 1 CUDA Only** \\ \hline Time (s) & 5 & 2 \\ \hline Speed (kH/s) & 2864.3 & 10,650 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Dictionary attack test results.  
Figure 14: A comparison of elapsed time between various hardware configurations and charsets.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Brute Force** & **Dictionary Attack with** & **Dictionary Attack with OpenMP in C++** & **Brute Force Attack with** \\  & **Technique \#1** & **Python Technique \#2** & **Technique \#3** & **Using GPU 1 (CUDA) \#4** \\ \hline Execution Time & 6.6342 s. & 0.0723827 s. & 0.041 s. & 2 s. \\ \hline \hline \end{tabular}
\end{table}
Table 7: Improved performance obtained with modified parameters.  
used a different method of execution and setup to implement their tests, our experiment and their experiment both demonstrated that when attempting to crack notably lengthy passwords, the dictionary attack was more successful than a brute force attack. In the brute force attack, ref. [7] used a character set that only included small and capital English letters, while we augmented this set by adding special characters.  
When comparing our work with previous work in [28], it can be seen that both papers aim to explore techniques for parallelizing password cracking, specifically the dictionary attack. Still, there are significant differences between the two in terms of the approach and methodology. Reference [28] focuses on parallelizing the MD5 and SHA1 hashing algorithms using the KASTL library on three different systems with varying hardware specifications. The authors experimented with various word lists of different sizes and added arbitrary words to them. They compared the performance of CPU and GPU processing using different tools and libraries and concluded that GPU processing is much faster than CPU processing. They also had to modify existing code to allow for parallelization using KASTL. On the other hand, our paper compares four different techniques for conducting brute force and dictionary attacks on a list of passwords obtained from the RockYou data breach. The techniques used were ProcessPoolExecutor in Python, multiprocessing module in Python, and OpenMP in C++. We compared sequential and parallel execution times for each technique and concluded that multiprocessing in Python was the most efficient for the dictionary attack, while OpenMP in C++ was the most efficient for brute force attacks.