SQ(1)
π
SQ(1) β the manual page for sq-key-generate
okay so bestie, you've landed in the SQ(1) manual, User Commands section, and this specific page is all about sq-key-generate. It's giving "first step of your whole cryptographic glow-up" energy. Let's go π«Ά
β¨ NAME β¨
sq-key-generate β generate a new key π
πΈ SYNOPSIS πΈ
sq key generate [OPTIONS]
π¦ DESCRIPTION π¦
Generate a new key. That's it, that's the whole vibe. π«
Generating a key is the prerequisite to receiving encrypted messages and creating signatures. There are a few parameters to this process, but we provide reasonable defaults for most users. So like, you can customize, but you don't have to. Chill.
When generating a key, we also generate an emergency revocation certificate. This can be used in case the key is lost or compromised. It is saved alongside the key. This can be changed using the --rev-cert argument. π¨ (it's giving "break glass in case of emergency", and honestly, respect)
By default a key expires after 3 years. This can be changed using the --expiration argument. β³
sq key generate respects the reference time set by the top-level --time argument. It sets the creation time of the primary key, any subkeys, and the binding signatures to the reference time. no cap, it syncs everything to that clock β°
π OPTIONS π
π Subcommand options
--allow-non-canonical-useridsβ Don't reject user IDs that are not in canonical form
Canonical user IDs are of the form Name (Comment) <localpart@example.org>. So if your user ID is, like, not that shape? This flag says "whatever, I'll allow it." π
--can-authenticateβ Add an authentication-capable subkey (default)--can-encrypt=PURPOSEβ Add an encryption-capable subkey [default:universal]
Encryption-capable subkeys can be marked as suitable for transport encryption, storage encryption, or both, i.e., universal.
[possible values: transport, storage, universal]
--can-signβ Add a signing-capable subkey (default)--cannot-authenticateβ Don't add an authentication-capable subkey--cannot-encryptβ Don't add an encryption-capable subkey--cannot-signβ Don't add a signing-capable subkey--cipher-suite=CIPHER-SUITEβ Select the cryptographic algorithms for the key π
The default can be changed in the configuration file using the setting key.generate.cipher-suite.
[default: cv25519]
[possible values: rsa2k, rsa3k, rsa4k, cv25519, cv448, mldsa65-ed25519, mldsa87-ed448]
--email=ADDRESSβ Add an email address as user ID to the key π§--encryption-algorithm=ALGORITHMβ Select the cryptographic algorithm for encryption keys
When set, the algorithm is used for encryption-capable keys. This parameter overrides the cipher suite parameter. (yes bestie, it outranks --cipher-suite, main character energy fr π)
[possible values: rsa2k, rsa3k, rsa4k, elgamal2k, elgamal3k, cv25519, x25519, x448, nistp256, nistp384, nistp521, brainpoolp256, brainpoolp384, brainpoolp512, mlkem768-x25519, mlkem1024-x448]
--expiration=EXPIRATIONβ Sets the expiration time β³
EXPIRATION is either an ISO 8601 formatted date with an optional time or a custom duration. A duration takes the form N[ymwds], where the letters stand for years, months, weeks, days, and seconds, respectively. Alternatively, the keyword never does not set an expiration time.
[default: 3y]
--name=NAMEβ Add a name as user ID to the key π·οΈ--new-password-file=PASSWORD_FILEβ File containing password to encrypt the secret key material π
Note that the entire key file will be used as the password including any surrounding whitespace like a trailing newline. Like, the whole file, whitespace and all. Don't come for me, that's literally what it does. π
--no-useridsβ Create a key without any user IDs--output=FILEβ Write the key to the specified file
When not specified, the key is saved on the key store.
--own-keyβ Mark the key as one's own key π«Ά
The newly generated key with all of its user IDs will be marked as authenticated and as a fully trusted introducer.
--profile=PROFILEβ Select the OpenPGP standard for the key
As OpenPGP evolves, new versions will become available. This option selects the version of OpenPGP to use for the newly generated key.
Currently, sq supports two profiles: RFC9580 and RFC4880. Currently, the default is RFC4880. However, once support for RFC9580 is rolled out further, the default will change in a future version of sq. (so heads up: the default is gonna move someday π)
The default can be changed in the configuration file using the setting key.generate.profile.
[default: rfc4880]
[possible values: rfc9580, rfc4880]
--rev-cert=FILEβ Write the emergency revocation certificate to FILE π¨
When the key is stored on the key store, the revocation certificate is stored in $HOME/.local/share/sequoia/revocation-certificates by default.
When --output is specified, the revocation certificate is written to the file specified by --rev-cert.
If--outputis-, then this option must not also be-. β οΈ No double dashes, bestie, that's the rule.
--shared-keyβ Mark the key as a shared key
The newly generated key with all of its user IDs will be marked as authenticated, but not as a trusted introducer. Further, the key metadata will indicate that this is a shared key.
Use this option if you plan to share this key with other people. Normally, you shouldn't share keys material. An example of where you might want to do this is a shared mailbox. π¬
--signing-algorithm=ALGORITHMβ Select the cryptographic algorithm for signing keys βοΈ
When set, the algorithm is used for keys used for signing. This includes keys with the signing, authentication, and the certification capability. This parameter overrides the cipher suite parameter.
The default can be changed in the configuration file using the setting key.generate.cipher-suite.
[possible values: rsa2k, rsa3k, rsa4k, dsa2k, dsa3k, cv25519, ed25519, ed448, nistp256, nistp384, nistp521, brainpoolp256, brainpoolp384, brainpoolp512, mldsa65-ed25519, mldsa87-ed448, slhdsa128s, slhdsa128f, slhdsa256s]
--userid=USERIDβ Add a user ID to the key
This user ID can combine name and email address, can optionally contain a comment, or even be free-form if --allow-non-canonical-userids is given. However, user IDs that include different information such as name and email address are more difficult to reason about, so using distinct user IDs for name and email address is preferred nowadays.
In doubt, prefer --name and --email. π‘
--without-passwordβ Don't protect the secret key material with a password
π Global options
See sq(1) for a description of the global options.
β EXAMPLES β
Generate a key, and save it on the key store.
sq key generate --own-key --name Alice --email \
alice@example.org
Generate a key, and save it in a file instead of in the key store.
sq key generate --own-key --name Alice --email \
alice@example.org --output alice-priv.pgp --rev-cert \
alice-priv.rev
π SEE ALSO π
For the full documentation see https://book.sequoia-pgp.org/.
π§ VERSION π§
1.5.0
aaaand that's the page, bestie!! π this gorgeous piece of documentation is brought to you by Sequoia PGP, version 1.5.0 β so when you see 1.5.0 floating around, that's the glow-up era we're in. go forth and generate your key, you absolute icon πβ¨
π¦ where this page comes from
- fedora 43: sequoia-sq 1.5.0-1.fc43 Β· LGPL-2.0-or-later AND Apache-2.0 AND BSL-1.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-3.0 AND Unicode-DFS-2016 AND Zlib AND bzip2-1.0.6 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
- fedora 44: sequoia-sq 1.5.0-1.fc44 Β· LGPL-2.0-or-later AND Apache-2.0 AND BSL-1.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-3.0 AND Unicode-DFS-2016 AND Zlib AND bzip2-1.0.6 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
- opensuse-leap 16.0: sequoia-sq 1.5.0-bp160.1.1 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: sequoia-sq 1.5.0-bp160.1.1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms