top of page

Password Generator

  • Writer: Yahvin Gali
    Yahvin Gali
  • Dec 7, 2020
  • 3 min read

Designing a JAVA program that generates hacker-resistant and brute force resistant passwords based upon the user's preference of password length and character settings.



The above picture tells it all: this project is about how I designed a password generator that randomly generates hacker-resistant and brute force resistant passwords based upon user preference. But what do the words "hacker-resistant" or "brute-force resistant" mean? To find out, we need to explore the nature of online passwords, the variety of software protecting them, and the plethora of dangers that put your personal information at risk.


If someone stole your house keys, what would the consequences be? What could you lose? The same consequences apply if your password is "stolen".

Consequences

The passwords you use are they key to your identity and personal information; bank codes, medical records, email info, etc. is protected by passwords. Due to this reason, there are many experienced programmers lurking in the internet, just waiting to steal your personal info via compromised passwords. We call these people, hackers.

Hackers...Hackers Everywhere...

In recent times, the term "Hacker" has come to accommodate just about anyone who uses malicious software to bypass certain cyber-restrictions and acquire information that may harm another individual. To prevent such people from acquiring sensitive info, counter measures must be taken, one being the installation of firewall, anti-virus, or spyware software. However, these high-end forms of protection have a fault - they are useless without strong passwords.


Fight the Power!

This where we must touch base with the concepts of "hacker resistant" and "brute force resistant" passwords. "Hacker resistant" is exactly what it sounds like - these are passwords that are so verbose or complex that they seem just too tough a nut to crack for hackers. As for "brute force resistant" passwords, these are passwords that are capable of outlasting brute force techniques, such as:

  • trial-and-error guessing,

  • keyboard loggers, or

  • harvesting passwords on phishing websites

These passwords are adequate at keeping your personal info safe. However, the construction of some passcodes isn't always fail-proof, as most users create long passwords that relate to them, such as:

ANg3l@d@^!$050298

which consists of a name that seems important to a user, as well as someone's birthdate - all of which is information a hacker can easily acquire via phishing (the act of sending fraudulent emails or enticing users to suspicious websites in order to extract personal info). To prevent this, a randomizer must be created, one capable of constructing passwords that can resist the brute force techniques utilized by hackers.


And that, ladies and gents, is the objective of this program - the Password Generator.


The Bane of Brutes

Such software exist on the open market, but I still wanted to try my own hand at designing a software that constructs (somewhat) fool-proof passwords. The finished program can be accessed from the above image, and is also linked here, to a Github repository.


The program is designed to ask the user the desired complexity of the to-be-password, varying from "Lowercase Letters" [1] to "Lowercase & Uppercase letters, Numbers, & Punctuation" [4]. There is also a "Quit" [5] option available.


               Password Generation Menu
*******************************************************
* [1] Lowercase Letters Only
* [2] Lowercase & Uppercase Letters
* [3] Lowercase, Uppercase, & Numbers
* [4] Lowercase, Uppercase, numbers, & Punctuation
* [5] Quit
*******************************************************

After an option is chosen via user input, the user is once again asked to provide an input, this time specifying the length of the password from 1to 14 characters. Then, a series of if-elif-else statements are enacted that calculate the numerically generated representations of Capitalized/lowercase letters, numbers, or punctuation based upon Unicode standards. Lastly, the password is displayed for the user to see. (User Input is Bolded)


Enter Selection (1-5): 4
4

Password Length (1-14): 14

Password: DCq4tF8xam7s0@

Final Thoughts

I had quite a bit of fun during this project. While I had difficulty specifying the generation of random Unicode values so that proper values were generated within bounds, (which involved lengthy experimentation), I refused to abandon the project. As a result, I was ecstatic when it all worked out in the end. I enjoyed showing my project to my family, who were eager to test it out!

Comments


IMG_5139.jpeg

About Me

Aspiring AI Engineer. Ardent environmentalist. Believer in upliftment through service. Thalassophile. Rookie food experimentalist who brews a mean Chai. Loves to play Piano.

 

Read More

 

© 2021 by Yahvin Gali. Proudly created with Wix.com

  • LinkedIn
  • Facebook
  • Instagram
bottom of page