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
110 lines
3.5 KiB
Makefile
110 lines
3.5 KiB
Makefile
# Pulsar constant-time analysis harness — dudect bridge.
|
|
#
|
|
# Builds the cgo shim libraries (libpulsar_verify, libpulsar_combine)
|
|
# and links the C dudect harnesses against them.
|
|
#
|
|
# Prereqs (run once):
|
|
# ./fetch.sh # pulls dudect.h at the pinned commit
|
|
#
|
|
# Build:
|
|
# make # both verify + combine
|
|
# make verify # just verify
|
|
# make combine # just combine
|
|
#
|
|
# Run:
|
|
# ./dudect_verify # smoke test (10000 samples/batch x 4 batches)
|
|
# ./dudect_combine # smoke test (2000 samples/batch x 4 batches)
|
|
#
|
|
# Full submission run (10^9 samples on a pinned-CPU quiet host):
|
|
# DUDECT_SAMPLES=1000000 DUDECT_MAX_BATCHES=1000 ./dudect_verify
|
|
#
|
|
# Hosts:
|
|
# - x86_64 Linux/macOS: builds cleanly against upstream dudect.h
|
|
# - aarch64 Linux/macOS: dudect_compat.h is force-included to supply
|
|
# ARM equivalents of _mm_mfence() / __rdtsc(); see header for the
|
|
# accuracy disclaimer.
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
UNAME_M := $(shell uname -m)
|
|
|
|
# Shared-library extension is .dylib on macOS, .so elsewhere.
|
|
ifeq ($(UNAME_S),Darwin)
|
|
SHLIB_EXT := dylib
|
|
RPATH_FLAG := -Wl,-rpath,@loader_path
|
|
else
|
|
SHLIB_EXT := so
|
|
RPATH_FLAG := -Wl,-rpath,'$$ORIGIN'
|
|
endif
|
|
|
|
# Source paths.
|
|
REPO_ROOT := $(shell cd ../.. && pwd)
|
|
DUDECT_HDR := dudect/src/dudect.h
|
|
|
|
# C compile flags. -O2 is the default per dudect's own build; the
|
|
# leakage signal is preserved at -O2 because the inner do_one_computation
|
|
# call boundary is opaque to the compiler.
|
|
CC ?= cc
|
|
CFLAGS ?= -O2 -Wall -Wno-unused-parameter -I. -Idudect/src
|
|
LDFLAGS ?=
|
|
LDLIBS := -lm
|
|
|
|
# Force-include the ARM compat shim on AArch64 hosts so dudect.h's
|
|
# x86 intrinsics resolve. On x86 we skip the shim.
|
|
ifeq ($(UNAME_M),arm64)
|
|
CFLAGS += -include dudect_compat.h
|
|
endif
|
|
ifeq ($(UNAME_M),aarch64)
|
|
CFLAGS += -include dudect_compat.h
|
|
endif
|
|
|
|
# Go env. GOWORK=off matches scripts/test.sh — this repo uses a
|
|
# single-module layout and a stray go.work in any parent confuses
|
|
# the toolchain.
|
|
GO ?= go
|
|
GOENV := GOWORK=off CGO_ENABLED=1
|
|
|
|
.PHONY: all verify combine clean check-dudect
|
|
|
|
all: verify combine
|
|
|
|
# Build the cgo shim into a host-platform shared library, then link
|
|
# the C harness against it. The Go build emits both the .{dylib,so}
|
|
# and a generated header (libpulsar_verify.h) that we ignore — the
|
|
# C harness uses its own extern declarations because they're the
|
|
# same three symbols every time and editing two files instead of one
|
|
# is simpler than chasing cgo's header generation rules.
|
|
|
|
libpulsar_verify.$(SHLIB_EXT): verify_ct.go check-dudect
|
|
$(GOENV) $(GO) build -buildmode=c-shared \
|
|
-tags pulsar_verify_ct \
|
|
-o libpulsar_verify.$(SHLIB_EXT) \
|
|
./verify_ct.go
|
|
|
|
libpulsar_combine.$(SHLIB_EXT): combine_ct.go check-dudect
|
|
$(GOENV) $(GO) build -buildmode=c-shared \
|
|
-tags pulsar_combine_ct \
|
|
-o libpulsar_combine.$(SHLIB_EXT) \
|
|
./combine_ct.go
|
|
|
|
dudect_verify: dudect_verify.c libpulsar_verify.$(SHLIB_EXT) $(DUDECT_HDR)
|
|
$(CC) $(CFLAGS) -o dudect_verify dudect_verify.c \
|
|
-L. -lpulsar_verify $(LDFLAGS) $(LDLIBS) $(RPATH_FLAG)
|
|
|
|
dudect_combine: dudect_combine.c libpulsar_combine.$(SHLIB_EXT) $(DUDECT_HDR)
|
|
$(CC) $(CFLAGS) -o dudect_combine dudect_combine.c \
|
|
-L. -lpulsar_combine $(LDFLAGS) $(LDLIBS) $(RPATH_FLAG)
|
|
|
|
verify: dudect_verify
|
|
combine: dudect_combine
|
|
|
|
check-dudect:
|
|
@if [ ! -f $(DUDECT_HDR) ]; then \
|
|
echo "==> dudect.h missing — run ./fetch.sh"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
clean:
|
|
rm -f dudect_verify dudect_combine
|
|
rm -f libpulsar_verify.$(SHLIB_EXT) libpulsar_verify.h
|
|
rm -f libpulsar_combine.$(SHLIB_EXT) libpulsar_combine.h
|