A small interface to OpenPGP
HDcrypt is a command-line project for encrypting and decrypting files using a password or a public/private key pair. It also includes RSA key generation. The project targets .NET 10 and references BouncyCastle.Cryptography 2.5.0.
Its interface is deliberately explicit: choose an operation, provide input and output paths, and choose password or key-based mode. Optional ASCII armor turns the encrypted output into a text representation.
Reading the implementation
Program.cs parses the command-line arguments and delegates work to separate password encryption, key encryption, and key-generation classes. It checks for an existing output file before encryption or decryption and requires an explicit overwrite flag to replace it.
The current implementation uses -p as an interactive password prompt, rather than reading a password from the next command-line argument. The repository README contains older examples, so the program’s help output and source should be consulted together.
# Inspect the available options without changing any files.
dotnet run --project HDcrypt -- --help
Scope and limitations
The key-generation class currently creates private keys without passphrase protection. Although the interface accepts a passphrase prompt, the implementation does not apply it to generated private keys. This is a documented implementation limitation, not a security guarantee.
This page describes the public code; it is not an independent security audit or a recommendation to use the tool for sensitive production data.
Explore the source
Start with the command dispatcher, then follow the separate encryption and key-generation classes. The public repository includes the implementation, project configuration, and license.