A terminal user interface for inspecting GPG/OpenPGP packet structures. Decode armored GPG data and visualize the underlying packet format with color-coded byte highlighting.
Inspired by ConradIrwin/gpg-decoder.
- Interactive TUI with synchronized hex view and packet display
- Real-time parsing as you type or paste armored GPG data
- Color-coded byte visualization linking fields to raw bytes
- Support for both old (3.x) and new (4.x) OpenPGP packet formats
- CRC24 checksum validation for armored input
Download the latest release for your platform from the releases page:
| Platform | Download |
|---|---|
| Linux x86_64 | gpg-inspector-linux-x86_64.tar.gz |
| Linux aarch64 | gpg-inspector-linux-aarch64.tar.gz |
| macOS x86_64 | gpg-inspector-macos-x86_64.tar.gz |
| macOS Apple Silicon | gpg-inspector-macos-aarch64.tar.gz |
| Windows x86_64 | gpg-inspector-windows-x86_64.zip |
# Linux / macOS
tar xzf gpg-inspector-*.tar.gz
sudo mv gpg-inspector /usr/local/bin/git clone https://github.com/jhheider/gpg-inspector
cd gpg-inspector
cargo build --release
# binary at target/release/gpg-inspector# Start with empty input
gpg-inspector
# Load from file
gpg-inspector -f key.asc
# Pipe from GPG
gpg --export --armor KEY_ID | gpg-inspector
# Pipe from file
cat message.asc | gpg-inspector| Option | Description |
|---|---|
-f, --file FILE |
Load GPG data from a file |
--version |
Show version |
--help |
Show help |
| Key | Action |
|---|---|
Tab / Shift+Tab |
Switch between Input and Data panels |
Ctrl+C / Ctrl+Q |
Quit |
Esc |
Quit |
| Key | Action |
|---|---|
Backspace |
Delete character before cursor |
Delete |
Delete character at cursor |
Left / Right |
Move cursor |
Home / End |
Move to start/end of input |
Enter |
Add newline |
Ctrl+A |
Move cursor to start |
Ctrl+E |
Move cursor to end |
Ctrl+K |
Clear input |
| Key | Action |
|---|---|
Up / k |
Move selection up |
Down / j |
Move selection down |
Page Up / Page Down |
Move selection by page |
Home / End |
Jump to first/last field |
Selecting a field in the Data panel highlights the corresponding bytes in the hex view.
- Public Key / Public Subkey
- Secret Key / Secret Subkey
- User ID
- Signature (v3, v4)
- Public Key Encrypted Session Key (PKESK)
- Symmetrically Encrypted Integrity Protected Data (SEIPD)
- RSA
- DSA
- ElGamal
- ECDSA / ECDH
- EdDSA
- X25519 / Ed25519
gpg-inspector/
├── gpg-inspector/ # TUI application
│ └── src/
│ ├── main.rs # Entry point, CLI
│ ├── app.rs # Application state
│ ├── event.rs # Input handling
│ └── ui/ # Terminal rendering
└── gpg-inspector-lib/ # Parsing library
└── src/
├── armor.rs # ASCII armor decoding
├── stream.rs # Byte stream abstraction
└── packet/ # OpenPGP packet parsers
# Build
cargo build
# Run tests
cargo test
# Run with coverage (requires cargo-llvm-cov)
cargo llvm-cov
# Format check
cargo fmt --check
# Lint
cargo clippy- Rust 1.85+ (edition 2024)
- Terminal with color support
MIT License. See LICENSE for details.