Skip to content

Commit

Permalink
Added make script.
Browse files Browse the repository at this point in the history
  • Loading branch information
vteague authored and benadida committed Mar 15, 2024
1 parent 388fccf commit b7512ca
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 48 deletions.
5 changes: 4 additions & 1 deletion arch-diagrams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ The architecture diagrams are generated with mscgen as follows

```
mscgen -T png -o cast-ballot.png -i cast-ballot.mscgen
```
```

If you want to make them all, run the makeDiagrams.sh script in the arch-diagrams directory.

28 changes: 16 additions & 12 deletions arch-diagrams/cast-ballot.mscgen
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];
Expand All @@ -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" ];

}
}
Binary file modified arch-diagrams/cast-ballot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions arch-diagrams/election-configuration.mscgen
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];
Expand All @@ -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" ];

}
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"];
}
Binary file modified arch-diagrams/election-configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions arch-diagrams/makeDiagrams.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

for f in *.mscgen; do
mscgen -T png -o ${f%.mscgen}.png -i ${f}
done
15 changes: 0 additions & 15 deletions arch-diagrams/tabulate-ballots.mscgen

This file was deleted.

Binary file removed arch-diagrams/tabulate-ballots.png
Binary file not shown.
22 changes: 11 additions & 11 deletions arch-diagrams/voter-registration.mscgen
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];

Expand All @@ -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" ] ;
}
vs rbox vs [ label="Verify JS sig & cert" ] ;
}
Binary file modified arch-diagrams/voter-registration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b7512ca

Please sign in to comment.