encrypt(1)

NAME
encrypt - Encrypts a message

SYNOPSIS
encrypt [-o|--output] [-B|--binary] [--recipient-email] [--recipient-userid] [--recipient-cert] [--recipient-file] [--signer-file] [--private-key-store] [-s|--symmetric]... [--mode] [--compression] [--use-expired-subkey] [-h|--help] [FILE]

DESCRIPTION
Encrypts a message

Encrypts a message for any number of recipients and with any number of passwords, optionally signing the message in the process.

The converse operation is "sq decrypt".

"sq encrypt" respects the reference time set by the top-level "--time" argument. It uses the reference time when selecting encryption keys, and it sets the signature's creation time to the reference time.

OPTIONS

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

-B, --binary=BINARY
    Emits binary data

--recipient-email=EMAIL
    Encrypts to all certificates that can be authenticated for the specified email address

--recipient-userid=USERID
    Encrypts to all certificates that can be authenticated for the specified User ID

--recipient-cert=FINGERPRINT|KEYID
    Encrypts to the named certificates

--recipient-file=CERT_RING_FILE
    Encrypts to all certificates in CERT_RING_FILE

--signer-file=KEY_FILE
    Signs the message using the key in KEY_FILE

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

-s, --symmetric=SYMMETRIC
    Adds a password to encrypt with. The message can be decrypted with either one of the recipient's keys, or any password.

--mode=MODE [default: all]
    Selects what kind of keys are considered for encryption. Transport select subkeys marked as suitable for transport encryption, rest selects those for encrypting data at rest, and all selects all encryption-capable subkeys.
    [possible values: transport, rest, all]

--compression=KIND [default: pad]
    Selects compression scheme to use
    [possible values: none, pad, zip, zlib, bzip2]

--use-expired-subkey=USE_EXPIRED_SUBKEY
    If a certificate has only expired encryption-capable subkeys, falls back to using the one that expired last

-h, --help
    Print help information (use `-h` for a summary)

[FILE]
    Reads from FILE or stdin if omitted

EXTRA
EXAMPLES: # Encrypt a file using a certificate $ sq encrypt --recipient-file romeo.pgp message.txt # Encrypt a file creating a signature in the process $ sq encrypt --recipient-file romeo.pgp --signer-file juliet.pgp message.txt # Encrypt a file using a password $ sq encrypt --symmetric message.txt