Public Key Infrastructure tools
The OpenSSL tool is the de-facto standard for all your cryptography needs. However, after years of appending new subcommands to the tool without the appropriate refactoring, it has become a monolith of many features beyond the simple pki routines of public/private key generation as well as data signing and verification. pkictl
is the command-line tool in this repository that provides a simple and clean interface to those methods.
git clone https://github.com/BreadTech/pki
cd pki
go build ./cmd/pkictl
./pkictl hash sha256 > signature.raw
will run SHA256 hash on data read from stdin (ctrl+D to quit) and write to file named signature.raw
./pkictl hash sha256 -f README.md -ohex
will hash the README.md file and write to stdout in hexadecimal
./pkictl generate rsa
will generate a 2048-bit RSA private key (TODO: parameterize bit size)
./pkictl generate ec
will generate an elliptic-curve cryptography private key using the P224 curve (TODO: parameterize curve)
./pkictl generate edc
will generate an Edwards-curve private key.