Skip to main content
Host UK

TRIX PGP Encryption (RFC-0019)

Lethean R&D Labs
RFC PGP Encryption OpenPGP

PGP-based encryption for DataNode archives and account credentials. Both symmetric (password) and asymmetric (public key) encryption using OpenPGP standards. Legacy format for compatibility.

Features

Symmetric Encryption

Password-based encryption using PGP symmetric cipher

Asymmetric Encryption

Public key encryption for identity management

OpenPGP Standard

Compatible with GPG and other OpenPGP implementations

Legacy Support

ToTrix/FromTrix for backwards compatibility

Installation

import "github.com/Snider/Borg/pkg/trix"

// Encrypt DataNode with PGP
encrypted, _ := trix.ToTrix(datanode, password)

// Key derivation
key := trix.DeriveKey(password)  // SHA-256 hash, 32 bytes

Usage

Key Derivation

func DeriveKey(password string) []byte {
    hash := sha256.Sum256([]byte(password))
    return hash[:]  // 32 bytes
}

Note: FromTrix with password returns error "decryption disabled" - this is intentional to prevent accidental password use on potentially malicious payloads.

More from Lethean R&D Labs

View all projects →

Fancy helping out?

Spotted a bug? Got an idea? We'd love to hear from you.

Read the contributing guide →