1 package civitas.common;
2
3 import java.util.Map;
4
5 import civitas.crypto.ciphertext.ElGamalCiphertext;
6 import civitas.crypto.ciphertextlist.ElGamalCiphertextListTestData;
7
8 public interface VoteChoiceTestData extends ElGamalCiphertextListTestData {
9 Map<VoteChoice, ElGamalCiphertext> REENCRYPTED_CHOICE_MAP = ConstructTestData.constructTestData(
10 CHOICES,
11 choice -> new ElGamalCiphertext(
12 CIPHERTEXT_LIST
13 .get(choice.ordinal())
14 .getA()
15 .modMultiply(BIGINT_G.modPow(FACTOR_E, BIGINT_P), BIGINT_P),
16 CIPHERTEXT_LIST
17 .get(choice.ordinal())
18 .getB()
19 .modMultiply(PUBKEY_E.modPow(FACTOR_E, BIGINT_P), BIGINT_P)));
20 }