Merge remote-tracking branch 'origin/signature-implementation' into Bulletin_Board_Server_phase_1

Bulletin_Board_Server_phase_1
Arbel Deutsch Peled 2015-11-17 20:21:40 +02:00
commit 15859391a1
5 changed files with 23 additions and 20 deletions

View File

@ -7,6 +7,14 @@ import static meerkat.protobuf.Crypto.*;
* Created by talm on 11/2/15. * Created by talm on 11/2/15.
*/ */
public interface Encryption { public interface Encryption {
Message encrypt(Message plaintext, EncryptionRandomness rnd); /**
* Encrypt the serialized form of a message plaintext.
* @param plaintext
* @param rnd
* @return
*/
RerandomizableEncryptedMessage encrypt(Message plaintext, EncryptionRandomness rnd); // TODO: type of exception; throws
RerandomizableEncryptedMessage rerandomize(RerandomizableEncryptedMessage msg, EncryptionRandomness rnd);
} }

View File

@ -1,8 +1,7 @@
package meerkat.crypto.mixnet; package meerkat.crypto.mixnet;
import meerkat.voting.EncryptedBallot;
import java.util.List; import java.util.List;
import static meerkat.protobuf.Voting.*;
/** /**
* Created by talm on 25/10/15. * Created by talm on 25/10/15.

View File

@ -1,16 +0,0 @@
package meerkat.voting;
import com.google.protobuf.Message;
/**
* Created by talm on 25/10/15.
*/
public interface EncryptedBallot {
/**
* Return the public portion of the ballot (this can be published to the bulletin board without violating privacy).
* @return
*/
Message getPublicPortion();
}

View File

@ -41,4 +41,10 @@ message EncryptionRandomness {
// A proof that randomness is correctly generated // A proof that randomness is correctly generated
message RandomnessGenerationProof { message RandomnessGenerationProof {
bytes data = 1; bytes data = 1;
} }
// An encrypted message (rerandomizable)
message RerandomizableEncryptedMessage {
bytes data = 1;
}

View File

@ -80,6 +80,12 @@ message PlaintextBallot {
repeated BallotAnswer answers = 2; repeated BallotAnswer answers = 2;
} }
message EncryptedBallot {
uint64 serialNumber = 1; // Ballot serial number
RerandomizableEncryptedMessage data = 2;
}
message BallotSecrets { message BallotSecrets {
PlaintextBallot plaintext_ballot = 1; PlaintextBallot plaintext_ballot = 1;