简单模式下生成的密码强度取决于主密码强度;默认不允许从主密码派生私钥,需加 -u 才可;使用种子文件时忘记主密码或丢失种子文件将无法恢复所有派生密码和密钥
go install github.com/cloudflare/gokey/cmd/gokey@latestREADME 未说明,仅需可运行 Go 工具链的环境,无 GPU 或显存要求
无需密码库的密码管理器,用主密码和 realm 字符串即时派生密码与密钥
用 Go 写的无保险库密码管理器,靠主密码和确定性算法按需生成密码与密钥,不存储任何密码,省去同步和保管密码库的麻烦。
核心能力
- 由主密码加 realm 字符串确定性派生密码,无需存储或同步密码库
- 支持生成 pass、raw、ECC、RSA、x25519、ed25519 等多种密钥类型
- 可生成 AES-256-GCM 加密的种子文件,作为更高熵的熵源
- 种子文件可安全备份到第三方存储,仅需记住主密码
- 默认禁止无种子派生私钥,需 -u 显式开启
容易踩的坑
- v0.2.1最新正式版2026-03-31 · 2026-03-31 11:07 UTC
What's Changed
- Bump golang.org/x/crypto from 0.44.0 to 0.45.0 by @dependabot[bot] in https://github.com/cloudflare/gokey/pull/80
- Make rng member of KeyGen struct public by @ignatk in https://github.com/cloudflare/gokey/pull/85
Full Changelog: https://github.com/cloudflare/gokey/compare/v0.2.0...v0.2.1
- v0.2.02025-11-18 · 2025-11-18 19:04 UTC
查看更新说明
What's Changed
- Bump golang.org/x/crypto from 0.17.0 to 0.31.0 by @dependabot[bot] in https://github.com/cloudflare/gokey/pull/77
- Seed bug by @ignatk in https://github.com/cloudflare/gokey/pull/79
Full Changelog: https://github.com/cloudflare/gokey/compare/v0.1.3...v0.2.0
- v0.1.32024-04-29 · 2024-04-29 17:05 UTC
查看更新说明
What's Changed
- Import deterministic ECDSA key generation code from Go 1.18 crypto/ecdsa package by @zhsj in https://github.com/cloudflare/gokey/pull/63
- CI: bump actions/setup-go to v4 by @kbdharun in https://github.com/cloudflare/gokey/pull/64
- chore: use bytes.Equal instead by @testwill in https://github.com/cloudflare/gokey/pull/66
- Update workflow definitions by @ignatk in https://github.com/cloudflare/gokey/pull/71
- Move the gokey cmd main to an importable package by @pdmccormick in https://github.com/cloudflare/gokey/pull/70
- Bump golang.org/x/crypto from 0.0.0-20220622213112-05595931fe9d to 0.17.0 by @dependabot in https://github.com/cloudflare/gokey/pull/68
- allow setting master password via environment variable by @dannyfast in https://github.com/cloudflare/gokey/pull/72
New Contributors
- @zhsj made their first contribution in https://github.com/cloudflare/gokey/pull/63
- @kbdharun made their first contribution in https://github.com/cloudflare/gokey/pull/64
- @testwill made their first contribution in https://github.com/cloudflare/gokey/pull/66
- @pdmccormick made their first contribution in https://github.com/cloudflare/gokey/pull/70
- @dependabot made their first contribution in https://github.com/cloudflare/gokey/pull/68
- @dannyfast made their first contribution in https://github.com/cloudflare/gokey/pull/57
Full Changelog: https://github.com/cloudflare/gokey/compare/v0.1.2...v0.1.3
- v0.1.22022-09-09 · 2022-09-09 11:23 UTC
查看更新说明
What's Changed
- Ensure correct code formatting with gofmt in CI by @ignatk in https://github.com/cloudflare/gokey/pull/53
- Accept gofmt -s suggestion by @ignatk in https://github.com/cloudflare/gokey/pull/54
- Fix typo by @sandro in https://github.com/cloudflare/gokey/pull/55
- Backport math/big prime generation algorithm from Go 1.18 by @ignatk in https://github.com/cloudflare/gokey/pull/59
New Contributors
- @sandro made their first contribution in https://github.com/cloudflare/gokey/pull/55
Full Changelog: https://github.com/cloudflare/gokey/compare/v0.1.1...v0.1.2
- v0.1.12022-07-28 · 2022-07-28 21:19 UTC
查看更新说明
What's Changed
- Add ability to set password length by @levidurfee in https://github.com/cloudflare/gokey/pull/29
- Make password prompts go to stderr - resolves #31 by @ntuckerxx in https://github.com/cloudflare/gokey/pull/32
- Update dependencies (go get -u) by @frebib in https://github.com/cloudflare/gokey/pull/34
- Add support for P-384, also known as secp384r1 by @awnumar in https://github.com/cloudflare/gokey/pull/35
- Wrap long lines in LICENSE and README.md by @bdrung in https://github.com/cloudflare/gokey/pull/37
- Update readme and dependencies by @jagger27 in https://github.com/cloudflare/gokey/pull/40
- Use GitHub Actions by @jagger27 in https://github.com/cloudflare/gokey/pull/43
- replaced deprecated package by @IgnorantSapient in https://github.com/cloudflare/gokey/pull/47
- Improvements to Github actions - added macOS,Windows + cron by @IgnorantSapient in https://github.com/cloudflare/gokey/pull/48
- Publish release binaries from GitHub actions by @ignatk in https://github.com/cloudflare/gokey/pull/52
New Contributors
- @levidurfee made their first contribution in https://github.com/cloudflare/gokey/pull/29
- @ntuckerxx made their first contribution in https://github.com/cloudflare/gokey/pull/32
- @frebib made their first contribution in https://github.com/cloudflare/gokey/pull/34
- @awnumar made their first contribution in https://github.com/cloudflare/gokey/pull/35
- @jagger27 made their first contribution in https://github.com/cloudflare/gokey/pull/40
- @IgnorantSapient made their first contribution in https://github.com/cloudflare/gokey/pull/47
Full Changelog: https://github.com/cloudflare/gokey/compare/v0.1.0...v0.1.1
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
gokey
A simple vaultless password manager in Go
gokey is a password manager, which does not require a password vault. Instead of storing your passwords in a vault it derives your password on the fly from your master password and supplied realm string (for example, resource URL). This way you do not have to manage, backup or sync your password vault (or trust its management to a third party) as your passwords are available immediately anywhere.
example
gokey -p super-secret-master-password -r example.com
options
-o <output path>- by default gokey outputs generated data tostdout-P </path/to/password>- path to master password file which will be used to generate other passwords/keys or to encrypt seed file (see Modes of operation below, if no master password or master password file is provided, gokey will ask for it interactively)-p <master password>- master password which will be used to generate other passwords/keys or to encrypt seed file (see Modes of operation below, if no master password or master password file is provided, gokey will ask for it interactively)-r <password/key realm>- any string which identifies requested password/key, most likely key usage or resource URL-s <path to seed file>- needed, if you want to use seed file instead of master password as an entropy source (see Modes of operation below); can be generated with-t seedflag as described below-skip <number of bytes>- number of bytes to skip when reading seed file-u- UNSAFE, allow generating keys without using a seed file (see Modes of operation below)-t <password/key type>- requested password/key output type-l <length>- number of characters in the generated password or number of bytes in the generated raw stream (default 10 for "pass" type and 32 for "raw" type)
Supported password/key types:
pass- default, generates a passwordseed- generates a seed file, which can be used with-soption laterraw- generates 32 random bytes (can be used as a symmetric key)ec256- generates ECC P-256 private keyec384- generates ECC P-384 private keyec521- generates ECC P-521 private keyrsa2048- generates 2048-bit RSA private keyrsa4096- generates 4096-bit RSA private keyx25519- generates x25519 (also known as curve25519) ECC private keyed25519- generates ed25519 ECC private key
Installation
The gokey command-line utility can be downloaded and compiled using standard
go install approach. Assuming you have Go
installed, do
go install github.com/cloudflare/gokey/cmd/gokey@latest
The gokey binary should appear in your $GOPATH/bin directory. (Default
$HOME/go/bin)
Precompiled binaries are also available in the Releases section
Modes of operation
gokey can generate passwords and cryptographic private keys (ECC and RSA keys are currently supported). However, without any additional options specified it uses your master password as a single source of entropy for generated data. For passwords it is acceptable most of the time, but keys usually have much higher entropy requirements.
For 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.
Simple mode (without a seed file)
In simple mode passwords are derived directly from your master password and the realm string. That is each unique combination of a master password and a realm string will produce a unique password.
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 realm 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.
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 really know what you are doing, you can override this
default by supplying -u flag.
Using a seed file
If you plan to generate not only passwords, but also private keys or you want to have your passwords/keys with 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.
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 EC-256 private key for example.com, use
gokey -p super-secret-master-password -s seedfile -r example.com -t ec256
NOTE: you still need to remember your master password and keep a backup copy of your seed file. If you forget your master password or lose your seed file, you will lose all derived passwords/keys as well.