[ Merci-Libre ]
Check out the source code here.
:::UPDATE:::
I recently rewrote this entire project in Rust— this page serves as an archive of the old project details.
CLI-tool to generate extremely strong passwords using random number generation. Designed for backend usage, or personal use. Written in C.
Genpass was designed to generate extremely strong passwords using an 8x8 matrix and truncating the generated text to a formatted string. It supports printable ASCII, ASCII excluding spaces, both lowercase and uppercase English alphabet, and numerical generation. This is what I had named "the Gordian Knot" as it is extremely easy to make the passwords, but difficult to break the strength of the passwords.
Efficiency
The Gordian Knot algorithm was tested against KeePassXC's password generating algorithm. From an average of 1000 generated passwords, Genpass had beat KeePassXC performance wise by using 70% less CPU resources while only generating passwords with 2% weaker bit entropy. This was tested by generating strings of length 10, 128, and 256 character long passwords.
How it was built
The idea of the Gordian Knot came to me while I was at work one day. I was calculating the total possibilities of the Infinite Monkey Theorem. I was sitting there calculating the total possibilities of 16 character long strings using all printable ASCII and came to this insanely absurd number of 7.9*10^19 possible combinations. When I got home that night, I got to work on my algorithm.
A big issue I had when I was building this project was that the strings that the program was generating was not random enough. After some time thinking about it, I said to myself: "what if I had a matrix of these characters be generated, and then truncated them down to a string?" Of course this would increase my time complexity to O(n^2)— but when it comes to security, it shouldn't really matter if a program takes long— as long as it could generate strong passwords, it works. Currently, the only issue I now have is that the program has some waste of system resources, which I plan on optimizing sometime soon. So, I implemented the matrix system and it was working just fine! Except now my issue is that if you run the program simultaneously, the random number seed would output the same exact password, creating a side-channel that an attacker could use to their advantage. The best way I found to mitigate this was to use the PID of the program, AND add some more mathematical operations to the random number seed to mitigate this side-channel.
Sure, this makes the password generation a tad-bit longer, but now it is more secure.