sigmate
A modern CLI for cryptographic file signing and verification.
- Ed25519 signatures
- Raw .sig files and central JSON metadata
- CycloneDX SBOM generation
- MD5/SHA1/SHA256/SHA512 checksum support
- Explicit trust store and keyring
- CI-friendly JSON output
- Idempotent signing with safe overwrite via --force
Table of contents
Install
Build from source:
# add target/release to your PATH
Install from cargo
Quick start
# Configure defaults once
# Add a signer and mark verified after you vet it
# Sign your project: raw .sig and metadata + SBOM
# Verify with signer alias from keyring
Concepts
-
Keyring: public keys stored by alias at
~/.config/sigmate/public_keys/. -
Trust store: policy and audit at
~/.config/sigmate/trusted_public_keys.json.- verification_status: pending | verified | revoked | compromised
-
Artifacts directory:
./signatures/by default. -
Idempotent signing: existing valid signatures are skipped; mismatches fail unless
--forceis used.
Usage
Run sigmate --help or sigmate <command> --help for all flags.
sign
Generate Ed25519 signatures, metadata, SBOM, and/or checksum files.
# Recursively sign, produce .sig and metadata and SBOM
# Single file with expiration in hours
# Checksums only (no signing)
# Use a specific PEM private key (encrypted keys supported)
# Output directory for artifacts
# Orphan scan and prune
Key flags (subset):
--raw,--meta,--both--sbom--key PATH,--key-password-env ENV--signatures-output DIR--identity STR,--host STR--expires-in HOURS--no-abspath--gen-md5sums,--gen-sha1sums,--gen-sha256sums,--gen-sha512sums--force--report-orphans,--prune-orphans,-y--json
verify (signatures)
Verify using a public key path or a signer alias in the keyring.
# Use alias from keyring, enforce trust
# Use a specific public key
# Machine readable output
Signature source selection:
--sig-type auto|raw|meta(default auto)- Raw signatures are discovered at
./signatures/<file>.sig - Metadata is read from
./signatures/sigmate.meta.json
verify (checksums)
Verify against a checksum file (GNU or BSD format).
# Verify all entries from SHA256SUMS
# Verify a specific file against a checksum file
# JSON report
Flags:
--checksum-file FILE--checksum-algo auto|md5|sha1|sha256|sha512(auto usually fine)--checksum-format auto|gnu|bsd(auto by default)
trust
Manage trusted keys and the keyring.
# Add a key (stored as ~/.config/sigmate/public_keys/<name>.pub)
# List keys
# Update status
# Remove from trust store (key file remains in keyring)
configure
Set defaults interactively or non-interactively.
# Interactive
# Non-interactive
Environment overrides:
SIGMATE_PRIVATE_KEY_PATHSIGMATE_SIGNER_IDENTITYSIGMATE_KEYRING_PATH
clean
Remove generated artifacts with confirmation.
# Clean default ./signatures and default checksum files in CWD
# Clean a specific artifact directory
Safety checks prevent deleting protected system paths.
Artifacts
sigmate.meta.json
Array of entries, one per signed file.
Notes:
abspathis omitted when--no-abspathis used.expires_atis set when--expires-inis used.version.gitis filled when the directory is a Git repo with an origin remote.
sigmate.sbom.json
CycloneDX 1.5. Each signed file becomes a component with:
-
SHA-256 hash
-
Ed25519 signature
-
properties:
sigmate:relpathsigmate:abspath(omitted with--no-abspath)
-
tool metadata with VCS references
checksum files
GNU style:
01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b myfile.zip
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 *empty file.txt
BSD style:
SHA256 (myfile.zip) = 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
MD5 (empty.txt) = d41d8cd98f00b204e9800998ecf8427e
JSON output and exit codes
Most commands accept --json.
Verify (signatures) example:
Exit codes:
- 0: success
- 1: failure (verification mismatch, etc.)
- 2: user aborted or idempotency failure requiring
--force
Security model
- Ed25519 only for signing and verification.
- Encrypted private keys supported. Provide passphrase via
--key-password-env ENVor interactively. - Trust is explicit.
--require-trustedenforces that the verifying key is present and markedverifiedin the trust store. - Idempotency. Existing valid signatures are not overwritten unless
--forceis set.
Authors
Lucian BLETAN
License
MIT. See LICENSE.