SQ(1) User Commands SQ(1)

sq key generate - Generate a new key

sq key generate [OPTIONS]

Generate a new key.

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.

When generating a key, we also generate a revocation certificate. This can be used in case the key is superseded, lost, or compromised. It is a good idea to keep a copy of this in a safe place.

After generating a key, use `sq toolbox extract-cert` to get the certificate corresponding to the key. The key must be kept secure, while the certificate should be handed out to correspondents, e.g. by uploading it to a key server.

By default a key expires after 3 years. Using the `--expiry=` argument specific validity periods may be defined. It allows for providing a point in time for validity to end or a validity duration.

`sq key generate` respects the reference time set by the top-level `--time` argument. It sets the creation time of the key, any subkeys, and the binding signatures to the reference time.

Don't reject user IDs that are not in canonical form. Canonical user IDs are of the form `Name (Comment) <localpart@example.org>`.
Select the cryptographic algorithms for the key
[default: cv25519]
[possible values: rsa3k, rsa4k, cv25519]
Add an authentication-capable subkey (default)
Add an encryption-capable subkey. Encryption-capable subkeys can be marked as suitable for transport encryption, storage encryption, or both, i.e., universal. [default: universal]
[possible values: transport, storage, universal]
Add a signing-capable subkey (default)
Add no authentication-capable subkey
Add no encryption-capable subkey
Add no signing-capable subkey
Define EXPIRY for the key as ISO 8601 formatted string or custom duration. If an ISO 8601 formatted string is provided, the validity period reaches from the reference time (may be set using `--time`) to the provided time. Custom durations starting from the reference time may be set using `N[ymwds]`, for N years, months, weeks, days, or seconds. The special keyword `never` sets an unlimited expiry.
[default: 94670781s]
Create a key without any user IDs
Write to FILE or stdout if omitted
Write the revocation certificate to FILE. mandatory if OUTFILE is `-` or not specified. [default: <OUTFILE>.rev]
Add a user ID to the key
Protect the key with a password

See sq(1) for a description of the global options.

First, generate a key

sq key generate --userid '<juliet@example.org>' \
--output juliet.key.pgp

Then, extract the certificate for distribution

sq toolbox extract-cert --output juliet.cert.pgp juliet.key.pgp

Generate a key protecting it with a password

sq key generate --userid '<juliet@example.org>' --with-password

Generate a key with multiple userids

sq key generate --userid '<juliet@example.org>' \
--userid 'Juliet Capulet'

Generate a key whose creation time is June 9, 2011 at midnight UTC

sq key generate --time 20110609 --userid Noam \
--output noam.pgp

sq(1), sq-key(1).

For the full documentation see https://book.sequoia-pgp.org.

0.35.0 (sequoia-openpgp 1.20.0)

0.35.0 Sequoia PGP