Files
corona/scripts/test.sh
T
zeekay fbe2bc5a88 submission: scaffold NIST MPTC v0.2 submission package mirroring Pulsar template
Adds the NIST MPTC Class N1 + N4 submission package for Corona (R-LWE
threshold signing). Pattern mirrors luxfi/pulsar (M-LWE byte-equal
FIPS 204 path), adapted HONESTLY to Corona's lighter proof tier:

- SUBMISSION.md / NIST-SUBMISSION.md — cover sheet + 1-page exec
  summary. Cite Boschini-Kaviani-Lai-Malavolta-Takahashi-Tibouchi
  ePrint 2024/1113 (IEEE S&P 2025) as the underlying construction.
  Construction-level N1 claim (no FIPS standard target for R-LWE
  threshold — Boschini et al. IS the spec). N4 = (A, bTilde)
  preserved across reshare within a key era.
- SPEC.md — standalone construction specification consolidating
  existing material (papers/lp-073-pulsar/, DESIGN.md). Full
  single-doc spec/corona.tex is roadmap v0.6.0.
- PATENTS.md — royalty-free patent grant + defensive termination.
  Claim scope EXCLUDES the published Boschini et al. construction;
  claims limited to Corona's production lifecycle additions
  (Pedersen DKG over R_q, proactive resharing, activation cert
  circuit-breaker, constant-time Pedersen slot equality, hash-suite
  injection).
- PROOF-CLAIMS.md — HONEST framing. Corona ships NO mechanized
  refinement (no EasyCrypt, no Lean, no Jasmin) — unlike Pulsar.
  Correctness reduces to code review + KAT cross-runtime byte-equality
  + academic construction analysis + per-path constant-time static
  audit. Mechanized refinement is roadmap v0.7.0.
- TRUSTED-COMPUTING-BASE.md — implementation TCB. Structurally
  simpler than Pulsar's; no EC/Lean/Jasmin tools in scope.
- DEPLOYMENT-RUNBOOK.md — operator-facing trust-model disclosure.
- LICENSING.md / CONTRIBUTING.md / SECURITY.md — standard NIST-MPTC
  artifacts.
- docs/mptc/ — submission-package docs subdir (kept separate from
  docs/ Next.js docs site):
  - evaluation.md, ietf-draft-skeleton.md, nist-mptc-category.md,
    patent-claims.md, design-decisions.md, family-architecture.md,
    threat-model.md
- scripts/{build,test,bench,gen_vectors,check-high-assurance,
  cut-submission}.sh — submission gates mirroring Pulsar's
  orchestrator pattern, adapted to Corona's reality (no EC/Lean/
  Jasmin checks because the artifacts do not exist).
- LLM.md + CHANGELOG.md — updated with submission scaffolding
  context and v0.5.0 entry. NO fabricated prior history; CHANGELOG
  v0.5.0 entry covers only the actual submission documentation.

DOES NOT FABRICATE: no CRYPTOGRAPHER-SIGN-OFF (Pulsar has one;
Corona's lighter proof tier does not yet warrant it — roadmap
v0.7.0+v0.8.0). No AXIOM-INVENTORY or FIPS-TRACEABILITY (Corona is
not anchored to a FIPS standard). No proof claims Corona does not
actually have.

Build/test verification: GOWORK=off go build ./... clean; sign/,
primitives/, hash/ unit tests pass; scripts/build.sh + scripts/
check-high-assurance.sh exit 0.
2026-05-18 23:10:13 -07:00

48 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# Corona test gate — orchestrator (per-push, REAL tests).
#
# Runs the available Go test surface for the production library
# plus KAT cross-runtime byte-equality verification.
#
# Corona's test surface is structurally simpler than Pulsar's:
# - No EasyCrypt theories to compile (Corona has none).
# - No Lean ↔ EC bridge to verify (Corona has none).
# - No Jasmin sources to type-check (Corona has none).
# - No jasmin-ct to run (Corona has no Jasmin path).
#
# See PROOF-CLAIMS.md §3 for the honest framing of why this gate is
# lighter than Pulsar's.
#
# The checks, in order:
#
# 1. Go unit + integration tests (with race detector)
# 2. KAT cross-runtime byte-equality (Go ↔ C++ luxcpp port)
# if LUXCPP_DIR points at a populated checkout; SKIP otherwise.
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$REPO_ROOT"
export GOWORK=off
echo "==> Step 1: go test (with -race)"
go test -count=1 -race ./...
echo
echo "==> Step 2: KAT cross-runtime byte-equality"
LUXCPP_DIR="${LUXCPP_DIR:-${HOME}/work/luxcpp}"
if [[ -d "${LUXCPP_DIR}/crypto/corona" ]] || [[ -d "${LUXCPP_DIR}/crypto/pulsar" ]]; then
if [[ -x "$REPO_ROOT/scripts/regen-kats.sh" ]]; then
bash "$REPO_ROOT/scripts/regen-kats.sh" --verify
else
echo " [skip] scripts/regen-kats.sh not present or not executable"
fi
else
echo " [skip] LUXCPP_DIR not populated; cross-runtime KAT check skipped"
echo " [info] set LUXCPP_DIR=/path/to/luxcpp and re-run to exercise the gate"
fi
echo
echo "==> done — test gate green"