What CI enforces, plus what a human reviewer should add. See AGENTS.md
for rationale.
-
go build ./...andgo test -count=1 ./...pass on amd64 for Go 1.25 and 1.26. -
golangci-lint runis clean (config:.golangci.yaml). -
go vet ./...andgo vet -vettool=shadow ./...are clean. -
go generate -v ./...leaves the working tree unchanged. - arm64, WASM (
GOOS=js GOARCH=wasm), macOS, and Windows builds pass. -
make circl_staticandmake circl_pluginstill work if package layout changed. - CodeQL and Semgrep workflows have no new findings.
- No new secret-dependent branches, memory accesses, table indices, or
loop bounds.
crypto/subtleused for comparisons/selection on secrets. - No new
unsafe— or written justification in the commit message and confinement tointernal/. -
crypto/rand(or an injectedio.Reader) for randomness. Nomath/randin crypto paths. - Parsers reject malformed encodings; identity elements, zero scalars,
zero challenges are handled explicitly (precedents:
sign/bls,ecc/bls12381,zk/qndleq,pki). - No new
requireentries unless already permitted bydepguard; new ones include adepguardupdate. -
gosecfindings are addressed or explicitly justified (G115 is pre-excluded).
- Implementation cites its spec — RFC, FIPS, IETF draft, or paper
(
ia.cr/...) — in code comments or commit message. - Edge cases exercised: zero / one / identity / max-value inputs, empty slices, oversized inputs, malformed encodings.
- KATs still pass. Regenerated golden values include a written reason
and an upstream reference (see commit
91088f2). - Errors are returned, not swallowed. No
panicon attacker-controlled input.
- Every bug fix has a regression test that fails without the fix.
- New crypto code has unit tests covering the documented contract.
- Exported names have godoc.
- Additive changes are preferred. Breaking changes are called out in
the PR description and paired with
// Deprecated:where feasible (seedh/sidh). - No silent wire-format changes. If a serialized representation changes, KATs are regenerated and the change is documented.
- Generated packages: the template was edited (not the generated
file), and
make generatewas run. - Changed
.sfiles were produced by rerunning their generator under*/internal/asm/; the diff is reproducible. - Any new assembly path has a pure-Go fallback
(
make NOASM=1 testpasses).
- Package-level godoc explains what primitive is implemented and from which spec.
- Non-obvious parameter choices (security level, hash, domain separation tag) are documented.
- New top-level packages are listed in
README.mdunder the relevant "List of Algorithms" subsection.
The README disclaims API stability — "changes in the code, repository, and API occur in the future." The bar is "correct, justified, and reproducible," not "frozen." When a change looks risky on security or correctness grounds, request a second review from someone with cryptographic background before merging.