# Password Cracking with Brute Force Algorithm and Dictionary Attack Using Parallel Programming
## 5 Results and Discussion  
The first technique and the second technique were tested on a computer with the following specifications: Intel(R) Core (TM) i5-9400F CPU, a RAM of 16 GB, and NVIDIA GeForce RTX 2060 Graphic Card. The code in both techniques was written in Python. A list of ten passwords with a max length of six characters as a string was generated randomly with small English characters and numbers. The passwords toward the end of the list are more complicated compared to those at the start. The reason for the increased difficulty in cracking these passwords is that they either contain digits (those with digits at the beginning of the string being particularly difficult) or contain trailing English characters. The organization or arrangement of characters within a character set has a significant impact on the ability to crack passwords. A well-structured character set, such as the one that places English alphabet characters at the beginning followed by digits towards the end, makes it more challenging for an attacker to use brute force techniques to guess a password that begins with trailing characters of the character set. While implementing the brute force technique on very short passwords in a sequential code, we obtained a better score compared with the parallel code. For instance, the first password (the simplest one) took 0.2471 s in serial code and 0.3286 in parallel. However, the longer and more complicated the password becomes, the better the parallel code performs compared to the sequential one. The best improvement obtained was when using the parallel code with the maximum number of cores of the device (six cores). The speedup was 1.9\(\times\) times. Below, Figure 11 illustrates the implementation of the first technique. On the other hand, in the implementation of the second technique, \"dictionary attack\", we decided to test the same list of passwords used with the brute force technique to compare them both. The total number of passwords in the dictionary is almost 14 million, as mentioned previously. Because the passwords tested were generated randomly (are not commonly used), only two passwords were able to be cracked in the dictionary attack technique. There was no improvement noticed between the sequential and parallel codes in Python because of the process performed by the library \"ProcessPoolExecutor\". The process involves breaking down the task (cracking passwords) and distributing it across multiple cores, takes some time and resources, and may result in additional work or overhead, ultimately canceling out any potential benefits of parallel processing. Nevertheless, the execution time of the dictionary attack was tremendously better than the brute force by almost 930 times. Figure 12 below shows the results of the dictionary attack experiment. It is clear that the dictionary attack outperforms the brute force attack in terms of time due to the limited number of iterations available (almost 14 million iterations in this case). However, the brute force attack was able to capture all targeted passwords. The length of the passwords in the brute force attack greatly affects the execution time, whereas, in the dictionary attack, a very long common password can be easily cracked. The first password dictionary attack technique with six cores is faster than the brute force attack by approximately 4.79\(\times\) times. The eighth password was cracked approximately 930\(\times\) times faster because it was complicated by the brute force technique. Figure 11: Ten various passwords being tested for the Brute Force Attack. In the third technique, the experiment was conducted on a computer with the following specifications: 11 th Gen Intel(R) Core (TM) i5-1135G7, a RAM of 8 GB, and Intel(R) Iris(R) Xe Graphics. The experimental outcome showed that the best parameters of parallel processing in terms of execution time occurred with eight-core static scheduling. The execution time was improved by 4.4\(\times\) times, going from 181 to 41 in time elapsed.