Skip to content

breadtech/pki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pki

Public Key Infrastructure tools

Introduction

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.

Getting Started

Prerequisites

Go 1.13

To compile

git clone https://github.com/BreadTech/pki
cd pki
go build ./cmd/pkictl

Hashing data

./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

Generating a key

./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.