added proto for audit

voting-booth-gui
Laura Radaelli 2017-07-17 16:01:15 +03:00
parent ce2fe0e8f2
commit 24d00a89fb
4 changed files with 18 additions and 7 deletions

View File

@ -0,0 +1 @@
sdk.dir=C\:/Users/Laura/AppData/Local/Android/sdk

View File

@ -81,6 +81,7 @@ message BallotSecrets {
EncryptionRandomness encryption_randomness = 2;
RandomnessGenerationProof proof = 3;
uint64 serial_number = 4; // Ballot serial number
}
message SignedBallotSecrets {

View File

@ -41,6 +41,11 @@ message ScannedBallot {
}
//Container for auditing messages
message ScannedAudit {
SignedBallotSecrets signed_ballot_secrets = 1;
}
// Container for error messages
message ScanError {
string msg = 1;
@ -49,12 +54,14 @@ message ScanError {
// Container for scanned data
message ScannedData {
uint64 serial = 1; // Serial number of the message
bytes scannerId = 2; // hash of the scannerPK
oneof data {
ScannedBallot ballot = 2;
ScanError error = 3;
ScannedBallot ballot = 3;
ScanError error = 4;
ScannedAudit audit_ballot = 5;
}
uint64 serial = 4; // Serial number of the message
bytes scannerId = 5; // hash of the scannerPK
}
message SignedScannedData {

View File

@ -59,8 +59,8 @@ public class FXWindowOutputDevice extends AsyncRunnableOutputDevice {
logger.debug("entered method doAudit");
VistaNavigator.printFXSeparator();
BallotSecrets ballotSecrets = command.getBallotSecrets();
printEncryptionRandomness(ballotSecrets.getEncryptionRandomness());
printRandomnessGenerationProof (ballotSecrets.getProof());
// printEncryptionRandomness(ballotSecrets.getEncryptionRandomness());
// printRandomnessGenerationProof (ballotSecrets.getProof());
printAuditBallot(ballotSecrets);
command.getCallback().onSuccess(null);
}
@ -146,7 +146,9 @@ public class FXWindowOutputDevice extends AsyncRunnableOutputDevice {
toPrint+="\n";
VistaNavigator.printFX(toPrint);
//generate the PollingStation.<protobuf> corresponding to [plaintext, randomness, Signed(plaintext, randomness)]
//generate the PollingStation.<protobuf> corresponding to [ballotID, plaintext, randomness, Signed(ballotID, plaintext, randomness)]
PollingStation.ScannedAudit scannedAudit = PollingStation.ScannedAudit.newBuilder()
.setSignedBallotSecrets(ballotSecrets);
// PollingStation.ScannedBallot scannedBallot = PollingStation.ScannedBallot.newBuilder()
// .setChannel(command.getChannelIdentifierByteString())
// .setSignedEncryptedBallot(command.getSignedEncryptedBallot())