mirror of
https://github.com/saymrwulf/swisspost-evoting-go-poc.git
synced 2026-11-17 08:56:11 +00:00
crypto.html: add cast-as-intended + transport-crypto slides
New Part IV½ shows the return-code cast-as-intended mechanism (E2 + plaintext- equality proof, CC exponentiation + joint decryption) and the transport-security layer (Ed25519/X25519, Ed25519 X.509 PKI, implemented in Rust) — so the deck's existing "cast-as-intended" claim is now backed by the actual construction. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
583d09a410
commit
3f45439dbe
1 changed files with 34 additions and 0 deletions
|
|
@ -1233,6 +1233,40 @@ r = <span class="red">833704513946265251405968611993787771762...</span>
|
|||
`
|
||||
},
|
||||
|
||||
// ============================================================
|
||||
// PART IV½: BEYOND THE TALLY
|
||||
// ============================================================
|
||||
{
|
||||
part: 'Part IV½: The Channels',
|
||||
title: 'Cast-as-Intended: Return Codes',
|
||||
html: `
|
||||
<p>How does a voter know their <em>encrypted</em> ballot really contains their choice, when malware could have swapped it? The return code -- a short code printed on their card -- must be computed <span class="em">from the submitted ciphertext</span>, not merely looked up.</p>
|
||||
<p>The voter sends the ballot <code>E1</code>, a second ciphertext <code>E2 = Enc(vote, returnCodesPK)</code>, and a <span class="em">plaintext-equality proof</span> that both encrypt the same vote:</p>
|
||||
<div class="math-block">
|
||||
Prove knowledge of (r₁, r₂) with<br>
|
||||
γ₁ = g<sup>r₁</sup>, γ₂ = g<sup>r₂</sup>, φ₁/φ₂ = h<sup>r₁</sup>/h'<sup>r₂</sup><br>
|
||||
(the shared plaintext <em>cancels</em> in φ₁/φ₂ — so equality is proven without revealing it)
|
||||
</div>
|
||||
<p>Each CC verifies this proof. Then the CCs exponentiate <code>E2</code> by their return-code keys and jointly decrypt, recovering <span class="em">vote<sup>Σk</sup></span> = the card's base <span class="em">prime<sub>sel</sub><sup>Σk</sup></span>, which maps to the short code returned to the voter.</p>
|
||||
<div class="insight-box">Because the equality proof binds <code>E2</code> to the tallied ballot <code>E1</code>, the code reflects the vote that is actually counted. Malware that alters the vote produces a code that <em>won't match the card</em> -- and it can't forge a matching one without the control components' secrets.</div>
|
||||
`
|
||||
},
|
||||
|
||||
{
|
||||
part: 'Part IV½: The Channels',
|
||||
title: 'Transport Security: EdDSA + ECDH',
|
||||
html: `
|
||||
<p>Everything so far is the <em>protocol</em>. But the parties -- setup component, four control components, electoral board, voting server, voters, verifier -- run on separate machines and must authenticate every message they exchange. That's a different cryptographic layer:</p>
|
||||
<div style="margin:12px 0;">
|
||||
<div style="margin:8px 0;"><span class="em">Ed25519</span> — every inter-party message is signed; the receiver verifies against the sender's certificate.</div>
|
||||
<div style="margin:8px 0;"><span class="em">X25519 (ECDH)</span> — confidential deliveries (voting cards) derive an AES-256-GCM session key from a Diffie-Hellman exchange.</div>
|
||||
<div style="margin:8px 0;"><span class="em">Ed25519 X.509 PKI</span> — a root CA issues each party an identity certificate; no RSA anywhere.</div>
|
||||
</div>
|
||||
<p>In this PoC these primitives are implemented in a small <span class="em">Rust</span> crate (<code>ed25519-dalek</code>, <code>x25519-dalek</code>) and called from Go over a C ABI -- a clean separation between the hand-built protocol math and the audited, constant-time transport primitives.</p>
|
||||
<div class="insight-box">Two independent trust arguments: the <em>protocol</em> proofs (Schnorr, Bayer-Groth) make the election publicly verifiable; the <em>transport</em> signatures make each message attributable to a specific party. Verifiability answers "is the tally correct?"; transport security answers "who said this?"</div>
|
||||
`
|
||||
},
|
||||
|
||||
// ============================================================
|
||||
// PART V: THE VERDICT
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Reference in a new issue