GOKEY(1)

๐Ÿ“ฆ
version 0.2.0 ยท 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

โœจ GOKEY โœจ

okay bestie, welcome to Gokey's Manual โ€” page one of the GOKEY(1) saga ๐Ÿ’–


๐ŸŒธ NAME ๐ŸŒธ

gokey โ€” a simple vaultless password manager in Go. no cap, it's literally in the name ๐Ÿซถ


๐ŸŒˆ SYNOPSIS ๐ŸŒˆ

gokey [OPTIONS]

that's it. that's the whole vibe. ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the tea, bestie: gokey is a password manager, but the iconic twist is that it does NOT need a password vault. nope. instead of storing your passwords in a vault like some 2010s situation, it derives your password on the fly from your master password plus a realm string you supply (think a resource URL, that kind of thing) โœจ

and the way that this changes your LIFE is that you never have to manage, backup, or sync your password vault โ€” and you never have to trust a third party with managing it either ๐Ÿ˜ญ because your passwords are just available immediately, anywhere. periodt. ๐Ÿ‘‘


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -o output_path โ€” by default gokey outputs generated data to stdout. if you want it going somewhere else, this is your girl ๐ŸŽ€
  • -P /path/to/password โ€” path to the master password file, which is what gets used to generate other passwords/keys or to encrypt the seed file (peep Modes of operation below). if no master password and no master password file is provided, gokey will ask for it interactively ๐Ÿซถ
  • -p master_password โ€” the master password itself, used to generate other passwords/keys or to encrypt the seed file (again, see Modes of operation below). same deal: no master password and no master password file means gokey asks you interactively ๐Ÿ’ฌ
  • -r password/key_realm โ€” any string that identifies the requested password/key. most likely it's the key usage or the resource URL ๐ŸŒ
  • -s path_to_seed_file โ€” needed if you want to use a seed file instead of a master password as your entropy source (see Modes of operation below). you can generate one with the -t seed flag, as described below ๐ŸŒฑ
  • -skip number_of_bytes โ€” number of bytes to skip when reading the seed file โญ๏ธ
  • -u โ€” UNSAFE โš ๏ธ allow generating keys without using a seed file (see Modes of operation below). this is the "i know what i'm doing" button and it is literally labeled unsafe, so, like, be aware ๐Ÿ’€
  • -t password/key_type โ€” the requested password/key output type. supported password/key types are:
    • pass โ€” default, generates a password ๐Ÿ”‘
    • seed โ€” generates a seed file, which can be used with the -s option later ๐ŸŒฑ
    • raw โ€” generates 32 random bytes (can be used as a symmetric key) ๐ŸŽฒ
    • ec256 โ€” generates ECC P-256 private key
    • ec384 โ€” generates ECC P-384 private key
    • ec521 โ€” generates ECC P-521 private key
    • rsa2048 โ€” generates 2048-bit RSA private key
    • rsa4096 โ€” generates 4096-bit RSA private key
    • x25519 โ€” generates x25519 (also known as curve25519) ECC private key
    • ed25519 โ€” generates ed25519 ECC private key
  • -l length โ€” number of characters in the generated password, or number of bytes in the generated raw stream. default is 10 for the pass type and 32 for the raw type โœจ

๐Ÿ‘‘ MODES OF OPERATION ๐Ÿ‘‘

gokey can generate passwords and cryptographic private keys (ECC and RSA keys are currently supported, bestie ๐ŸŽ€). but heads up: with no additional options specified, it uses your master password as a single source of entropy for the generated data. for passwords that's acceptable most of the time, but keys usually have much higher entropy requirements. not me being honest about the entropy situation ๐Ÿ˜ญ

for the cases where higher entropy is required for generated passwords/keys, gokey can use a seed file (a blob with random data) instead of the master password as a source of entropy. slay.

๐ŸŒฑ Simple mode (without a seed file) ๐ŸŒฑ

in simple mode, passwords are derived directly from your master password and the realm string. that means each unique combination of a master password and a realm string will produce a unique password. the math is mathing ๐Ÿงฎโœจ

for example, if your master password is super-secret-master-password and you want to generate a password for example.com, you would invoke gokey like

gokey -p super-secret-master-password -r example.com

if you need a password for a different resource, example2.com, you would change the real string

gokey -p super-secret-master-password -r example2.com

this way you need to remember only your master password, and you can always recreate passwords for your services/resources ๐Ÿซถ iconic behavior, honestly.

NOTE: in this mode, generated passwords are as strong as your master password, so do have your master password strong enough. you can also derive private keys from your master password, but keep in mind that these keys will have low entropy. that is why it is considered unsafe, so gokey does not allow it by default. if you're really know what you are doing, you can override this default by supplying the -u flag ๐Ÿ’€

๐Ÿฆ‹ Using a seed file ๐Ÿฆ‹

if you plan to generate not only passwords but also private keys, or you want your passwords/keys to have higher entropy, you can use a seed file instead of the master password. you still need to supply a master password when invoking gokey, but it will be used only to protect the seed file itself โ€” all generated passwords/keys will be derived from the data in the seed file โœจ

gokey uses seed files protected (encrypted) with your master password, so it is reasonably safe to store/backup seed files to a third party location, such as Google Drive or Dropbox โ˜๏ธ (yes bestie, cloud storage is on the menu, that's the whole point ๐Ÿซถ)

to generate an encrypted seed file, use

gokey -p super-secret-master-password -t seed -o seedfile

this will create a seed file seedfile with 256 bytes of random data. the data is encrypted using AES-256-GCM mode and super-secret-master-password as a key ๐Ÿ”

then, to generate an EC-256 private key for example.com, use

gokey -p super-secret-master-password -s seedfile -r example.com -t ec256

๐ŸŽ€ AUTHOR ๐ŸŽ€

Ignat Korchagin ignat@cloudflare.com โ€” thank you for your service, king ๐Ÿ‘‘


aaaand that's the whole page bestie ๐Ÿ’– this was gokey, dated 2018-06-06, from the GOKEY(1) manual. go forth and derive responsibly, no cap ๐ŸŒˆ๐Ÿ’…๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from