.TH SQ 1 1.2.0 "Sequoia PGP" "User Commands" .SH NAME sq packet \- Low\-level packet manipulation .SH SYNOPSIS .br \fBsq packet armor\fR [\fIOPTIONS\fR] \fIFILE\fR .br \fBsq packet dearmor\fR [\fIOPTIONS\fR] \fIFILE\fR .br \fBsq packet dump\fR [\fIOPTIONS\fR] \fIFILE\fR .br \fBsq packet decrypt\fR [\fIOPTIONS\fR] \fIFILE\fR .br \fBsq packet split\fR [\fIOPTIONS\fR] \fIFILE\fR .br \fBsq packet join\fR [\fIOPTIONS\fR] \fIFILE\fR .SH DESCRIPTION Low\-level packet manipulation. .PP An OpenPGP data stream consists of packets. These tools allow working with packet streams. They are mostly of interest to developers, but `sq 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. .PP .SH SUBCOMMANDS .SS "sq packet armor" Convert binary to ASCII. .PP To make encrypted data easier to handle and transport, OpenPGP data can be transformed to an ASCII representation called ASCII Armor. sq emits armored data by default, but this subcommand can be used to convert existing OpenPGP data to its ASCII\-encoded representation. .PP The converse operation is `sq packet dearmor`. .PP .SS "sq packet dearmor" Convert ASCII to binary. .PP To make encrypted data easier to handle and transport, OpenPGP data can be transformed to an ASCII representation called ASCII Armor. sq transparently handles armored data, but this subcommand can be used to explicitly convert existing ASCII\-encoded OpenPGP data to its binary representation. .PP The converse operation is `sq packet armor`. .PP .SS "sq packet dump" List packets. .PP 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. .PP If the packet stream includes an encryption container, `sq` will attempt to decrypt it. .PP .SS "sq packet decrypt" Unwrap an encryption container. .PP 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 packet dump`. .PP .SS "sq packet split" Split a message into packets. .PP Splitting a packet sequence into individual packets, then recombining them freely with `sq packet join` is a great way to experiment with OpenPGP data. .PP 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 packet join` to assemble the stream. .PP Alternatively, if a `\-\-output\-prefix` is given, the packets are written into individual files starting with the prefix, and can be reassembled with `sq packet join`. .PP The converse operation is `sq packet join`. .PP .SS "sq packet join" Join packets split across files. .PP Splitting a packet sequence into individual packets, then recombining them freely with `sq packet join` is a great way to experiment with OpenPGP data. .PP The converse operation is `sq packet split`. .PP .SH EXAMPLES .SS "sq packet armor" .PP .PP Convert a binary OpenPGP message to an ASCII armored OpenPGP message. .PP .nf .RS sq packet armor message.bin .RE .PP .fi .PP Convert a binary OpenPGP message to an ASCII armored OpenPGP message explicitly choosing the armor label. .PP .nf .RS sq packet armor \-\-label=message message.bin .RE .fi .PP .SS "sq packet dearmor" .PP .PP Convert an ASCII armored OpenPGP message to a binary OpenPGP message. .PP .nf .RS sq packet dearmor \-\-output=message.bin message.pgp .RE .fi .PP .SS "sq packet dump" .PP .PP Print the packets of a certificate. .PP .nf .RS sq packet dump juliet.pgp .RE .PP .fi .PP Print the packets including cryptographic artifacts of a certificate. .PP .nf .RS sq packet dump \-\-mpis juliet.pgp .RE .PP .fi .PP Print the packets including a dump of every byte of a certificate. .PP .nf .RS sq packet dump \-\-hex juliet.pgp .RE .PP .fi .PP Prints the packets of an encrypted message, decrypting it using a secret key file. .PP .nf .RS sq packet dump \-\-recipient\-file bob\-secret.pgp message.pgp .RE .fi .PP .SS "sq packet decrypt" .PP .PP Unwrap the encryption revealing the signed message. .PP .nf .RS sq packet decrypt \-\-recipient\-file bob\-secret.pgp message.pgp .RE .fi .PP .SS "sq packet split" .PP .PP Split a certificate into individual packets printed to stdout. .PP .nf .RS sq packet split \-\-output=\- juliet.pgp .RE .PP .fi .PP Split a inline\-signed message into individual packets written to individual files with the prefix 'packet'. .PP .nf .RS sq packet split \-\-output\-prefix packet document.pgp .RE .PP .fi .PP Then reassemble the message, transforming it into an old\-style signed message with a prefix signature. .PP .nf .RS sq packet join \-\-output prefix\-signature.pgp \-\-label message \\ .RE .RS .RS packet\-2\-Signature\-Packet packet\-1\-Literal\-Data\-Packet .RE .RE .fi .PP .SS "sq packet join" .PP .PP Split a inline\-signed message into individual packets written to individual files with the prefix 'packet'. .PP .nf .RS sq packet split \-\-output\-prefix packet document.pgp .RE .PP .fi .PP Then reassemble the message, transforming it into an old\-style signed message with a prefix signature. .PP .nf .RS sq packet join \-\-output prefix\-signature.pgp \-\-label message \\ .RE .RS .RS packet\-2\-Signature\-Packet packet\-1\-Literal\-Data\-Packet .RE .RE .fi .SH "SEE ALSO" .nh \fBsq\fR(1), \fBsq\-packet\-armor\fR(1), \fBsq\-packet\-dearmor\fR(1), \fBsq\-packet\-dump\fR(1), \fBsq\-packet\-decrypt\fR(1), \fBsq\-packet\-split\fR(1), \fBsq\-packet\-join\fR(1). .hy .PP For the full documentation see . .SH VERSION 1.2.0 (sequoia\-openpgp 1.22.0)