private Vote encrypt(byte[] msg, int i) { GroupMember key = new GroupMember(group.groupPow(g.member, intToByteArray(i))); GroupMember message = new GroupMember(group.groupMult(msg, group.groupPow(h.member, intToByteArray(i)))); Vote vote = new Vote(key, message); return vote; }
private GroupMember compute(GroupMember xi, GroupMember x, GroupMember g, int di, int ri) { return new GroupMember( group.groupMult( group.groupPow( group.groupMult(xi.member, group.completing(x.member)), intToByteArray(di)), group.groupPow(g.member, intToByteArray(ri)))); }
public mixnetUtils() { super(); this.rando = new Random(); this.group = new MyGroup(); this.history = new History(); this.groupSize = ByteArrayToInt(group.getOrder()); System.out.println(groupSize + "\n"); this.g = new GroupMember(group.getGenerator()); this.h = new GroupMember(group.groupPow(g.member, intToByteArray(42))); }