sqkeylist
List keys managed by the key store.
sqkeygenerate
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 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.
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.
sqkeyrotate
Rotate a certificate.
Generates a new certificate to replace an existing one.
The new certificate will have the same capabilities as the old certificate. This can be overridden using
the `--can-sign`, `--cannot-sign`, etc., arguments. Note: the new certificate may have a different shape
from the old certificate. For instance, if the old certificate's primary key is marked as both
certification and signing capable, the new certificate's primary key will be certification capable, and
it will have a signing subkey.
By default the certificate expires after 3 years. This can be changed using the `--expiration` argument.
The new certificate will have the same self-signed user IDs as the old certificate. Revoked user IDs are
ignored.
The new certificate and the old certificate will cross certify each other as unconstrained trusted
introducers.
The new certificate will be linked in the same way as the old certificate. This can be overridden using
the `--own-key`, or the `--shared-key` argument.
The new certificate will certify the same certificates as the old certificate. That is, the old
certificate's certifications will be replayed. See `sq pki vouch replay` for more information.
A revocation certificate indicating that the old certificate is retired, and that the new certificate
should be instead used will be issued. By default, it will go into effect in 182 days. This can be
changed or suppressed using the `--retire-in` argument.
When using `--output`, the new certificate as well as all of the other updated certificates are written
to the specified file.
Stable since 1.2.0.
sqkeyimport
Import keys into the key store.
sqkeyexport
Export keys from the key store.
Exports the secret key material associated with a certificate. Note that even if secret key material is
available, it may not be exportable. For instance, secret key material stored on a hardware security
module usually cannot be exported from the device.
Iterate over all of the specified certificates and export any keys (primary key and subkeys) with secret
key material. An error is returned if any specified certificate does not contain any secret key
material.
If you only want to export a particular key and not all keys associate with a certificate, use `sq key
subkey export`.
sqkeydelete
Delete a certificate's secret key material.
sqkeypassword
Change the password protecting secret key material.
Secret key material can be protected by a password. This subcommand changes or clears the password.
To strip the password either use `--clear` or supply a zero-length password when prompted for the new
password.
If a key is password protected, and the correct password was not supplied using the `--password-file`
argument, the user is prompted for the password. Likewise, if the new password isn't provided, the user
is prompted.
sqkeyexpire
Change a certificate's expiration time.
This subcommand changes a certificate's expiration time. To change the expiration time of an individual
subkey, use the `sq key subkey expire` subcommand.
sqkeyrevoke
Revoke a certificate.
Creates a revocation certificate for a certificate.
If `--revoker` or `--revoker-file` is provided, then that key is used to create the revocation
certificate. If that key is different from the certificate that is being revoked, this results in a
third-party revocation. This is normally only useful if the owner of the certificate designated the key
to be a designated revoker.
`sq key revoke` respects the reference time set by the top-level `--time` argument. When set, it uses
the specified time instead of the current time when determining what keys are valid, and it sets the
revocation certificate's creation time to the reference time instead of the current time.
sqkeyuserid
Manage User IDs.
Add User IDs to a key, or revoke them.
sqkeysubkey
Manage subkeys.
Add new subkeys to an existing certificate, change their expiration, and revoke them.
sqkeyapprovals
Manages certification approvals.
Key holders may approve of third-party certifications associated with their certificate. This subcommand
manages the approvals.
To prevent certificate flooding attacks, modern key servers prevent uncontrolled distribution of
third-party certifications on certificates. To allow the key holder to control what information is
distributed with their certificate, these key servers only distribute third-party certifications that the
key holder has explicitly approved.