swisspost-evoting-go-poc/pkg/party
saymrwulf dbf00153f8 Voting cards: distributed return-code generation + confidential delivery
Setup now generates each voter's return-code card by collecting shares from all
four CCs over the bus (the GenEncLongCodeShares exchange) and distributes cards
and the mapping table over CONFIDENTIAL channels.

- codes.go: deriveReturnCodeKey is the SINGLE key-derivation function used by a
  CC both when contributing to card assembly and (later) at vote-time extraction
  — structurally preventing the setup/extraction derivation mismatch (F1). Each
  CC computes its choice/confirm shares from its private return-code secret;
  only the shares (validated as G_q members on decode) cross the bus.
- RunCards assembles cards, registers mapping-table entries, and delivers cards
  to voters + the mapping table to the server via sendConfidential (X25519 ECDH
  session key + AES-256-GCM, then Ed25519-signed) — exercising the secure
  channel in the ceremony, not just in tests.
- returncodes: MappingTable Export/ImportMappingTable for transport.

Test confirms every voter receives its card confidentially with the right code
count and the server receives the full mapping table + public election keys.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:15:38 +02:00
..
ceremony.go Voting cards: distributed return-code generation + confidential delivery 2026-07-06 15:15:38 +02:00
ceremony_test.go Add party layer scaffolding: PKI bootstrap + signed handshake 2026-07-06 15:07:31 +02:00
codes.go Voting cards: distributed return-code generation + confidential delivery 2026-07-06 15:15:38 +02:00
codes_test.go Voting cards: distributed return-code generation + confidential delivery 2026-07-06 15:15:38 +02:00
parties.go Voting cards: distributed return-code generation + confidential delivery 2026-07-06 15:15:38 +02:00
phases.go Voting cards: distributed return-code generation + confidential delivery 2026-07-06 15:15:38 +02:00
setup.go Distributed key generation over signed transport + validated wire layer 2026-07-06 15:11:34 +02:00
setup_test.go Distributed key generation over signed transport + validated wire layer 2026-07-06 15:11:34 +02:00
state.go Add party layer scaffolding: PKI bootstrap + signed handshake 2026-07-06 15:07:31 +02:00
transcript.go Add party layer scaffolding: PKI bootstrap + signed handshake 2026-07-06 15:07:31 +02:00
wire.go Distributed key generation over signed transport + validated wire layer 2026-07-06 15:11:34 +02:00