@@ -0,0 +1,1601 @@
+package de.uni.trier.infsec.protocols.simplevoting;%0A%0Aimport de.uni.trier.infsec.functionalities.pkenc.ideal.Decryptor;%0A%0A// Because we do not have signatues yet, the server itself generates credentials .%0A//%0A// Class VotingServer should use this class (VotingServerCore) and glue it to the %0A// networking. VotingServer should take messages from the network, %0A// decide %0A//%0Apublic class VotingServerCore %7B%0A%0A%09byte%5B%5D%5B%5D votersPK;  // a collection of eligible voters' public keys%0A%09Decryptor serverDecr; %0A%09%0A%09/*%0A%09 * The server is initialized with his decryptor and the list of (public keys of) %0A%09 * eligible voters.%0A%09 */%0A%09public VotingServerCore( byte%5B%5D%5B%5D votersPK, Decryptor serverDecr ) %7B%0A%09%09this.votersPK = votersPK;%0A%09%09this.serverDecr = serverDecr;%0A%09%7D%0A%09%0A%09/*%0A%09 * Registration: the server generates a credential for a given voter ('voter' is %0A%09 * the public key of a voter), if it is not generated yet.%0A%09 * The method returns an encrypted credential %0A%09 */%0A%09public byte%5B%5D registration( byte%5B%5D voter ) %7B%0A%09%09// - check whether voter is in the list votersPK%0A%09%09// - check whether a credential for this voter has not been given yet%0A%09%09// - if not, generate a new credential, store it somewhere, encrypt it and return%0A%09%09// - if the credential was generated earlier, return it%0A%09%09return null;%0A%09%7D%0A%09%0A%09/*%0A%09 * Takes a message 'ballot' checks its well-formedness and (if it is a valid ballot%0A%09 * of a voter who has not voted yet) collects it%0A%09 */%0A%09public void collectBallot( byte%5B%5D ballot ) %7B%0A%09%7D%0A%0A%09/*%0A%09 * Formats the results of the election as a message and returns it.%0A%09 */%0A%09public byte%5B%5D getResult() %7B%0A%09%09return null;%0A%09%7D%0A%09%0A%7D%0A

add a stub for VotingServerCore