Files
zeekay e8f154a5b1 proofs/bls: Tier A EC theories + Lean bridges + Jasmin CT scaffolds
Adds the Tier A formal-artifact cluster for protocols/bls (Lux profile
of Boldyreva 2003 threshold BLS over BLS12-381). Mirrors luxfi/pulsar's
Tier A structure adapted to BLS's algebraically minimal threshold
construction (Lagrange + G2-linearity, no nonce sampling, no MtA, no ZK).

- proofs/easycrypt/BLS_Threshold_N1.ec — Class N1 byte-equality reduction
- proofs/easycrypt/BLS_Threshold_N1_Refinement.ec — partial_sign + aggregate
- proofs/easycrypt/BLS_Threshold_N4.ec — DKG public-key preservation
- proofs/easycrypt/lemmas/BLS_Threshold_CT.ec — constant-time obligations
- proofs/easycrypt/AXIOM-INVENTORY.md — honest enumeration
- proofs/lean-easycrypt-bridge.md — Lean↔EC bridge map
- jasmin/lib/ + jasmin/single-party/ + jasmin/threshold/ — Jasmin scaffolds

BLS-threshold has the smallest formal-methods surface of the three
classical threshold protocols. Admit budget: 1/1 (same one-line
group-identity admit as FROST_N4, CGGMP21_N4, Pulsar_N4).

Production deployment note: ships with trusted-dealer keygen only;
DKG gap disclosed in SUBMISSION-STATUS.md §3.3.
2026-05-19 08:34:32 -07:00

35 lines
1.1 KiB
Plaintext

// Single-party BLS12-381 Sign (IETF draft-irtf-cfrg-bls-signature-05).
//
// Algorithm:
// 1. H_m = hash_to_g2(msg, ciphersuite_tag)
// 2. sigma = sk * H_m // G2 scalar mul
// 3. Encode sigma per IETF draft §2.5 (compressed G2, 96 bytes).
//
// Ciphersuite: BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_.
//
// CT obligation: time + memory access independent of sk.
// Inherits from `cloudflare/circl` BLS12-381 (CT-documented upstream).
require "../lib/bls_params.jinc"
// sk: 32-byte BLS12-381 secret scalar (SECRET)
// pk: 48-byte compressed G1 public key (PUBLIC)
// msg: up to BLS_MAX_MSG bytes (PUBLIC)
// msg_len: actual message length (PUBLIC)
// sig: output 96-byte compressed G2 signature (PUBLIC)
//
// CT obligation: time + memory access independent of sk.
inline
fn bls12_381_sign(
reg ptr u8[BLS_SCALAR_BYTES] sk,
reg ptr u8[BLS_PK_BYTES] pk,
reg ptr u8[BLS_MAX_MSG] msg,
reg u64 msg_len,
reg ptr u8[BLS_SIG_BYTES] sig
) -> reg ptr u8[BLS_SIG_BYTES]
{
// TODO: jasmin implementation. Libjade does not yet provide
// BLS12-381. Lux inherits CT from circl's CT implementation.
return sig;
}