Files
zeekay c79fe61d62 consolidate: merge pulsar-mptc submission framework into canonical luxfi/pulsar
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
2026-05-18 19:53:08 -07:00

75 lines
3.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Fetch libjade at the pinned commit used by Pulsar's high-assurance track.
#
# We do not vendor libjade into this repository - see ./README.md for the
# fetch-on-demand rationale. This script reproduces the libjade tree on
# demand and pins it to a known-good commit so the submission artifact
# reproduces deterministically across reviewers.
set -euo pipefail
LIBJADE_REPO="https://github.com/formosa-crypto/libjade.git"
# Pinned at submission-tag time. Update at the same time as the
# Pulsar submission tag so the artifact chain stays reproducible.
#
# 9426b32 (2025-12-09) "Dilithium: remove suspicious annotations" is the
# last commit before the libjade dilithium tree restructure that breaks
# our require paths. The dilithium ML-DSA sources are at
#
# <libjade>/oldsrc-should-delete/crypto_sign/dilithium/dilithium3/amd64/ref/
# <libjade>/oldsrc-should-delete/crypto_sign/dilithium/common/amd64/
#
# We expose them through a stable `upstream/` symlink (see below) so our
# threshold-layer require paths are insulated from upstream restructures.
LIBJADE_COMMIT="9426b320031ea121c9b07b1a7d7d616dd97c1a75"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
if [[ -d libjade/.git ]]; then
echo "==> libjade already cloned at $SCRIPT_DIR/libjade"
( cd libjade && git fetch --quiet origin && git checkout --quiet "$LIBJADE_COMMIT" )
else
echo "==> cloning libjade at $LIBJADE_COMMIT"
git clone --quiet "$LIBJADE_REPO" libjade
( cd libjade && git checkout --quiet "$LIBJADE_COMMIT" )
fi
# Pulsar's Jasmin sources reference libjade through Jasmin's `from Jade
# require ...` mechanism, with the Jade root resolved to the SRC_ROOT
# directory below at compile time via `jasminc -I Jade=$SRC_ROOT`. We
# document the canonical SRC_ROOT for this libjade commit here:
SRC_ROOT="$SCRIPT_DIR/libjade/oldsrc-should-delete"
# Sanity-check that the expected dilithium3 ref tree is in place.
DIL3_REF="$SRC_ROOT/crypto_sign/dilithium/dilithium3/amd64/ref"
if [[ ! -d "$DIL3_REF" ]]; then
echo "!! libjade tree at $LIBJADE_COMMIT does not contain $DIL3_REF" >&2
echo "!! upstream may have restructured; re-pin LIBJADE_COMMIT in this script" >&2
exit 1
fi
# Expose a stable 'upstream/' path that our threshold layer can reference
# even if libjade's internal layout shifts again. We symlink rather than
# copy so a `git pull` in libjade/ stays consistent. Prefer a
# repository-relative target so a `git mv` of the whole tree stays
# coherent; fall back to absolute on platforms that can't compute it.
if [[ -L upstream || -d upstream ]]; then
rm -rf upstream
fi
REL_TARGET="libjade/oldsrc-should-delete/crypto_sign/dilithium/dilithium3/amd64/ref"
if [[ -d "$SCRIPT_DIR/$REL_TARGET" ]]; then
ln -s "$REL_TARGET" upstream
else
ln -s "$DIL3_REF" upstream
fi
# Print the jasminc -I flag the caller should use.
echo "==> libjade ready at $SCRIPT_DIR/libjade ($LIBJADE_COMMIT)"
echo " ML-DSA-65 sources: $DIL3_REF"
echo " Stable symlink: $SCRIPT_DIR/upstream -> $DIL3_REF"
echo
echo " To compile Pulsar threshold .jazz files, pass:"
echo " jasminc -I Jade=$SRC_ROOT -I Pulsar=$(realpath "$SCRIPT_DIR/..") <file>.jazz"