Getting Started

This guide walks you through installing Trinity, initializing a Root CA, and signing your first certificate.

Prerequisites

For Trinity Authority (CLI)

For Trinity Passport (Desktop App)

Step 1: Clone the Repository

git clone https://github.com/trinity-pki/trinity-pki.git
cd trinity-pki

The repository is a monorepo with the following structure:

DirectoryComponentDescription
authority/Authority CLIOffline Root CA tool
passport/Passport DesktopIdentity vault (Wails app)
spirit/Spirit GatewayCloudflare Worker relay
connect/Connect ServerSelf-hosted Go server

Step 2: Build the Authority CLI

cd authority
make build

This produces a single binary: ./trinity

Step 3: Initialize the Root CA

./trinity init --name "My Root CA" --org "My Organization"

You will be prompted for a passphrase. This passphrase protects your Root CA private key with AES-256 encryption. Do not lose it.

What gets generated: The init command creates an Ed25519 Root CA key pair plus a Kyber-1024 transport key pair for post-quantum "Blind Drop" support. All private keys are passphrase-encrypted at rest.

The following files are created in the safe/ directory:

FileDescription
root.keyRoot CA private key (AES-256 encrypted)
root.crtRoot CA self-signed certificate
transport.pubKyber-1024 public key (for Blind Drops)
transport.keyKyber-1024 private key (encrypted)
Security: Private key files are automatically set to chmod 0400. The Authority CLI will refuse to load keys with incorrect permissions.

Step 4: Sign a Certificate

Interactive Mode (Recommended)

./trinity sign

This launches an interactive TUI where you can review the CSR details before signing.

Headless Mode

cat request.csr | ./trinity sign > cert.crt

Blind Drop Mode (Encrypted CSR)

cat drop.enc | ./trinity sign --transport-key safe/transport.key > response.enc

In Blind Drop mode, the CSR is encrypted with Kyber-1024. The Authority decrypts it, signs the certificate, and re-encrypts the response with the client's ephemeral key.

Step 5: Verify a Certificate

./trinity verify --cert user.crt

This checks the certificate chain against the Root CA and the Certificate Revocation List (CRL).

Step 6: Set Up Passport (Optional)

If you want the desktop identity vault for end-users:

cd ../passport

# Development mode
wails dev -tags webkit2_41    # Linux
wails dev                      # macOS / Windows

# Production build
wails build -tags webkit2_41
Whitelabeling: Edit passport/config.json to customize the app title, company name, colors, and admin email for your organization.

Next Steps