SQ(1)
π SQ-PACKET β low-level packet manipulation, bestie edition π
okay so this is the sq-packet page from the sq manual (that's the Sequoia PGP sq man page, section 1, user commands π). it's the β¨low-levelβ¨ packet manipulation corner of the toolset and we are going to get into it. buckle up π
πΈ NAME πΈ
sq-packet β low-level packet manipulation. yes literally that's the whole name. slay π
β¨ SYNOPSIS β¨
sq packet armor [OPTIONS] FILE
sq packet dearmor [OPTIONS] FILE
sq packet dump [OPTIONS] FILE
sq packet decrypt [OPTIONS] FILE
sq packet split [OPTIONS] FILE
sq packet join [OPTIONS] FILE
six subcommands, six little doors into the packet dimension π¦
π DESCRIPTION π
low-level packet manipulation. that's the vibe.
so here's the tea β: an OpenPGP data stream is literally just packets. a pile of them. and this whole family of tools lets you work directly with those packet streams π«Ά
ngl, most of these are aimed at developers (iykyk), BUT β sq packet dump is the one that's genuinely for a wider audience. it's giving "look inside the crypto blob and understand what's happening." it's great for putting real info into bug reports for OpenPGP-adjacent software, and it's also just a really good learning tool. main character energy for real π
π SUBCOMMANDS π
π sq packet armor
convert binary to ASCII. the glow-up from unreadable bytes to transportable text π«
so, to make encrypted data easier to handle and transport, OpenPGP data can be transformed into an ASCII representation called ASCII Armor. sq already emits armored data by default, but this subcommand exists so you can take existing OpenPGP data and convert it to that ASCII-encoded representation.
the converse operation is sq packet dearmor. π
π¦ sq packet dearmor
convert ASCII to binary. undoing the armor, revealing the raw little bytes underneath π
to make encrypted data easier to handle and transport, OpenPGP data can be transformed into an ASCII representation called ASCII Armor. sq transparently handles armored data on its own, but this subcommand lets you explicitly convert existing ASCII-encoded OpenPGP data into its binary representation.
the converse operation is sq packet armor. π
π₯ sq packet dump
list packets. this is the one, bestie, the star of the show β
it creates a human-readable description of the packet sequence. on top of that, it can print cryptographic artifacts, and it can print the raw octet stream β like hexdump(1) but better, because it annotates specifically which bytes get parsed into which OpenPGP values. chef's kiss π
and if the packet stream includes an encryption container, sq will attempt to decrypt it. no cap.
π sq packet decrypt
unwrap an encryption container π
this decrypts a message and dumps the content of the encryption container without doing any further processing to it. the result is a valid OpenPGP message that you can β among other things β inspect with sq packet dump. iconic.
π sq packet split
split a message into packets βοΈ
splitting a packet sequence into individual packets and then recombining them freely with sq packet join is a great way to experiment with OpenPGP data. genuinely so fun.
by default, the packets are written to stdout as a sequence of ASCII armored blocks. you can edit this file directly β e.g., moving, adding, or removing packets β and then use sq packet join to assemble the stream back together. it's giving arts and crafts π¨
alternatively, if a --output-prefix is given, the packets get written into individual files starting with that prefix, and you can reassemble them with sq packet join.
the converse operation is sq packet join. π
π§ sq packet join
join packets split across files π§©
splitting a packet sequence into individual packets and recombining them freely with sq packet join is a great way to experiment with OpenPGP data. yes we said that in the last one, it's still true, it's the whole duo.
the converse operation is sq packet split. π
π EXAMPLES π
π« sq packet armor
convert a binary OpenPGP message to an ASCII armored OpenPGP message:
sq packet armor message.bin
convert a binary OpenPGP message to an ASCII armored OpenPGP message, explicitly choosing the armor label:
sq packet armor --label=message message.bin
π¦ sq packet dearmor
convert an ASCII armored OpenPGP message to a binary OpenPGP message:
sq packet dearmor --output=message.bin message.pgp
π₯ sq packet dump
print the packets of a certificate:
sq packet dump juliet.pgp
print the packets including cryptographic artifacts of a certificate:
sq packet dump --mpis juliet.pgp
print the packets including a dump of every single byte of a certificate:
sq packet dump --hex juliet.pgp
print the packets of an encrypted message, decrypting it using a secret key file:
sq packet dump --recipient-file bob-secret.pgp message.pgp
π sq packet decrypt
unwrap the encryption, revealing the signed message:
sq packet decrypt --recipient-file bob-secret.pgp message.pgp
βοΈ sq packet split
split a certificate into individual packets printed to stdout:
sq packet split --output=- juliet.pgp
split an inline-signed message into individual packets written to individual files with the prefix 'packet':
sq packet split --output-prefix packet document.pgp
then reassemble the message, transforming it into an old-style signed message with a prefix signature:
sq packet join --output prefix-signature.pgp --label message \
packet-2-Signature-Packet packet-1-Literal-Data-Packet
π§© sq packet join
split an inline-signed message into individual packets written to individual files with the prefix 'packet':
sq packet split --output-prefix packet document.pgp
then reassemble the message, transforming it into an old-style signed message with a prefix signature:
sq packet join --output prefix-signature.pgp --label message \
packet-2-Signature-Packet packet-1-Literal-Data-Packet
π SEE ALSO π
sq(1)sq-packet-armor(1)sq-packet-dearmor(1)sq-packet-dump(1)sq-packet-decrypt(1)sq-packet-split(1)sq-packet-join(1)
for the full documentation go look at <https://book.sequoia-pgp.org/> π
β VERSION β
1.5.0
and that's the whole page bestie, you made it π«Ά go dump some packets, no cap.
okay signing off: this was Sequoia PGP, version 1.5.0, from the sq man page (section 1, User Commands), with a date of 1.5.0 π mwah, bye!! π
β¨
π¦ where this page comes from
- fedora 43: sequoia-sq 1.5.0-1.fc43 Β· LGPL-2.0-or-later AND Apache-2.0 AND BSL-1.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-3.0 AND Unicode-DFS-2016 AND Zlib AND bzip2-1.0.6 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
- fedora 44: sequoia-sq 1.5.0-1.fc44 Β· LGPL-2.0-or-later AND Apache-2.0 AND BSL-1.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-3.0 AND Unicode-DFS-2016 AND Zlib AND bzip2-1.0.6 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
- nixpkgs unstable: sequoia-sq 1.5.0
- opensuse-leap 16.0: sequoia-sq 1.5.0-bp160.1.1 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: sequoia-sq 1.5.0-bp160.1.1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms