Skip to content

fix(crypto): align Ed25519 profile verification across TS and Go#880

Merged
jithinraj merged 1 commit into
mainfrom
pr/e2-ed25519-peac-profile
Jun 27, 2026
Merged

fix(crypto): align Ed25519 profile verification across TS and Go#880
jithinraj merged 1 commit into
mainfrom
pr/e2-ed25519-peac-profile

Conversation

@jithinraj

@jithinraj jithinraj commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary

Aligns the TypeScript and Go reference verifiers on the PEAC Ed25519 verification profile, with shared edge-vector coverage and fail-closed runtime behavior.

The profile uses cofactorless Ed25519 verification with public-input admissibility checks for small-order public keys and unreduced signature scalars. The TypeScript implementation uses WebCrypto Ed25519 for verification and fails closed when the runtime does not support the required primitive. The Go implementation applies the same admissibility checks before stdlib verification.

Scope

  • Adds the shared ed25519-peac-profile edge-vector corpus.
  • Adds TypeScript and Go parity tests for the profile.
  • Adds verifier runtime-support handling for WebCrypto Ed25519.
  • Adds browser-verifier handling for unsupported Ed25519 runtimes.
  • Documents the Ed25519 verification profile and runtime requirement.
  • Raises Node engine metadata to >=22.13.0 where applicable.
  • Adds Apache-2.0 license/notice files for vendored test vectors.

Compatibility

  • No wire-format change.
  • No schema change.
  • No CLI behavior change.
  • No signing-output change.
  • No new crypto dependency.
  • No fallback to a different Ed25519 verification predicate.
  • pnpm-lock.yaml is unchanged.
  • Malformed or wrong-length Ed25519 signatures are still rejected. At the direct crypto verifier boundary, these inputs now resolve as valid: false instead of surfacing an untyped verifier exception.

Unsupported TypeScript runtimes fail closed instead of silently using a different verifier behavior.

Verification

  • pnpm --filter '@peac/crypto' test
  • pnpm --filter '@peac/protocol' test
  • pnpm --filter '@peac/schema' test
  • pnpm test:conformance
  • pnpm typecheck:core
  • pnpm verify:codegen-drift
  • pnpm verify:registries-schema
  • pnpm verify:no-widening
  • pnpm exec tsx scripts/extract-api-contract.ts --check
  • node scripts/conformance/generate-inventory.mjs --check
  • bash scripts/ci/forbid-strings.sh
  • cd sdks/go && go build ./... && go test ./... -count=1 && go test -race ./... -count=1
  • pnpm --filter './apps/verifier' test
  • pnpm --filter '@peac/cli' test
  • CLI offline verify smoke: valid sample exits 0; tampered sample exits 1

Comment thread packages/crypto/src/ed25519.ts Fixed
Comment thread packages/crypto/src/ed25519.ts Fixed
@jithinraj jithinraj force-pushed the pr/e2-ed25519-peac-profile branch 3 times, most recently from 7328199 to 2f49c38 Compare June 27, 2026 19:34
Comment thread packages/crypto/src/ed25519.ts Fixed
Comment thread packages/crypto/src/ed25519.ts Fixed
@jithinraj jithinraj force-pushed the pr/e2-ed25519-peac-profile branch from 2f49c38 to 6e3e7a6 Compare June 27, 2026 19:44
@jithinraj jithinraj changed the title fix(crypto): enforce PEAC Ed25519 verification profile fix(crypto): align Ed25519 profile verification across TS and Go Jun 27, 2026
@jithinraj jithinraj force-pushed the pr/e2-ed25519-peac-profile branch from 6e3e7a6 to d7813f3 Compare June 27, 2026 20:02
@jithinraj jithinraj merged commit 3485dac into main Jun 27, 2026
33 checks passed
@jithinraj jithinraj deleted the pr/e2-ed25519-peac-profile branch June 27, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant