Why use AegisPass?
The truth is that SysAdmins, DevOps Engineers, SREs and Software Engineers in general are always looking for ways to improve security and make their lives easier. Sometimes we have to generate passwords using services that we can't guarantee are secure, and that's where AegisPass comes in.
AegisPass is a CLI tool designed for Software Engineers and DevOps Engineers/Site Reliability Engineers (SRE) to simplify the process of generating high-quality random passwords across various platforms and operating systems. AegisPass uses cryptographically secure random numbers along with random.org API to generate random passwords, providing enhanced security for your applications and services with to generate Randomness Mixing.
So, now you can generate passwords with confidence and security, without leaving the terminal.
The Importance of True Random Passwords
High quality random passwords provide a higher level of security compared to those generated using ordinary pseudo-random algorithms. Pseudo-random passwords are generated using deterministic algorithms, which means that if an attacker can determine the initial state of the algorithm or identify patterns in the sequence of generated numbers, they can predict the generated passwords. In contrast, high quality random passwords are generated from sources that are very hard to predict - if not impossible with current technology, such as cryptographically secure random numbers, making them more difficult for attackers to predict or guess based on the origin of the password.
Cryptographically secure random numbers are generated from sources like the operating system's entropy pool, which collects unpredictable data from various hardware and software events to produce high-quality random numbers. AegisPass leverages cryptographically secure random numbers along with the random.org website to generate random passwords, but also supports offline password generation.
The process of randomness mixing, as employed by AegisPass, is also used by other systems like Cloudflare LavaRand, which combines the chaotic patterns of lava lamps with other sources of randomness, such as cryptographically secure random numbers, to generate true random numbers. This further enhances the security and unpredictability of the generated passwords by incorporating multiple layers of randomness.
If you want to learn more about random.org, that AegisPass can use with the --online flag to achieve a higher degree of randomness, you can check their website and decide for yourself if you will utilize it or not.
Why should I trust Aegis?
Short answer: You probably shouldn't trust AegisPass, and that's okay.
Trust is gained, so you can take a look at AegisPass's source code and see that it does not use anything out of the standard library and random.org, in the principle of no-trust. random.org is only contacted when you pass the --online flag.
-
Open Source: AegisPass v2.0 and upwards is open source under the Apache License v2, so you can use it for free and modify it as you wish, as long as you follow the license terms.
-
Randomness Mixing: AegisPass uses a technique called Random Mixing to generate passwords, that is a combination of events that current knowledge deems random, something like that is used by Cloudflare's LavaRand.
-
No trust: AegisPass does not use anything out of the standard library in the principle of no-trust and it works fully offline unless you opt in to random.org with the
--onlineflag. -
Memory hygiene: Passwords are kept as byte slices instead of Go strings and overwritten with zeros right after they are printed, so they don't linger in memory.
-
Cryptographically secure: AegisPass uses cryptographically secure random numbers to generate passwords, so the OS entropy is used to generate the passwords.
How AegisPass works?
You can take a deeper look at the source code and see for yourself, but the basics are here:
-
Shuffling the characters: AegisPass shuffles the set of 82 characters (digits, lowercase letters, uppercase letters and special characters), or only the 10 digits with
--numeric, using cryptographically secure random numbers from Go standard library. Cryptographically secure random numbers are generated from a non-deterministic source, such as the operating system's entropy pool.- OS entropy pool: collects unpredictable data from various hardware events (e.g., keyboard presses, mouse movements) and software events (e.g., disk activity, network traffic) to produce high-quality random numbers. This ensures that the shuffled characters are as random as possible.
-
Picking the characters: The characters are picked from the shuffled set of characters to generate the password. There are ways for this to happen:
-
Default (offline): Aegis uses the OS entropy pool again to pick each character from the shuffled set, then shuffles the finished password with the Fisher-Yates algorithm.
-
Standard mode: Aegis picks one upper case letter, one special character and one digit from their own shuffled sets, fills the rest of the password from the shuffled set of characters like the default mode, then shuffles the finished password so the required characters can end up anywhere.
-
Online mode (Random.org web service): Aegis uses random.org to generate random numbers to pick the characters in a already shuffled set of characters, then shuffles the finished password. Random.org is a random number service that generates randomness from atmospheric noise. This is another step to ensure that the password is as random as possible.
Note: Random.org is a third-party service so we can't guarantee that it's secure, but with only the numbers generated by random.org, it's impossible to generate the password with current computing power. The numbers are used to pick the characters from the shuffled set of characters.
-
-
Wiping from memory: The password is built as a byte slice instead of a Go string (strings can't be changed, so every copy of one would stay in memory until it's reused). It is written straight to the terminal and then overwritten with zeros, along with the shuffled character sets and the random.org numbers that could rebuild it. Go can still leave copies out of reach, so this reduces exposure rather than guaranteeing none is left.
Is AegisPass secure?
AegisPass tries to generate password with a technique called Random Mixing, that is a combination of events that current knowledge deems random. However, we can't guarantee that in the future the passwords generated by AegisPass will be secure, but we can guarantee that the passwords generated by AegisPass are as random as possible with the current knowledge.