diff --git a/arch-diagrams/README.md b/arch-diagrams/README.md index 6dbf7f7a1..1d9acb6b9 100644 --- a/arch-diagrams/README.md +++ b/arch-diagrams/README.md @@ -4,4 +4,7 @@ The architecture diagrams are generated with mscgen as follows ``` mscgen -T png -o cast-ballot.png -i cast-ballot.mscgen -``` \ No newline at end of file +``` + +If you want to make them all, run the makeDiagrams.sh script in the arch-diagrams directory. + diff --git a/arch-diagrams/cast-ballot.mscgen b/arch-diagrams/cast-ballot.mscgen index e84aa5f7b..358b4cf39 100644 --- a/arch-diagrams/cast-ballot.mscgen +++ b/arch-diagrams/cast-ballot.mscgen @@ -4,17 +4,21 @@ msc { vs [ label="Voter Station", textbgcolor="green" ]; vs rbox vs [ label="Print and review paper ballot"]; - vs rbox vs [ label="Encrypt ballot with ElecPK => Enc(Ballot)"]; - vs rbox vs [ label="Sign EncBallot with CAC (domain electronic) => SigCAC_E(Enc(Ballot))"]; - vs rbox vs [ label="Sign EncBallot with CAC (domain paper) => SigCAC_P(Enc(Ballot))"]; + vs rbox vs [ label="Encrypt ballot and sn with ElecPK => E(Ballot),E(sn)"]; + vs rbox vs [ label="Sign Enc values with CAC => SigCAC(E(Ballot),E(sn))"]; - vs rbox vs [ label="Print SigCAC_P(Enc(Ballot)) on mailing label"] ; + vs rbox vs [ label="Hash the CAC sig => Hash=H(CAC sig)"]; - vs=>>js [ label="Paper Ballot in Envelope with mailing label\nincluding SigCAC_P(Enc(Ballot))" ]; + vs rbox vs [ label="Sign for mailing label => SigVS(CAC ID, Election ID, Hash)"]; - vs=>s [ label="CAST BALLOT\nEnc(Ballot),\nSigCAC_E(Enc(Ballot)),\nCACCert" ]; - s rbox s [ label="verify CAC sig and cert on ballot" ]; + vs rbox vs [ label="Print VS sig on mailing label"] ; + + vs=>>js [ label="Paper Ballot in Envelope with mailing label\nincluding SigVS(CAC ID, Election ID, Hash)" ]; + + vs=>s [ label="CAST BALLOT\nSigCAC(E(Ballot),E(sn)),\nCACCert" ]; + + s rbox s [ label="verify CAC sig and cert" ]; s rbox s [ label="verify matches reg record for ballot style and election" ]; s=>vs [ label="BALLOT ID" ]; @@ -23,13 +27,13 @@ msc { js abox s [ label = "synchronization protocol based on last updated\nyield ballot IDs that need to be downloaded" ]; - js=>s [ label = "GET BALLOT\nBallotID,timestamp,\nSigJS(BallotID,timestamp),JSCert" ]; + js=>s [ label = "GET BALLOT\nSigJS(BallotID,timestamp),JSCert" ]; - s rbox s [ label="verify JS signature and cert" ]; + s rbox s [ label="verify timestamp freshness & JS sig & cert" ]; - s=>js [ label = "Enc(Ballot),\nSigCAC_E(Enc(Ballot)),\nCACCert" ]; + s=>js [ label = "SigCAC(E(Ballot),E(sn)),\nCACCert" ]; - js rbox js [ label="verify CAC sig and cert on ballot" ]; + js rbox js [ label="verify CAC sig and CACCert" ]; js rbox js [ label="verify matches reg record for ballot style and election" ]; -} \ No newline at end of file +} diff --git a/arch-diagrams/cast-ballot.png b/arch-diagrams/cast-ballot.png index fcb052dbf..752d8cca5 100644 Binary files a/arch-diagrams/cast-ballot.png and b/arch-diagrams/cast-ballot.png differ diff --git a/arch-diagrams/election-configuration.mscgen b/arch-diagrams/election-configuration.mscgen index 8f5201176..58edc52d9 100644 --- a/arch-diagrams/election-configuration.mscgen +++ b/arch-diagrams/election-configuration.mscgen @@ -7,9 +7,9 @@ msc { js rbox js [ label = "Bundle election definition and election public key" ]; js rbox js [ label = "Sign election definition & public key with JS key" ]; - js=>s [ label = "CREATE ELECTION\nElecDef, sigJS(ElecDef,ElecPK), JSCert" ]; + js=>s [ label = "CREATE ELECTION\nSigJS(ElecDef,ElecPK), JSCert" ]; - s rbox s [ label ="Verify election definition & public key"]; + s rbox s [ label ="Verify election definition & public key & JS sig"]; s rbox s [ label = "Verify JS cert"]; s=>js [ label = "Election ID" ]; @@ -18,12 +18,12 @@ msc { s abox vs [ label = "synchronization protocol based on last updated\nyield election IDs that need to be downloaded" ]; - vs=>s [ label="GET ELECTION\nElectionID,timestamp,\nSigVS(ElectionID,timestamp),VSCert" ]; + vs=>s [ label="GET ELECTION\n\nSigVS(ElectionID,timestamp),VSCert" ]; - s rbox s [ label = "Verify timestamp freshness and signature" ]; - s rbox s [ label = "Verify VS signature on election ID and timestamp" ]; - s rbox s [ label = "Verify VSCert" ]; + s rbox s [ label = "Verify timestamp freshness and VS sig" ]; + s rbox s [ label = "Verify VS cert" ]; - s=>vs [ label = "ElecDef, sigJS(ElecDef, ElecPK),\nJSCert" ]; - -} \ No newline at end of file + s=>vs [ label = "SigJS(ElecDef, ElecPK),\nJSCert" ]; + vs rbox vs [ label ="Verify election definition & public key & JS sigs"]; + vs rbox vs [ label = "Verify JS cert"]; +} diff --git a/arch-diagrams/election-configuration.png b/arch-diagrams/election-configuration.png index 81910091b..41b976d83 100644 Binary files a/arch-diagrams/election-configuration.png and b/arch-diagrams/election-configuration.png differ diff --git a/arch-diagrams/makeDiagrams.sh b/arch-diagrams/makeDiagrams.sh new file mode 100755 index 000000000..7820a1aee --- /dev/null +++ b/arch-diagrams/makeDiagrams.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for f in *.mscgen; do + mscgen -T png -o ${f%.mscgen}.png -i ${f} +done diff --git a/arch-diagrams/tabulate-ballots.mscgen b/arch-diagrams/tabulate-ballots.mscgen deleted file mode 100644 index d6f857c8f..000000000 --- a/arch-diagrams/tabulate-ballots.mscgen +++ /dev/null @@ -1,15 +0,0 @@ -msc { - js [ label="Jurisdiction Station", textbgcolor="red", textcolor="white" ], - s [ label="Server", textbgcolor="yellow" ], - vs [ label="Voter Station", textbgcolor="green" ]; - - js rbox js [ label="homomorphic tabulation of all ballots" ]; - js rbox js [ label="decryption of tally\nand proof generation" ]; - - js=>s [label="POST RESULTS\nTally,Proof(Tally),\nSigJS(Everything)"]; - - js rbox js [ label="mix ballots" ]; - js rbox js [ label="decrypt ballot IDs" ]; - - js=>s [label="POST MIXED BALLOTS\nmixed ballots, ballot IDs\nSigJS(Everything)"]; -} \ No newline at end of file diff --git a/arch-diagrams/tabulate-ballots.png b/arch-diagrams/tabulate-ballots.png deleted file mode 100644 index f6f704a59..000000000 Binary files a/arch-diagrams/tabulate-ballots.png and /dev/null differ diff --git a/arch-diagrams/voter-registration.mscgen b/arch-diagrams/voter-registration.mscgen index 45bb94d09..2dc8f4d17 100644 --- a/arch-diagrams/voter-registration.mscgen +++ b/arch-diagrams/voter-registration.mscgen @@ -6,9 +6,9 @@ msc { vs rbox vs [ label="Load user info from CAC cert" ]; vs rbox vs [ label="Prompt for user jurisdiction" ]; vs rbox vs [ label="Sign registration request with CAC" ]; - vs rbox vs [ label="VoterInfo=(name,dob,address,CAC ID)" ]; + vs rbox vs [ label="VoterInfo=(name,email,address,CAC ID)" ]; - vs=>s [ label="REGISTER\nVoterInfo,Jx,\nSigCAC(VoterInfo, Jx),\nCACCert" ]; + vs=>s [ label="REGISTER\nSigCAC(VoterInfo, Jx),\nCACCert" ]; s rbox s [ label="Verify CAC sig & cert" ]; @@ -19,24 +19,24 @@ msc { js abox s [ label="sync protocol based on Jx and last updated\nyields registration request IDs" ]; js=>s [ label="GET REGISTRATION\nREQUEST by ID" ]; - s=>js [ label="VoterInfo,\nSigCAC(VoterInfo, Jx),\nCACCert" ]; - + s=>js [ label="\nSigCAC(VoterInfo, Jx),CACCert" ]; + js rbox js [ label="Verify CAC sig & cert" ]; js rbox js [ label="check against VRDB, approve" ]; js rbox js [ label="assign ballot style" ]; - js=>s [ label="APPROVE REGISTRATION\nCAC ID, Elec ID, Ballot Style\nSigJS(CAC ID, Elec ID, Ballot Style), JSCert" ]; + js=>s [ label="APPROVE REGISTRATION\nSigJS(CAC ID, Elec ID, Ballot Style), JSCert" ]; - s rbox s [ label="Verify reg signature & jx cert" ] ; + s rbox s [ label="Verify JS sig & cert" ] ; |||; s abox vs [ label="sync protocol based on last updated\nyields registration IDs" ]; - vs=>s [ label="GET REGISTRATION by ID\nts,Reg ID,\nSigVS(ts, Reg ID),VSCert" ]; + vs=>s [ label="GET REGISTRATION by ID\nSigVS(timestamp, Reg ID),VSCert" ]; - s rbox s [ label="Verify VS sig" ]; + s rbox s [ label="Verify timestamp freshness, VS sig and cert" ]; - s=>vs [ label="CAC ID, Elec ID, Ballot Style\nSigJS(CAC ID, Elec ID, Ballot Style), JSCert" ]; + s=>vs [ label="\nSigJS(CAC ID, Elec ID, Ballot Style), JSCert" ]; - vs rbox vs [ label="Verify reg signature & jx cert" ] ; -} \ No newline at end of file + vs rbox vs [ label="Verify JS sig & cert" ] ; +} diff --git a/arch-diagrams/voter-registration.png b/arch-diagrams/voter-registration.png index 7bdb94dac..24421728d 100644 Binary files a/arch-diagrams/voter-registration.png and b/arch-diagrams/voter-registration.png differ