No description
Find a file
Snider 703dd4588c
Some checks failed
Security Scan / security (pull_request) Failing after 7s
Test / test (pull_request) Successful in 11m55s
refactor: standardise coreerr import alias and fix shortenPackageName
- CLAUDE.md: update error convention from core.E() to coreerr.E() to
  match actual codebase usage
- Standardise go-log import alias from `core` to `coreerr` across 6
  files (crypt/symmetric.go, crypt/kdf.go, crypt/crypt.go, crypt/hash.go,
  crypt/checksum.go, crypt/openpgp/service.go) for consistency with the
  11 files already using `coreerr`
- Fix shortenPackageName to handle all forge.lthn.ai/core/* module
  prefixes instead of only cli/ and gui/, fixing TestShortenPackageName

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 07:22:34 +00: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
auth refactor: replace remaining fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 20:50:38 +00:00
cmd refactor: standardise coreerr import alias and fix shortenPackageName 2026-03-17 07:22:34 +00:00
crypt refactor: standardise coreerr import alias and fix shortenPackageName 2026-03-17 07:22:34 +00:00
docs docs: add human-friendly documentation 2026-03-11 13:02:40 +00:00
trust refactor: replace remaining fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 20:50:38 +00: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
.golangci.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:33 +00:00
CLAUDE.md refactor: standardise coreerr import alias and fix shortenPackageName 2026-03-17 07:22:34 +00:00
CONTRIBUTING.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:33 +00:00
go.mod chore: sync dependencies for v0.1.10 2026-03-16 22:19:33 +00:00
go.sum chore: sync dependencies for v0.1.10 2026-03-16 22:19:33 +00:00
README.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:33 +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.