Docs / Guides

Signatures

sign produces a composite ML-DSA-65 + Ed25519 signature. Verification passes only if both halves verify.

01How it works

Composite signature: ML-DSA-65 and Ed25519 over the same prepared message; verify requires both.

The message is hashed with SHA-512 and prefixed with a fixed label and the signature header, then signed by both algorithms (RFC 10073 composite signatures). Stripping either half changes the length and fails verification.

02Sign and verify

const sig = sign.sign(signKeys, artifact);
const text = sign.toText(sig);                     // "pqlg.…"
sign.verify(publicSignKeys, artifact, text);       // true, or throws PQLVerifyError
sig = sign.sign(artifact, sign_keys)
text = sign.to_text(sig)
sign.verify(artifact, text, public_sign_keys)      # None, or raises VerifyError
sig, err := sign.Sign(signKeys, artifact)
text := sign.Encode(sig)
err = sign.VerifyText(publicSignKeys, artifact, text)

03Signing releases

The CLI writes detached signatures that installers check before running anything:

pql keys new --purpose sign --out release.keyset --public-out release.pub
pql sign -k release.keyset -o app-1.2.0.tar.gz.pqlsig app-1.2.0.tar.gz
pql verify -k release.pub --sig app-1.2.0.tar.gz.pqlsig app-1.2.0.tar.gz

The uc4-release-signing use case shows a Node installer that refuses any artifact without a valid .pqlsig.

04Notes

pqlock v0.1.0 · unaudited preview · source of truth: spec/