Files
pulsar/ct/jasmin-ct-libjade.md
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

4.9 KiB

Libjade jasmin-ct status (Pulsar issue #2)

Status

The Pulsar high-assurance gate runs jasmin-ct (Jasmin's constant-time analyzer) in two modes:

  • Blocking on the threshold layer (round1.jazz, round2.jazz, combine.jazz). These ARE clean and the per-push CI exits non-zero if any finding appears.
  • Advisory on the libjade ML-DSA-65 sign source (jasmin/ml-dsa-65/libjade/oldsrc-should-delete/crypto_sign/ dilithium/dilithium3/amd64/ref/sign.jazz). This is currently allowed-failure under tracked issue #2 because libjade upstream has one specific public/secret annotation gap that jasmin-ct flags. Promoting this to blocking requires either: fixing it upstream and bumping the libjade pin; or carrying a Pulsar-side patch.

The exact finding

$ jasmin-ct --infer -I "Jade=<libjade-root>" \
    jasmin/ml-dsa-65/libjade/oldsrc-should-delete/crypto_sign/dilithium/dilithium3/amd64/ref/sign.jazz

"jasmin/ml-dsa-65/libjade/oldsrc-should-delete/crypto_sign/dilithium/common/amd64/keygen_end.jinc",
line 125 (23-36):
constant type checker: random_zeta_p has type secret it needs to be public

The flagged site is the call:

// keygen_end.jinc, line 124-125 (inline fn keygen):
pk, sk = keygen_inner(random_zeta_p);

where random_zeta_p is the 32-byte uniformly random seed that ML-DSA-65 keygen consumes to expand into (rho, K, tr, s1, s2, t0).

Why jasmin-ct flags this

The Jasmin constant-time analyzer's --infer mode propagates secret-vs-public types through procedure calls. random_zeta_p is annotated as secret (correctly — it's the seed of all secret-key material). But keygen_inner returns pk (a PUBLIC value — the ML-DSA public key) along with sk (the secret key material). The signature of keygen_inner does not separate the public vs. secret outputs cleanly: jasmin-ct sees random_zeta_p → pk as a secret-tainted flow into a public output, which is the canonical CT violation pattern.

In reality this is NOT a CT violation:

  • The flow random_zeta_p → pk IS legitimate — pk is derived from rho (a public byte string itself derived from random_zeta_p via SHAKE expansion). pk is intended to be public.
  • The flow random_zeta_p → sk is the secret flow we DO want jasmin-ct to track.

The fix is an annotation: tell jasmin-ct that the pk output of keygen_inner is a declassification point for the rho component of random_zeta_p. This is what #[declassify = "pk"] or an explicit public output annotation in the libjade source would do.

What needs to happen

Option A (upstream): patch libjade

Submit a PR to libjade adding the right CT annotations to keygen_inner's output binding. The annotation needs to make explicit:

  • sk stays secret.
  • pk is public (post-declassification of the rho fragment derived from random_zeta_p via SHAKE).

This is the right long-term move — it benefits every libjade consumer, not just Pulsar.

Option B (carry patch): Pulsar-side override

Apply a thin patch to the vendored libjade copy that adds the annotation; revendor the patched libjade under jasmin/ml-dsa-65/libjade/. Document the diff in this file. This is a workaround if upstream is slow.

Option C (blind declassify): NOT acceptable

Adding a #declassify on random_zeta_p itself would silence jasmin-ct but would ALSO let real secret-material leakage flow into public outputs without being flagged. Do not do this.

What we DO NOT promise

Until #2 is closed (upstream PR or carry-patch), the libjade sign side does NOT carry a blocking constant-time guarantee from jasmin-ct. The high-assurance gate reports it as advisory. Constant-time properties of libjade sign are, in practice, covered by:

  • libjade's own upstream review (the code IS CT — the issue is just the annotation).
  • Manual review of the Pulsar-side calling conventions (the threshold wrapper passes secret-bearing inputs only at documented secret-ports).
  • Dudect smoke runs (ct/dudect/).

None of these are equivalent to a clean jasmin-ct gate. They are upper-bound on the empirical risk; lower-bounding via mechanical analysis requires #2's closure.

How to verify the finding

cd ~/work/lux/pulsar
eval $(opam env --switch=jasmin)
jasmin-ct --infer \
    -I "Jade=$PWD/jasmin/ml-dsa-65/libjade/oldsrc-should-delete" \
    jasmin/ml-dsa-65/libjade/oldsrc-should-delete/crypto_sign/dilithium/dilithium3/amd64/ref/sign.jazz

Should print the random_zeta_p has type secret it needs to be public message; no other findings.

Cross-references

  • Pulsar issue tracker: #2.
  • Upstream libjade source: https://github.com/formosa-crypto/libjade (this repo vendors the snapshot under jasmin/ml-dsa-65/libjade/).
  • The --infer mode docs: https://github.com/jasmin-lang/jasmin (search for "constant-time inference").
  • Related Pulsar threshold-side jasmin-ct (which is CLEAN and BLOCKING): scripts/check-high-assurance.sh § "jasmin-ct (BLOCKING — threshold layer)".