No description
Find a file
Snider 737a5c3dc4
Some checks failed
Security Scan / security (push) Has been cancelled
Test / test (push) Has been cancelled
refactor(crypt): collapse auth+trust service.go into single trust/service.go (Mantis #1336)
Snider correction 2026-05-01: one Service per repo, not one per
subpackage. Drops go/auth/service.go + go/trust/service.go from prior
session and replaces with a single go/trust/service.go (package
trust) wrapping the auth Authenticator + trust Registry/Policy/Approval/
Audit handles + the stateless crypt encryption primitives.

Action namespaces preserve the per-domain shape: auth.* / trust.* /
crypt.*. Hosted in trust/ to avoid the auth↔crypt import cycle (auth
already imports crypt; trust has no internal go-crypt deps).

Direct method use stays available on svc.Authenticator / svc.Registry
/ svc.Policy / svc.Queue / svc.Audit for richer signatures
(RotateKeyPair, RevokeKey, WriteChallengeFile, etc.) which are not
IPC-serialisable.

Co-Authored-By: Cladius <noreply@anthropic.com>
2026-05-01 18:28:43 +01:00
.core chore: add .core/ build and release configs 2026-03-06 18:52:36 +00:00
.forgejo/workflows ci: add Forgejo Actions test and security scan workflows 2026-02-23 03:28:02 +00:00
.idea chore: add .core/ and .idea/ to .gitignore 2026-03-15 10:17:49 +00:00
docs docs: finish AX review follow-ups 2026-03-26 11:31:34 +00:00
external chore(repo): bump external/go-log submodule to pick up #1347 fix 2026-05-01 15:45:00 +01:00
go refactor(crypt): collapse auth+trust service.go into single trust/service.go (Mantis #1336) 2026-05-01 18:28:43 +01:00
.editorconfig chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:33 +00:00
.gitignore chore: add .core/ and .idea/ to .gitignore 2026-03-15 10:17:49 +00:00
.gitmodules refactor(crypt): restructure to /go/ subtree (Phase 1, Mantis #1230) 2026-05-01 07:09:12 +01:00
.golangci.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:33 +00:00
.woodpecker.yml ci: woodpecker pipeline (Go) — golangci-lint/eslint/phpstan + sonar.lthn.sh 2026-04-29 00:03:03 +01:00
AGENTS.md docs(repo): add canonical AGENTS.md (Mantis #1311) 2026-05-01 09:44:19 +01:00
CLAUDE.md docs: finish AX review follow-ups 2026-03-26 11:31:34 +00:00
CONTRIBUTING.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:33 +00:00
go.work chore(repo): refresh submodules + go.work hygiene (Phase 2 cascade unblock) 2026-05-01 09:39:33 +01:00
LICENCE chore: add EUPL-1.2 LICENCE file (UK English canonical) 2026-05-01 08:33:52 +01:00
README.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:33 +00:00
sonar-project.properties ci: woodpecker pipeline (Go) — golangci-lint/eslint/phpstan + sonar.lthn.sh 2026-04-28 23:33:18 +01:00
UPGRADE.md docs(crypt): add ax v0.8.0 upgrade plan 2026-03-26 13:06:25 +00:00

Go Reference License: EUPL-1.2 Go Version

go-crypt

Cryptographic primitives, authentication, and trust policy engine for the Lethean agent platform. Provides symmetric encryption (ChaCha20-Poly1305 and AES-256-GCM with Argon2id KDF), OpenPGP challenge-response authentication with online and air-gapped courier modes, Argon2id password hashing, RSA-OAEP key generation, RFC-0004 deterministic content hashing, and a three-tier agent trust policy engine with an audit log and approval queue.

Module: forge.lthn.ai/core/go-crypt Licence: EUPL-1.2 Language: Go 1.25

Quick Start

import (
    "forge.lthn.ai/core/go-crypt/crypt"
    "forge.lthn.ai/core/go-crypt/auth"
    "forge.lthn.ai/core/go-crypt/trust"
)

// Encrypt with ChaCha20-Poly1305 + Argon2id KDF
ciphertext, err := crypt.Encrypt(plaintext, passphrase)

// OpenPGP authentication
a := auth.New(medium, auth.WithSessionStore(auth.NewSQLiteSessionStore(dbPath)))
session, err := a.Login(userID, password)

// Trust policy evaluation
engine := trust.NewPolicyEngine(registry)
decision := engine.Evaluate("Charon", "repo.push", "core/go-crypt")

Documentation

Build & Test

go test ./...
go test -race ./...
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.