SQ(1)

NAME
sq decrypt - Decrypts a message

SYNOPSIS
sq [GLOBAL OPTIONS] decrypt [OPTIONS] FILE

DESCRIPTION
Decrypts a message.

Decrypts a message using either supplied keys, or by prompting for a password. If message tampering is detected, an error is returned. See below for details.

If certificates are supplied using the "--signer-cert" option, any signatures that are found are checked using these certificates. Verification is only successful if there is no bad signature, and the number of successfully verified signatures reaches the threshold configured with the "--signatures" parameter.

If the signature verification fails, or if message tampering is detected, the program terminates with an exit status indicating failure. In addition to that, the last 25 MiB of the message are withheld, i.e. if the message is smaller than 25 MiB, no output is produced, and if it is larger, then the output will be truncated.

The converse operation is "sq encrypt".

OPTIONS

  Global options

-f, --force
    Overwrites existing files

--help
    Print help information

--known-notation=NOTATION
    Adds NOTATION to the list of known notations

--output-format=FORMAT
    Produces output in FORMAT, if possible

--output-version=VERSION
    Produces output variant VERSION.

--version
    Print version information

  Subcommand options

--dump
    Prints a packet dump to stderr

--dump-session-key
    Prints the session key to stderr

--help
    Print help information

-n, --signatures=N
    Sets the threshold of valid signatures to N

-o, --output=FILE
    Writes to FILE or stdout if omitted

--private-key-store=KEY_STORE
    Provides parameters for private key store

--recipient-file=KEY_FILE
    Decrypts the message using the key in KEY_FILE

--session-key=SESSION-KEY
    Decrypts an encrypted message using SESSION-KEY

--signer-file=CERT_FILE
    Verifies signatures using the certificates in CERT_FILE

--version
    Print version information

-x, --hex
    Prints a hexdump (implies --dump)

EXAMPLES

Decrypt a file using a secret key

    sq decrypt --recipient-file juliet.pgp ciphertext.pgp

Decrypt a file verifying signatures

    sq decrypt --recipient-file juliet.pgp --signer-file romeo.pgp ciphertext.pgp

Decrypt a file using a password

    sq decrypt ciphertext.pgp

SEE ALSO
sq(1).

For the full documentation see <https://docs.sequoia-pgp.org/sq/>.

VERSION
0.28.0 (sequoia-openpgp 1.13.0, using Nettle)