HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
ctsrc
Pgen
Rust2018–2024
ctsrc / Pgen

Pgen

Command-line passphrase generator

3Distinct people
19Mentions
0Explicit recommenders
144GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Command-line passphrase generator

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year19 dated mentions

Observed mentions: 2018-02-21 20:38:15 UTC to 2024-03-13 11:08:45 UTC.

024682018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 8 mentions; 2 submissions, 6 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC413
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC303
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC826
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

19 sources
This xkcd comic has been instrumental to me. I wrote a command-line utility a couple of years ago that I use myself regularly to generate secure and memorable passwords https://github.com/ctsrc/Pgen With this tool you can also see how many bits of entropy the passphrase generation settings you are using will result in. For example, generating a 5 word passphrase using the long wordlist pgen -l -n 5 will yield a passphrase like: joyous embolism outsider evasion mashed And when we ask the tool for the entropy with these settings pgen -l -n 5 -e it will tell us: Current settings will create passphrases with 64.62 bits of entropy. And hey, if you have reason to not trust the randomness capabilities of the program or your computer guess what :) My program supports the use of physical dice to generate your password. Have a l
Read the rest
ook, try it out yourselves :D https://github.com/ctsrc/Pgen
In Milk Sad Disclosure
Around 2011 I set up full disk encryption for the first time. The systems I did this on were some second hand computers that I had bought and installed FreeBSD on. The systems were very stable. Too stable! They were running for several weeks until one day when there was a power outage. When power came back I booted the machines up again and I promptly realised that I was not entirely sure about what the convoluted password I had chosen for full disk encryption was exactly. I lost quite a bit of data that day. It taught me to stop with silly 5|_|1357:7|_|7:0|\|5 and to use long passphrases instead. This ensures high entropy without the possibility of forgetting symbols chosen, because there are no symbols to remember. It also taught me to frequently reboot my computers, so that I remember the passphrases to decrypt the disks. I have a tool
Read the rest
that I wrote and which I actively use myself for generating passphrases, it’s called Pgen and it’s open source at https://github.com/ctsrc/Pgen
In Ask HN: When was the last time you lost data?
Interesting points and I agree. Makes me wonder if I should’ve picked a different name for my passphrase generator. I named it “Pgen” and I use it several times per month. https://github.com/ctsrc/Pgen Perhaps “passblazer” or something would have been a better name :thinking: Unfortunately, it’s not really possible to rename it at this point :/ Oh well, maybe some other time I can come up with a creative name for a project instead of an overly descriptive name :)
In Names are not descriptions; descriptions are not names
My greatest accomplishments on GitHub are my projects that I actively use myself, and which other people are using as well. The prime example of this is my Pgen project. https://github.com/ctsrc/Pgen Pgen is a passphrase generator that uses the EFF wordlists for random passphrases. A typical passphrase generated with Pgen looks like: oxford antelope veteran thorn dastardly gem tripod upfront avocado femur moisture sacrifice Pgen is written in Rust. Browse my GitHub profile to see some other projects as well, including my “repotools” project which is very small but super useful and I invoke the repotools commands many times every day. I also have my zshrc on GitHub, the main selling-point of which is the way I have set up my PS1 prompt. It uses different emojis for different machines and adds some extra white space. The emojis are useful b
Read the rest
ecause for a long time I sometimes found it difficult to quickly identify which terminal is logged into which host when I have many terminals open some of which are connected to ssh. Having the hostname in the prompt is nice and all but when you have a handful of terminals or more it’s not very distinct. Coloured emojis take small space and make each host distinct. Vertical spacing between each command invocation makes it more comfortable to read scroll back and more quick to scan.
In Ask HN: What's your greatest achievement on GitHub?
> the “thing you know” could also be at risk. I realize this the older I get. Years ago, when I was in university, I had a couple of machines in my room running FreeBSD with full-disk encryption. These machines were powered on for a few months without reboots until one day when the power went out. Having not typed in the password in months, and at the time using the kind of passwords consisting of long word with a lot of numeric and symbolic substitutions, I was unable to decrypt the disks of my machines. I lost a fair bit of data that day, but it taught me a valuable lesson. These days, any passwords that I use for full disk encryption I make sure to 1. Regularly use. Meaning I’ll reboot machines and retype the passwords on a regular basis. Likewise, I connect external encrypted disks on a regular basis and decrypt them with their passwo
Read the rest
rds. 2. Use pass phrases with many words but without any numbers or special characters. See also https://github.com/ctsrc/Pgen (For websites etc I use a password manager.)
In I've locked myself out of my digital life
correct battery horse staple, but longer and sensible but still unique, and optionally without space. Make up a sentence that makes sense to you, and remove all the spaces, use all lowercase and no special characters. Forgettable: 5uP3r53kr17P455w00r[)!!11One Memorable: ilikestartrekandhamandbeans I used to have full-disk encryption on one of my machines using a password of the forgettable kind. But then the machine had an uptime of months until a power outage, and I realized that while I was fairly sure of the sentence I had no possibility of remembering all of the uppercase and lowercase and symbol and number substitutions. I lost quite a bit of data that day. After that I began using a sentence that makes sense to me but which is not from a book or anything like that for the FDE on my desktop and external hard drives, and I use the pas
Read the rest
s phrase frequently. Simplicity and repetition is the key to remember your master password. As for websites I use a password manager, and I sometimes generate passwords with my own diceware software https://github.com/ctsrc/Pgen but most often I am on my phone or on my laptop and then I use the password generator of the password manager that comes with those Apple devices. I haven’t lost any more data since switching to managing my data encryption and my passwords this way.
In ‘DiceKeys’ creates a master password for life with one roll
Good point. The EFF has made and published three lists of words to use that are easy to spell and generally easy to remember. I wrote a command-line tool in Rust for generating passphrase using these wordlists. I use it myself any time I need a password. My tool is fast, free of charge, open source and it can also tell you the entropy that will result for any given choice of number of words. For example let’s say I want it to give me four words from the long wordlist, and I want to know how many bits of entropy this corresponds to. pgen -l -n 4 -e Current settings will create passphrases with 51.70 bits of entropy. 51.70 bits of entropy. What does that mean, you might ask. The Wikipedia article on password strength (https://en.wikipedia.org/wiki/Password_strength) explains it well: > A password with an entropy of 42 bits calcula
Read the rest
ted in this way would be as strong as a string of 42 bits chosen randomly, for example by a fair coin toss. Put another way, a password with an entropy of 42 bits would require 2^42 (4,398,046,511,104) attempts to exhaust all possibilities during a brute force search. Thus, by increasing the entropy of the password by one bit the number of guesses required doubles, making an attacker's task twice as difficult. On average, an attacker will have to try half the possible number of passwords before finding the correct one. Ok, so how good is 51.70 bits of entropy, you ask? Wikipedia, same article again: > The minimum number of bits of entropy needed for a password depends on the threat model for the given application. [...] RFC 4086, "Randomness Requirements for Security", presents some example threat models and how to calculate the entropy desired for each one. Their answers vary between 29 bits of entropy needed if only online attacks are expected, and up to 96 bits of entropy needed for important cryptographic keys used in applications like encryption where the password or key needs to be secure for a long period of time and stretching isn't applicable. So let's say that you are satisfied with 51.70 bits of entropy in this case. What does a password like that look like? Let's generate one. pgen -l -n 4 plastic case refocus demise Pretty memorable if you ask me :) Oh yeah, and about the claim that it's fast. Just how fast is it? Have a look. time pgen -l -n 4 browbeat hummus sandbox unfixable real 0m0.005s user 0m0.001s sys 0m0.006s That's 5 milliseconds. But hey, let's say we wanted to generate a bunch of passphrases at once. How much time does it take to generate 10.000 passphrases and dump them into a text file? time pgen -l -n 4 -k 10000 > 10k.txt real 0m0.132s user 0m0.073s sys 0m0.058s About zero point one seconds. Not that generating 10.000 passphrases is something that you are likely to do, but it just speaks to how fast this tool is ^^ Source and instructions on how to install it are on GitHub. https://github.com/ctsrc/Pgen
In SaaS CTO Security Checklist

Showing the 15 most recent of 19 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.