Password Attacksgnupgpassphraserecoverybrute-forcegpgluks

Rephrase

Specialized passphrase recovery tool for GnuPG that helps recover nearly remembered passphrases by trying known parts and alternatives in all combinations. It supports GnuPG keys, symmetric encryption, and LUKS block devices.

Description

Rephrase is designed for users who can nearly remember their GnuPG passphrase but are unsure about certain parts. By specifying the known segments and providing alternatives for uncertain parts, Rephrase systematically tests all possible combinations to identify the correct passphrase.

The tool is particularly useful in recovery scenarios where partial knowledge of the passphrase exists, avoiding exhaustive brute-force attacks. It works with GnuPG keys and encrypted files, as well as LUKS-encrypted block devices, making it versatile for different encryption recovery needs.

Rephrase requires GnuPG to be installed and operates as a command-line tool, providing clear feedback on successful passphrase combinations.

How It Works

Rephrase takes partial passphrase components and their alternatives, generating all possible permutations of these elements. It then tests each combination against the target GnuPG key, symmetric encrypted file, or LUKS block device using GnuPG's verification mechanisms. The tool reports the first combination that successfully decrypts or unlocks the target.

Installation

bash
sudo apt install rephrase

Flags

<key>Specify a GnuPG key for passphrase recovery
--gpg-key <key>Specify a GnuPG key for passphrase recovery
--gpg-symmetric <encrypted_file>Recover passphrase for GPG symmetrically encrypted file
--luks <block_device>Recover passphrase for LUKS encrypted block device

Examples

Recover passphrase for specified GnuPG key using partial passphrase knowledge
rephrase <key>
Recover passphrase for specified GnuPG key using the explicit gpg-key flag
rephrase --gpg-key <key>
Recover passphrase for a GPG symmetrically encrypted file
rephrase --gpg-symmetric <encrypted_file>
Recover passphrase for LUKS encrypted block device
rephrase --luks <block_device>
Attempt recovery of specific GPG key fingerprint with known passphrase parts
rephrase --gpg-key 0xABC12345
Test passphrase combinations against symmetrically encrypted GPG file
rephrase --gpg-symmetric secret.gpg
Recover LUKS passphrase for specified block device
rephrase --luks /dev/sdb1
Updated 2026-04-16kali.org ↗