SQ(1)

NAME
sq toolbox packet - Low-level packet manipulation

SYNOPSIS
sq toolbox packet dump [OPTIONS] FILE
sq toolbox packet decrypt [OPTIONS] FILE
sq toolbox packet split [OPTIONS] FILE
sq toolbox packet join [OPTIONS] FILE

DESCRIPTION
Low-level packet manipulation.

An OpenPGP data stream consists of packets. These tools allow working with packet streams. They are mostly of interest to developers, but `sq toolbox packet dump` may be helpful to a wider audience both to provide valuable information in bug reports to OpenPGP-related software, and as a learning tool.

SUBCOMMANDS

  sq toolbox packet dump
List packets.

Creates a human-readable description of the packet sequence. Additionally, it can print cryptographic artifacts, and print the raw octet stream similar to hexdump(1), annotating specifically which bytes are parsed into OpenPGP values.

To inspect encrypted messages, either supply the session key, or see `sq decrypt` with the `--dump` flag, or `sq toolbox packet decrypt`.

  sq toolbox packet decrypt
Unwrap an encryption container.

Decrypts a message, dumping the content of the encryption container without further processing. The result is a valid OpenPGP message that can, among other things, be inspected using `sq toolbox packet dump`.

  sq toolbox packet split
Split a message into packets.

Splitting a packet sequence into individual packets, then recombining them freely with `sq toolbox packet join` is a great way to experiment with OpenPGP data.

By default, the packets are written to stdout as a sequence of ASCII armored blocks. It is possible to edit this file directly (e.g., moving, adding, or removing packets), and then use `sq toolbox packet join` to assemble the stream.

Alternatively, if a `--prefix` is given, the packets are written into individual files starting with the prefix, and can be reassembled with `sq toolbox packet join`.

The converse operation is `sq toolbox packet join`.

  sq toolbox packet join
Join packets split across files.

Splitting a packet sequence into individual packets, then recombining them freely with `sq toolbox packet join` is a great way to experiment with OpenPGP data.

The converse operation is `sq toolbox packet split`.

EXAMPLES

  sq toolbox packet dump

Print the packets of a certificate.

    sq toolbox packet dump juliet.pgp

Print the packets including cryptographic artifacts of a certificate.

    sq toolbox packet dump --mpis juliet.pgp

Print the packets including a dump of every byte of a certificate.

    sq toolbox packet dump --hex juliet.pgp

Prints the packets of an encrypted message, decrypting it using a secret key file.

    sq toolbox packet dump --recipient-file bob-secret.pgp \
        message.pgp

  sq toolbox packet decrypt

Unwrap the encryption revealing the signed message.

    sq toolbox packet decrypt --recipient-file bob-secret.pgp \
        message.pgp

  sq toolbox packet split

Split a certificate into individual packets printed to stdout.

    sq toolbox packet split --output=- juliet.pgp

Split a inline-signed message into individual packets written to individual files with the prefix 'packet'.

    sq toolbox packet split --prefix packet document.pgp

Then reassemble the message, transforming it into an old-style signed message with a prefix signature.

    sq toolbox packet join --output prefix-signature.pgp --label \
        message packet-2-Signature-Packet \
        packet-1-Literal-Data-Packet

  sq toolbox packet join

Split a inline-signed message into individual packets written to individual files with the prefix 'packet'.

    sq toolbox packet split --prefix packet document.pgp

Then reassemble the message, transforming it into an old-style signed message with a prefix signature.

    sq toolbox packet join --output prefix-signature.pgp --label \
        message packet-2-Signature-Packet \
        packet-1-Literal-Data-Packet

SEE ALSO
sq(1), sq-toolbox(1), sq-toolbox-packet-dump(1), sq-toolbox-packet-decrypt(1), sq-toolbox-packet-split(1), sq-toolbox-packet-join(1).

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

VERSION
0.39.0 (sequoia-openpgp 1.21.2)