Photo by Tim Johnson on Unsplash

4 quick ways to create random phrases

Password generation methods for general purpose only

I’ve summarised some quick methods for those who are not concerned about random phrases and want to use a quick way of randomisation.

1. gpg

gpg — armor — gen-random 0|1|2 [count]

2. /dev/random

cat /dev/random | base64 | head -c 120
In Unix-like operating systems, /dev/random, /dev/urandom and /dev/arandom are special files that serve as pseudorandom number generators. They allow access to environmental noise collected from device drivers and other sources

When to use /dev/random vs /dev/urandom

3. pwgen

$ pwgen
chah0Jox go8Ei5pe ohmaiY3j leiXai3F roo0uChe Ahn1Thie choo2Sae
iek9ohYi Eag8OYei GoeC4eem ushal6Tu eeH5ee5s Och0ohha ohcieH2t
koi7Ohk8 Hae1naqu eeWu2eil aagu1Eek quac4Tha au2Eath4 ohph2IX5
ooXoud9G iej5ohVo ie9Rai6u MaiGu0ci geiW2eiB idoSah5E bai7Iesu
...

The pwgen program generates passwords which are designed to be easily memorized by humans, while being as secure as possible. Human-memorable passwords are never going to be as secure as
 completely completely random passwords. In particular, passwords generated by pwgen without the -s option should not be used in places where the password could be attacked via an off-line
 brute-force attack. On the other hand, completely randomly generated passwords have a tendency to be written down, and are subject to being compromised in that fashion.
# Debian/Ubuntu
$ apt-get install -y pwgen
# Fedora
$ dnf install -y pwgen
# Centos
$ yum install -y pwgen
# Mac
$ brew install pwgen

4. openssl

openssl rand -base64 14

Are you concerned about entropy check this out “Twitter as an extra entropy source” , or this idea “Lava lamps to create ‘randomness’ on CloudFlare