mirror of
https://github.com/luxfi/pulsar.git
synced 2026-09-24 00:25:52 +00:00
Single repo, one canonical impl + spec + proofs + KAT + cut tool.
Per "ONE and ONLY ONE way to do things" the prior dual-repo split
(luxfi/pulsar = production library, luxfi/pulsar-mptc = NIST MPTC
submission framework) is collapsed into a single canonical home at
github.com/luxfi/pulsar. SINGLE-IMPL-PLAN.md (now marked COMPLETED)
describes the steps; this commit lands the final step.
Files moved (89 new):
16 submission docs (SUBMISSION, NIST-SUBMISSION, SPEC, SUITE,
PATENTS, AXIOM-INVENTORY, PROOF-CLAIMS, FIPS-TRACEABILITY,
TRUSTED-COMPUTING-BASE, HANZO-CRYPTO-SUITE, INFORMATION-
ARCHITECTURE, ROADMAP, CHANGELOG, SYNC-STATUS, STATUS-
SUBMISSION-READINESS, SINGLE-IMPL-PLAN)
10 docs/ supplements (ietf-draft-skeleton, magnetar, evaluation,
patent-claims, x-wing-sig, design-decisions, family-architecture,
threat-model, nist-mptc-category, patent-notes-draft)
19 proofs/ (13 EC theories + 2 EC lemmas + 4 metadata/READMEs +
lean-easycrypt-bridge.md)
14 jasmin/ (lib/* + ml-dsa-65 fetch + threshold/{combine,round1,
round2}.jazz + READMEs)
10 ct/dudect/ (Makefile, combine_ct.go, dudect_combine.c,
dudect_compat.h, dudect_verify.c, fetch.sh, README, run-
submission.sh, verify_ct.go) + ct/jasmin-ct-libjade.md
1 .github/workflows/ci.yml
1 test/interoperability/n1_class_test.go (19/19 N1 subtests)
1 bench/results/REPORT.md
11 scripts/ (cut-submission, check-high-assurance, check-lean-
bridge, nightly, extract-jasmin-ec, checks/{ec-admits, ec-
compile, ec-refinement-scaffold, ec-regressions, extraction,
jasmin}, checks/test/{go-unit, interop, kat, no-secret-logs})
Files merged (16 overlapping, mptc-canonical chosen because newer +
post-rewire-correct; pulsar versions still bore stale "Pulsar-M" /
"pulsarm" branding):
README.md, BLOCKERS.md, CONTRIBUTING.md, LICENSE, LICENSING.md,
SECURITY.md, .gitignore, bench/run_all.sh, vectors/dkg.json (v1.0.7
regen), scripts/{bench,build,gen_vectors,sbom,test}.sh,
spec/{pulsar,parameters,system-model}.tex,
CRYPTOGRAPHER-SIGN-OFF.md (path refs).
Pulsar-only spec supplements preserved:
spec/{blockers,design-decisions,family-architecture,nist-mptc-
category,patent-notes,threat-model}.tex.
Path rewrites applied: 158 occurrences across 26 files
github.com/luxfi/pulsar-mptc -> github.com/luxfi/pulsar
~/work/lux/pulsar-mptc/ -> ~/work/lux/pulsar/
luxfi/pulsar-mptc -> luxfi/pulsar
pulsar-mptc/ -> ./
Narrative collapses (no more two-repo framing):
SUBMISSION.md "At a glance" — single Repository row
SYNC-STATUS.md — rewritten to single-repo state
SINGLE-IMPL-PLAN.md — marked COMPLETED 2026-05-18
HANZO-CRYPTO-SUITE.md — tier 1 row = single canonical home
scripts/cut-submission.sh — replace/vendor dance removed; cuts
directly from in-tree canonical sources
go.mod: dropped mptc's replace directive (no longer needed since this
IS the canonical pulsar repo). Module path is github.com/luxfi/pulsar.
Deps: cloudflare/circl v1.6.3, golang.org/x/crypto v0.32.0.
Verification:
GOWORK=off go build ./... PASS
GOWORK=off go test -count=1 ./... PASS (1.4s)
GOWORK=off go test -race ./ref/... PASS (14.7s)
go test ./test/interoperability/ PASS (19/19 N1 subtests)
scripts/check-high-assurance.sh PASS
scripts/check-lean-bridge.sh PASS (5/5 bridges)
scripts/gen_vectors.sh byte-identical replay
scripts/cut-submission.sh --help PASS
107 lines
3.0 KiB
Bash
Executable File
107 lines
3.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# scripts/checks/jasmin.sh — Jasmin type-check + jasmin-ct gates.
|
|
#
|
|
# Two independent obligations:
|
|
#
|
|
# 1. The threshold-layer .jazz files (round1, round2, combine) MUST
|
|
# type-check under jasminc and MUST pass jasmin-ct (without
|
|
# --infer). Failure of either is BLOCKING; this script exits 2.
|
|
#
|
|
# 2. The libjade ML-DSA-65 sign.jazz is run through jasmin-ct
|
|
# --infer as ADVISORY (tracked under #2). Findings are reported
|
|
# but do not fail the gate.
|
|
#
|
|
# Skip-friendly: exits 0 with [skip] message when jasminc or libjade
|
|
# is not on the path, so the orchestrator gate stays additive.
|
|
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
cd "$REPO_ROOT"
|
|
|
|
JASMIN_ROOT="$REPO_ROOT/jasmin"
|
|
LIBJADE_DIR="$JASMIN_ROOT/ml-dsa-65/libjade/oldsrc-should-delete"
|
|
|
|
if ! command -v jasminc >/dev/null 2>&1; then
|
|
echo "==> jasmin"
|
|
echo " [skip] jasminc not on PATH (opam install jasmin)"
|
|
exit 0
|
|
fi
|
|
echo "==> jasminc found ($(jasminc -version 2>&1 | head -1))"
|
|
|
|
if [[ ! -d "$LIBJADE_DIR" ]]; then
|
|
echo " [info] libjade not fetched; skipping jasmin gates"
|
|
echo " fetch: $JASMIN_ROOT/ml-dsa-65/fetch.sh"
|
|
exit 0
|
|
fi
|
|
|
|
JAZZ_FILES=(
|
|
"$JASMIN_ROOT/threshold/round1.jazz"
|
|
"$JASMIN_ROOT/threshold/round2.jazz"
|
|
"$JASMIN_ROOT/threshold/combine.jazz"
|
|
)
|
|
|
|
# ----- threshold layer: type check -----
|
|
JASMIN_FAIL=0
|
|
for f in "${JAZZ_FILES[@]}"; do
|
|
if [[ ! -f "$f" ]]; then
|
|
echo " [warn] missing: $f"
|
|
continue
|
|
fi
|
|
echo " [check] $f"
|
|
if ! jasminc -until_typing -I "Jade=$LIBJADE_DIR" "$f" 2>&1 | grep -E "^.*error"; then
|
|
echo " [ok] $f type-checks"
|
|
else
|
|
echo " [FAIL] $f"
|
|
JASMIN_FAIL=1
|
|
fi
|
|
done
|
|
if [[ $JASMIN_FAIL -ne 0 ]]; then
|
|
echo
|
|
echo " Jasmin type-check gate FAILED."
|
|
exit 2
|
|
fi
|
|
|
|
# ----- threshold layer: jasmin-ct BLOCKING -----
|
|
if ! command -v jasmin-ct >/dev/null 2>&1; then
|
|
echo " [skip] jasmin-ct not on PATH"
|
|
exit 0
|
|
fi
|
|
|
|
echo
|
|
echo "==> jasmin-ct (BLOCKING — threshold layer)"
|
|
CT_FAIL=0
|
|
for f in "${JAZZ_FILES[@]}"; do
|
|
[[ -f "$f" ]] || continue
|
|
CT_OUT=$(jasmin-ct -I "Jade=$LIBJADE_DIR" "$f" 2>&1)
|
|
if [[ -z "$CT_OUT" ]]; then
|
|
echo " [ok] $f"
|
|
else
|
|
echo " [FAIL] $f"
|
|
echo "$CT_OUT" | sed 's/^/ /'
|
|
CT_FAIL=1
|
|
fi
|
|
done
|
|
if [[ $CT_FAIL -ne 0 ]]; then
|
|
echo
|
|
echo " jasmin-ct gate FAILED — threshold layer no longer CT-clean."
|
|
exit 2
|
|
fi
|
|
|
|
# ----- libjade sign: jasmin-ct ADVISORY -----
|
|
LIBJADE_SIGN="$LIBJADE_DIR/crypto_sign/dilithium/dilithium3/amd64/ref/sign.jazz"
|
|
if [[ -f "$LIBJADE_SIGN" ]]; then
|
|
echo
|
|
echo "==> jasmin-ct (advisory — libjade ML-DSA-65 sign, #2)"
|
|
CT_OUT=$(jasmin-ct --infer -I "Jade=$LIBJADE_DIR" "$LIBJADE_SIGN" 2>&1 | tail -2 || true)
|
|
if [[ -z "$CT_OUT" ]]; then
|
|
echo " [advisory-ok] $LIBJADE_SIGN"
|
|
else
|
|
echo " [advisory-note] $LIBJADE_SIGN"
|
|
echo "$CT_OUT" | sed 's/^/ /'
|
|
fi
|
|
echo " (see ct/jasmin-ct-libjade.md for the documented fix path)"
|
|
fi
|
|
|
|
exit 0
|