# softcopy
Current Release: 1.0.1
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://sr.ht/~dstar4138/hardcopy)
[](https://crates.io/crates/softcopy)
[](https://docs.rs/softcopy)
CLI tool for recovering binary data from hard-copy mnemonics (PGPfone, S/KEY OTP, BIP-39, Diceware) and verifying checksums. Sibling to `hardcopy`.
## Installation
```bash
cargo install softcopy
```
## Usage
### Decode from Hard Copy
Interact Mnemonic Words
```bash
# Interactive: enter words line by line from your printed hard copy
softcopy --from plugins.pgpfone -o recovered.key
# Using S/KEY OTP word list
softcopy --from plugins.skeyotp -o recovered.key
# Using BIP-39 word list
softcopy --from plugins.bip39 -o recovered.seed
# Using Diceware word list
softcopy --from plugins.diceware -o recovered.seed
```
Input format: one line at a time, words separated by spaces. Line number prefix (`0001: `) is optional (as printed by `hardcopy --txt`).
### Verify Checksum
```bash
# Verify a recovered file matches the SHA-256 on your hard copy
softcopy --verify recovered.key
# Enter checksum from hard copy when prompted
```
## Supported Plugins
| `plugins.pgpfone` | 4 | PGPfone word list | PGP key backup (default) |
| `plugins.skeyotp` | 6 | RFC 2289 S/KEY | One-time passwords |
| `plugins.bip39` | 6 | BIP-39 wordlist | Cryptocurrency seeds |
| `plugins.diceware` | 6 | EFF Large Diceware | High-entropy passphrases |
Each plugin includes its own checksum/hashcode validation.
## Example: Recover PGP Key from Hard Copy
```bash
# 1. Run softcopy with PGPfone plugin (default)
softcopy --from plugins.pgpfone -o recovered.pgp
# 2. Follow prompts:
# Enter the mnemonic words from your hard-copy, one line at a time.
# Each line should have 4 words (optionally prefixed with the line number).
# Press Enter on an empty line or Ctrl+D when finished.
# Line 0001 > ALPHA BRAVO CHARLIE DELTA
# Line 0002 > ECHO FOXTROT GOLF HOTEL
# ...
# Line 0005 >
#
# 3. Output written
# Written 1234 bytes to: recovered.pgp
# 4. Verify against checksum on hard copy
softcopy --verify recovered.pgp
# Please enter the SHA-256 checksum from your hard-copy:
# > a1b2c3d4e5f6...
# Checksum matches. Data integrity verified.
```
## Options
```
softcopy [OPTIONS] [FILE]
OPTIONS:
--from <PLUGIN> Decoding plugin: plugins.pgpfone (default), plugins.skeyotp, plugins.bip39, plugins.diceware
-o, --output <FILE> Output file path for reconstructed data
--verify Verify a file against SHA-256 checksum from hard copy
--debug Enable debug logging
```
## Workflow with `hardcopy`
```
┌─────────────┐ hardcopy ┌─────────────┐ softcopy ┌─────────────┐
│ Binary │ ────────────────► │ Hard Copy │ ────────────────► │ Recovered │
│ (keys, │ (PDF/TXT/HTML) │ (paper, │ (interactive │ Binary │
│ seeds) │ │ QR codes) │ word entry) │ (verified) │
└─────────────┘ └─────────────┘ └─────────────┘
│ ▲
│ SHA-256 checksum │ --verify
└───────────────────────────────┘
```
## Features
Requires `libhardcopy` with `out-bip39` and `out-diceware` features (enabled by default in this crate).
## License
GPL-3.0