tzlil.gon 2016-04-08 21:48:08 +03:00
parent 3e1f59ec2b
commit d0951f8644
59 changed files with 1974 additions and 1750 deletions

View File

@ -2,8 +2,8 @@ package meerkat.bulletinboard;
import com.google.protobuf.Message;
import meerkat.comm.CommunicationException;
import meerkat.crypto.Digest;
import meerkat.crypto.concrete.SHA256Digest;
import meerkat.destributed_key_generation.Digest;
import meerkat.destributed_key_generation.concrete.SHA256Digest;
import meerkat.protobuf.BulletinBoardAPI.*;
import meerkat.rest.Constants;
import meerkat.rest.ProtobufMessageBodyReader;

View File

@ -2,8 +2,8 @@ package meerkat.bulletinboard;
import com.google.protobuf.ByteString;
import meerkat.comm.CommunicationException;
import meerkat.crypto.Digest;
import meerkat.crypto.concrete.SHA256Digest;
import meerkat.destributed_key_generation.Digest;
import meerkat.destributed_key_generation.concrete.SHA256Digest;
import meerkat.protobuf.BulletinBoardAPI.*;
import meerkat.protobuf.Voting;
import meerkat.protobuf.Voting.BulletinBoardClientParams;

View File

@ -6,8 +6,8 @@ import meerkat.bulletinboard.callbacks.GetRedundancyFutureCallback;
import meerkat.bulletinboard.callbacks.PostMessageFutureCallback;
import meerkat.bulletinboard.callbacks.ReadMessagesFutureCallback;
import meerkat.comm.CommunicationException;
import meerkat.crypto.Digest;
import meerkat.crypto.concrete.SHA256Digest;
import meerkat.destributed_key_generation.Digest;
import meerkat.destributed_key_generation.concrete.SHA256Digest;
import meerkat.protobuf.BulletinBoardAPI.*;
import meerkat.protobuf.Voting;

View File

@ -13,8 +13,8 @@ import meerkat.comm.CommunicationException;
import meerkat.protobuf.BulletinBoardAPI.*;
import meerkat.protobuf.Crypto.Signature;
import meerkat.protobuf.Crypto.SignatureVerificationKey;
import meerkat.crypto.Digest;
import meerkat.crypto.concrete.SHA256Digest;
import meerkat.destributed_key_generation.Digest;
import meerkat.destributed_key_generation.concrete.SHA256Digest;
import javax.sql.DataSource;

View File

@ -18,7 +18,7 @@ import java.util.Random;
import com.google.protobuf.ByteString;
import meerkat.comm.CommunicationException;
import meerkat.crypto.concrete.ECDSASignature;
import meerkat.destributed_key_generation.concrete.ECDSASignature;
import meerkat.protobuf.BulletinBoardAPI.BulletinBoardMessage;
import meerkat.protobuf.BulletinBoardAPI.FilterType;
import meerkat.protobuf.BulletinBoardAPI.MessageFilter;

View File

@ -1,11 +0,0 @@
package meerkat.crypto;
import java.util.Random;
/**
* Created by Tzlil on 4/8/2016.
*/
public interface KeyGeneration<T> {
T generateKey(Random random);
}

View File

@ -1,7 +0,0 @@
package meerkat.crypto;
/**
* Created by Tzlil on 4/8/2016.
*/
public class SecretSharing {
}

View File

@ -1,18 +0,0 @@
package meerkat.crypto.utilitis;
/**
* Created by Tzlil on 3/17/2016.
*/
public interface Arithmetic<T> {
/**
*
* @param a
* @param b
* @return
*/
T add(T a, T b);
T sub(T a, T b);
T mul(T a, T b);
T div(T a, T b);
}

View File

@ -1,36 +1,59 @@
package meerkat.crypto.concrete.distributed_key_generation.communication;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.communication;
import com.google.protobuf.Message;
import meerkat.crypto.utilitis.Channel;
import meerkat.destributed_key_generation.utilitis.Channel;
import meerkat.protobuf.DKGMessages;
/**
* Created by Tzlil on 2/14/2016.
*
* an implementation of ReceiverCallback
*/
public abstract class MailHandler implements Channel.ReceiverCallback{
/**
* fixed value for broadcasting
*/
public static final int BROADCAST = 0;
/**
* message handler
*/
private MessageHandler messageHandler;
/**
* constructor
* @param messageHandler
*/
public MailHandler(MessageHandler messageHandler){
this.messageHandler = messageHandler;
}
/**
* extract message from mail
* @param mail
* @return
*/
public abstract Message extractMessage(DKGMessages.Mail mail);
/**
* is this mail was received by broadcast channel
* @param mail
* @return mail user destination == BROADCAST
*/
public boolean isBroadcast(DKGMessages.Mail mail){
return mail.getDestination() == BROADCAST;
}
@Override
public void receiveMail(DKGMessages.Mail mail){
Message message = extractMessage(mail);
if (message == null)
return;
switch (mail.getType()) {
case SHARE:
messageHandler.handleSecretMessage(mail.getSender(), isBroadcast(mail),message);
messageHandler.handleShareMessage(mail.getSender(), isBroadcast(mail),message);
break;
case COMMITMENT:
messageHandler.handleCommitmentMessage(mail.getSender(), isBroadcast(mail),message);

View File

@ -1,15 +1,39 @@
package meerkat.crypto.concrete.distributed_key_generation.communication;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.communication;
import com.google.protobuf.Message;
/**
* Created by Tzlil on 2/14/2016.
* an interface for handling received messages
*/
public interface MessageHandler {
void handleSecretMessage(int sender, boolean isBroadcast, Message message);
/**
* handle share message
*/
void handleShareMessage(int sender, boolean isBroadcast, Message message);
/**
* handle commitment message
*/
void handleCommitmentMessage(int sender, boolean isBroadcast, Message message);
/**
* handle complaint message
*/
void handleComplaintMessage(int sender, boolean isBroadcast, Message message);
/**
* handle done message
*/
void handleDoneMessage(int sender, boolean isBroadcast, Message message);
/**
* handle answer message
*/
void handleAnswerMessage(int sender, boolean isBroadcast, Message message);
/**
* handle abort message
*/
void handleAbortMessage(int sender, boolean isBroadcast, Message message);
}

View File

@ -1,17 +1,26 @@
package meerkat.crypto.concrete.distributed_key_generation.gjkr_secure_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.Message;
import meerkat.crypto.concrete.distributed_key_generation.communication.MessageHandler;
import meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MessageHandler;
import meerkat.protobuf.DKGMessages;
/**
* Created by Tzlil on 2/29/2016.
* an extension of MailHandler matching gjkr protocl
*/
public class MailHandler extends meerkat.crypto.concrete.distributed_key_generation.communication.MailHandler {
public class MailHandler extends meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MailHandler {
/**
* flag that indicants whether the
* current run achieved stage 4 of the protocol or not
*/
private boolean isStage4;
/**
* constructor
* @param messageHandler
*/
public MailHandler(MessageHandler messageHandler) {
super(messageHandler);
this.isStage4 = false;
@ -52,10 +61,10 @@ public class MailHandler extends meerkat.crypto.concrete.distributed_key_generat
}
}
public boolean isStage4() {
return isStage4;
}
/**
* setter
* @param stage4
*/
public void setStage4(boolean stage4) {
isStage4 = stage4;
}

View File

@ -1,6 +1,6 @@
package meerkat.crypto.concrete.distributed_key_generation.gjkr_secure_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import java.util.ArrayList;
import java.util.HashSet;
@ -13,7 +13,7 @@ import java.util.Set;
* contains all relevant information on specific party during
* the run of the safe protocol
*/
public class Party<T> extends meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol.Party<T> {
public class Party<T> extends meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Party<T> {
public Polynomial.Point shareT;
public boolean ysDoneFlag;
public ArrayList<T> verifiableValues;

View File

@ -1,7 +1,7 @@
package meerkat.crypto.concrete.distributed_key_generation.gjkr_secure_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol;
import meerkat.crypto.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import com.google.protobuf.ByteString;
import meerkat.protobuf.DKGMessages;
import org.factcenter.qilin.primitives.Group;
@ -17,7 +17,7 @@ import java.util.Set;
* TODO: comments
* TODO: put Channel (ChannelImpl) in constructor
*/
public class Protocol<T> extends meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol.Protocol<T> {
public class Protocol<T> extends meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Protocol<T> {
private VerifiableSecretSharing<T> maskingShares;
private final T h;

View File

@ -1,10 +1,10 @@
package meerkat.crypto.concrete.distributed_key_generation.gjkr_secure_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.crypto.utilitis.concrete.Fp;
import meerkat.crypto.utilitis.Channel;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.crypto.concrete.secret_shring.shamir.SecretSharing;
import meerkat.destributed_key_generation.utilitis.Arithmetic;
import meerkat.destributed_key_generation.utilitis.concrete.Fp;
import meerkat.destributed_key_generation.utilitis.Channel;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.SecretSharing;
import com.google.protobuf.Message;
import meerkat.protobuf.DKGMessages;
@ -13,25 +13,48 @@ import java.util.ArrayList;
/**
* Created by Tzlil on 3/16/2016.
*
* implementation of gjkr protocol user.
*
* this protocol extends joint feldman protocol by splitting the protocol to commitment stage (stages 1,2,3)
* and reviling stage (stage 4).
*
* as in joint feldman, each party in QUAL has his own share of the generated random key.
* this key can be recover by any subset of QUAL of size at least t + 1.
*/
public class User<T> extends meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol.User<T> {
public class User<T> extends meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.User<T> {
/**
* All parties participating in key generation.
* parties[id-1] has my info.
*/
protected Party<T>[] parties;
protected final Protocol<T> sdkg;
private Arithmetic<BigInteger> arithmetic;
private boolean isStage4;
/**
* gjkr secure protocol object
*/
protected final Protocol<T> sdkg;
/**
* message handler
*/
private MessageHandler messageHandler;
/**
* constructor
* @param sdkg gjkr protocol object
* @param channel channel object
*/
public User(Protocol<T> sdkg, Channel channel) {
super(sdkg, channel);
this.sdkg = sdkg;
this.parties = sdkg.getParties();
this.arithmetic = new Fp(sdkg.getQ());
this.isStage4 = false;
}
@Override
protected void registerReceiverCallback(){
this.mailHandler = new MailHandler(new MessageHandler());
this.messageHandler = new MessageHandler();
this.mailHandler = new MailHandler(messageHandler);
this.channel.registerReceiverCallback(mailHandler);
}
/**
@ -84,7 +107,7 @@ public class User<T> extends meerkat.crypto.concrete.distributed_key_generation.
try {
parties[i - 1].wait();
} catch (InterruptedException e) {
//do nothing
if (stop) return;
}
}
}
@ -102,7 +125,7 @@ public class User<T> extends meerkat.crypto.concrete.distributed_key_generation.
try {
parties[i - 1].wait();
} catch (InterruptedException e) {
//do nothing
if (stop) return;
}
}
}
@ -122,13 +145,13 @@ public class User<T> extends meerkat.crypto.concrete.distributed_key_generation.
try {
parties[i - 1].wait();
} catch (InterruptedException e) {
//do nothing
if (stop) return;
}
}
}
}
}
Arithmetic<BigInteger> arithmetic = new Fp(sdkg.getQ());
// restore necessary information
for (int i = 0; i < n ; i++) {
if(parties[i].recoverSharesSet.isEmpty()){
@ -152,10 +175,10 @@ public class User<T> extends meerkat.crypto.concrete.distributed_key_generation.
}
/**
* notifies mail handler that stage 4 was started
* notifies mail handler and message handler that stage 4 was started
*/
protected void setStage4(){
this.isStage4 = true;
this.messageHandler.isStage4 = true;
((MailHandler)this.mailHandler).setStage4(true);
}
@ -163,11 +186,13 @@ public class User<T> extends meerkat.crypto.concrete.distributed_key_generation.
protected void stage4() {
setStage4();
resolveQualifyingPublicKey();
if (stop) return;
super.stage4();
}
private class MessageHandler extends meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol.User.MessageHandler {
private class MessageHandler extends meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.User.MessageHandler {
boolean isStage4;
/**
* as in super, with extension to double secret message
*/
@ -184,7 +209,7 @@ public class User<T> extends meerkat.crypto.concrete.distributed_key_generation.
* as in super, with extension to double secret message
*/
@Override
public void handleSecretMessage(int sender, boolean isBroadcast, Message message) {
public void handleShareMessage(int sender, boolean isBroadcast, Message message) {
DKGMessages.DoubleShareMessage doubleSecretMessage = (DKGMessages.DoubleShareMessage)message;
if (isValidSecretMessage(sender,isBroadcast,doubleSecretMessage)) {
int i = doubleSecretMessage.getI();
@ -234,10 +259,10 @@ public class User<T> extends meerkat.crypto.concrete.distributed_key_generation.
synchronized (parties[i - 1]) {
if (!isStage4) {
if (sdkg.isValidShare(secret, secretT, parties[j - 1].verifiableValues, i)) {
parties[i - 1].complaints[j - 1] = meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol.Protocol.ComplaintState.NonDisqualified;
parties[i - 1].complaints[j - 1] = meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Protocol.ComplaintState.NonDisqualified;
} else {
parties[i - 1].complaints[j - 1] = meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol.Protocol.ComplaintState.Disqualified;
parties[i - 1].complaints[j - 1] = meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Protocol.ComplaintState.Disqualified;
}
if (j == id) {
parties[i - 1].share = secret;

View File

@ -1,15 +1,20 @@
package meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.Message;
import meerkat.crypto.concrete.distributed_key_generation.communication.MessageHandler;
import meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MessageHandler;
import meerkat.protobuf.DKGMessages;
/**
* Created by Tzlil on 2/29/2016.
* an extension of MailHandler matching joint feldman protocol
*/
public class MailHandler extends meerkat.crypto.concrete.distributed_key_generation.communication.MailHandler {
public class MailHandler extends meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MailHandler {
/**
* constructor
* @param messageHandler
*/
public MailHandler(MessageHandler messageHandler) {
super(messageHandler);
}

View File

@ -1,6 +1,6 @@
package meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import java.util.ArrayList;
import java.util.Arrays;
@ -19,6 +19,12 @@ public class Party<T> {
public Protocol.ComplaintState[] complaints;
public boolean aborted;
/**
*
* @param id party identifier - 1 <= id <= n
* @param n number of parties in current run protocol
* @param t protocol's threshold
*/
public Party(int id, int n, int t) {
this.id = id;
this.share = null;

View File

@ -1,8 +1,8 @@
package meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol;
import meerkat.crypto.utilitis.Channel;
import meerkat.crypto.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.utilitis.Channel;
import meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import com.google.protobuf.ByteString;
import meerkat.protobuf.DKGMessages;
import org.factcenter.qilin.primitives.Group;
@ -57,7 +57,6 @@ public class Protocol<T> extends VerifiableSecretSharing<T> {
*/
protected Channel channel;
/**
* Encode/Decode group elements
*/
@ -76,9 +75,10 @@ public class Protocol<T> extends VerifiableSecretSharing<T> {
* @param g a generator of cyclic group of order q.
* the generated group is a subgroup of the given group.
* it must be chosen such that computing discrete logarithms is hard in this group.
* @param encoder Encode/Decode group elements (of type T) to/from byte array
*/
public Protocol(int t, int n, BigInteger zi, Random random, BigInteger q, T g
, Group<T> group, int id, ByteEncoder<T> byteEncoder) {
, Group<T> group, int id, ByteEncoder<T> encoder) {
super(t, n, zi, random, q, g,group);
this.id = id;
this.parties = new Party[n];
@ -86,7 +86,7 @@ public class Protocol<T> extends VerifiableSecretSharing<T> {
this.parties[i - 1] = new Party(i,n,t);
}
this.parties[id - 1].share = getShare(id);
this.encoder = byteEncoder;
this.encoder = encoder;
}
/**

View File

@ -1,7 +1,7 @@
package meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol;
import meerkat.crypto.utilitis.Channel;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.utilitis.Channel;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import com.google.protobuf.ByteString;
import com.google.protobuf.Message;
import meerkat.protobuf.DKGMessages;
@ -13,27 +13,91 @@ import java.util.Set;
/**
* Created by Tzlil on 3/14/2016.
* TODO: Comments
* TODO: Replace polling with monitors/wait/notify (remember synchronization)
*
* implementation of joint feldman protocol user.
*
* according to the protocol, each user run feldman verifiable secret sharing
* as a dealer.
*
* by the end of run(), each party in QUAL has his own share of the generated random key.
* this key can be recover by any subset of QUAL of size at least t + 1.
*/
public class User<T> implements Runnable{
/**
* joint feldman protocol object
*/
protected final Protocol<T> dkg;
/**
* a generator of cyclic group of order q.
* the generated group is a subgroup of the given group.
* it must be chosen such that computing discrete logarithms is hard in this group.
*/
protected final T g;
/**
* cyclic group contains g.
*/
protected final Group<T> group;
protected final int n;
protected final int t;
/**
* user id
*/
protected final int id;
protected meerkat.crypto.concrete.distributed_key_generation.communication.MailHandler mailHandler;
protected final Channel channel;
/**
* threshold
*/
protected final int t;
/**
* number of shares
*/
protected final int n;
/**
* mail handler registered to channel as ReceiverCallback
*/
protected meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MailHandler mailHandler;
/**
* channel object
*/
protected final Channel channel; //
/**
* All parties participating in key generation.
* parties[id-1] has my info.
*/
protected final Party[] parties;
protected Set<Integer> QUAL; // set of all non-disqualified parties
protected Polynomial.Point share; // final share of the secrete
protected ArrayList<T> commitments; // public verification values
protected T y; // final public value
/**
* set of all non-disqualified parties
*/
protected Set<Integer> QUAL;
/**
* my own share of the generated random key.
*/
protected Polynomial.Point share;
/**
* public verification values
*/
protected ArrayList<T> commitments;
/**
* public value,
* y = g ^ key
*/
protected T y;
/**
* constructor
* @param dkg joint feldman protocol object
* @param channel channel object
*/
public User(Protocol<T> dkg, Channel channel) {
this.dkg = dkg;
@ -74,20 +138,23 @@ public class User<T> implements Runnable{
}
/**
* wait for all shares and commitments will arrive from other parties
*/
protected void waitUntilStageOneCompleted(){
// all parties send their share or aborted
// wait for parties' share
for (int i = 0 ; i < n ; i++){
synchronized (parties[i]) {
while (parties[i].share == null && !parties[i].aborted) {
try {
parties[i].wait();
} catch (InterruptedException e) {
//do nothing
if (stop) return;
}
}
}
}
// all parties broadcast their commitments or aborted
// wait for parties' commitments
for (int i = 0 ; i < n ; i++){
for (int k = 0 ; k <= t ; k++) {
synchronized (parties[i]) {
@ -95,7 +162,7 @@ public class User<T> implements Runnable{
try {
parties[i].wait();
} catch (InterruptedException e) {
//do nothing
if (stop) return;
}
}
}
@ -117,15 +184,17 @@ public class User<T> implements Runnable{
}
/**
* wait until all other parties done complaining by receiving done message
*/
protected void waitUntilStageTwoCompleted(){
// all parties done or aborted
for (int i = 0 ; i < n ; i++){
synchronized (parties[i]) {
while (!parties[i].doneFlag && !parties[i].aborted) {
try {
parties[i].wait();
} catch (InterruptedException e) {
//do nothing
if (stop) return;
}
}
}
@ -150,7 +219,7 @@ public class User<T> implements Runnable{
try {
parties[i].wait();
} catch (InterruptedException e) {
//do nothing
if (stop) return;
}
}
}
@ -173,18 +242,38 @@ public class User<T> implements Runnable{
@Override
public void run() {
this.runThread = Thread.currentThread();
stage1();
waitUntilStageOneCompleted();
if (stop) return;
stage2();
waitUntilStageTwoCompleted();
if (stop) return;
stage3();
if (stop) return;
stage4();
}
/**
* current thread in the main loop
*/
protected Thread runThread;
/**
* flag indicates if there was request to stop the current run of the protocol
*/
protected boolean stop = false;
/**
* Request the current run loop to exit gracefully
*/
public void stop() {
try {
stop = true;
runThread.interrupt();
}catch (Exception e){
//do nothing
}
}
@ -260,12 +349,19 @@ public class User<T> implements Runnable{
return QUAL;
}
public class MessageHandler implements meerkat.crypto.concrete.distributed_key_generation.communication.MessageHandler{
public MessageHandler(){
/**
* getter
* @return channel
*/
public Channel getChannel() {
return channel;
}
/**
* an implementation of MessageHandler
*/
public class MessageHandler implements meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MessageHandler{
/**
* commitment message is valid if:
* 1. it was received in broadcast chanel
@ -314,7 +410,7 @@ public class User<T> implements Runnable{
* saves the secret
*/
@Override
public void handleSecretMessage(int sender, boolean isBroadcast, Message message) {
public void handleShareMessage(int sender, boolean isBroadcast, Message message) {
DKGMessages.ShareMessage secretMessage = (DKGMessages.ShareMessage) message;
if(isValidSecretMessage(sender,isBroadcast,secretMessage)) {
int i = secretMessage.getI();

View File

@ -1,7 +1,7 @@
package meerkat.crypto.concrete.secret_shring.feldman_verifiable;
package meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.crypto.concrete.secret_shring.shamir.SecretSharing;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.SecretSharing;
import org.factcenter.qilin.primitives.Group;
import java.util.ArrayList;
@ -17,12 +17,22 @@ import java.util.Random;
*
*/
public class VerifiableSecretSharing<T> extends SecretSharing {
/**
* cyclic group contains g.
*/
protected final Group<T> group;
protected final T g; // public generator of group
/**
* a generator of cyclic group of order q.
* the generated group is a subgroup of the given group.
* it must be chosen such that computing discrete logarithms is hard in this group.
*/
protected final T g;
/**
* commitments to polynomial coefficients.
* commitments[k] = g ^ coefficients[k] (group operation)
*/
protected final ArrayList<T> commitmentsArrayList;
/**
* constructor
* @param q a large prime.

View File

@ -1,6 +1,6 @@
package meerkat.crypto.concrete.secret_shring.shamir;
package meerkat.destributed_key_generation.concrete.secret_shring.shamir;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.destributed_key_generation.utilitis.Arithmetic;
import java.math.BigInteger;

View File

@ -1,6 +1,6 @@
package meerkat.crypto.concrete.secret_shring.shamir;
package meerkat.destributed_key_generation.concrete.secret_shring.shamir;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.destributed_key_generation.utilitis.Arithmetic;
import java.math.BigInteger;
import java.util.Arrays;
@ -100,7 +100,7 @@ public class Polynomial implements Comparable<Polynomial> {
/**
* @param other
* @return new meerkat.crypto.concrete.secret_shring.shamir.Polynomial of degree max(this degree,other degree) s.t for all x
* @return new meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial of degree max(this degree,other degree) s.t for all x
* new.evaluate(x) = this.evaluate(x) + other.evaluate(x)
*/
public Polynomial add(Polynomial other){

View File

@ -1,7 +1,7 @@
package meerkat.crypto.concrete.secret_shring.shamir;
package meerkat.destributed_key_generation.concrete.secret_shring.shamir;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.crypto.utilitis.concrete.Fp;
import meerkat.destributed_key_generation.utilitis.Arithmetic;
import meerkat.destributed_key_generation.utilitis.concrete.Fp;
import java.math.BigInteger;
import java.util.Random;
@ -11,9 +11,21 @@ import java.util.Random;
* an implementation of Shamire's secret sharing scheme
*/
public class SecretSharing{
/**
* threshold
*/
protected final int t;
/**
* number of shares
*/
protected final int n;
/**
* a large prime
*/
protected final BigInteger q;
/**
* random polynomial of degree s.t polynomial.evaluate(0) = secret
*/
protected final Polynomial polynomial;
/**

View File

@ -0,0 +1,38 @@
package meerkat.destributed_key_generation.utilitis;
/**
* Created by Tzlil on 3/17/2016.
* defines the properties of the traditional operations : add,sub,mul,div
* between two objects of type T
*/
public interface Arithmetic<T> {
/**
* addition
* @param a
* @param b
* @return a + b
*/
T add(T a, T b);
/**
* subtraction
* @param a
* @param b
* @return a - b
*/
T sub(T a, T b);
/**
* multiplication
* @param a
* @param b
* @return a * b
*/
T mul(T a, T b);
/**
* division
* @param a
* @param b
* @return a / b
*/
T div(T a, T b);
}

View File

@ -1,10 +1,10 @@
package meerkat.crypto.utilitis;
package meerkat.destributed_key_generation.utilitis;
import com.google.protobuf.Message;
import meerkat.protobuf.DKGMessages;
/**
* A generic commmunication channel that supports point-to-point and broadcast operation
* A generic communication channel that supports point-to-point and broadcast operation
*/
public interface Channel {
@ -12,8 +12,20 @@ public interface Channel {
public void receiveMail(DKGMessages.Mail mail);
}
/**
* sends a private message
* @param destUser destination user's identifier
* @param type message type
* @param msg message
*/
public void sendMessage(int destUser, DKGMessages.Mail.Type type, Message msg);
/**
* broadcasts a message to all parties (including the sender)
* @param type message type
* @param msg message
*/
public void broadcastMessage(DKGMessages.Mail.Type type, Message msg);
/**

View File

@ -1,17 +1,22 @@
package meerkat.crypto.utilitis.concrete;
package meerkat.destributed_key_generation.utilitis.concrete;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.destributed_key_generation.utilitis.Arithmetic;
import org.factcenter.qilin.primitives.concrete.Zpstar;
import java.math.BigInteger;
/**
* Created by Tzlil on 3/17/2016.
* an implementation of Arithmetic<BigInteger> over prime fields: integers modulo p
*/
public class Fp implements Arithmetic<BigInteger> {
public final BigInteger p;
private final Zpstar zp;
/**
* constructor
* @param p prime
*/
public Fp(BigInteger p) {
this.p = p;
this.zp = new Zpstar(p);

View File

@ -1,7 +1,6 @@
package meerkat.crypto.concrete.distributed_key_generation.gjkr_secure_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol;
import meerkat.crypto.concrete.distributed_key_generation.gjkr_secure_protocol.*;
import meerkat.crypto.utilitis.Channel;
import meerkat.destributed_key_generation.utilitis.Channel;
import java.math.BigInteger;
import java.util.Random;

View File

@ -1,15 +1,15 @@
package meerkat.crypto.concrete.distributed_key_generation.gjkr_secure_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol;
import Utils.ChannelImpl;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.crypto.utilitis.concrete.Fp;
import meerkat.crypto.utilitis.Channel;
import meerkat.crypto.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing;
import meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol.DKGMaliciousUser;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.crypto.concrete.secret_shring.shamir.SecretSharing;
import Utils.BigIntegerByteEncoder;
import Utils.GenerateRandomPrime;
import meerkat.destributed_key_generation.utilitis.ChannelImpl;
import meerkat.destributed_key_generation.utilitis.Arithmetic;
import meerkat.destributed_key_generation.utilitis.concrete.Fp;
import meerkat.destributed_key_generation.utilitis.Channel;
import meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing;
import meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.DKGMaliciousUser;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.SecretSharing;
import meerkat.destributed_key_generation.utilitis.BigIntegerByteEncoder;
import meerkat.destributed_key_generation.utilitis.GenerateRandomPrime;
import org.factcenter.qilin.primitives.Group;
import org.factcenter.qilin.primitives.concrete.Zpstar;
import org.factcenter.qilin.util.ByteEncoder;
@ -27,25 +27,16 @@ import java.util.Set;
*/
public class SDKGTest {
int tests = 1;
int tests = 10;
BigInteger p = GenerateRandomPrime.SafePrime100Bits;
BigInteger q = p.subtract(BigInteger.ONE).divide(BigInteger.valueOf(2));
Group<BigInteger> group = new Zpstar(p);
Arithmetic<BigInteger> arithmetic = new Fp(q);
int t = 9;
int n = 20;
Testable[] testables;
@Before
public void settings(){
testables = new Testable[tests];
for (int i = 0; i < tests; i++){
testables[i] = new Testable(new Random());
}
}
public void oneTest(int test) throws Exception {
Testable testable = testables[test];
public void oneTest(Testable testable) throws Exception {
for (int i = 0; i < testable.threads.length ; i++){
testable.threads[i].start();
}
@ -83,13 +74,23 @@ public class SDKGTest {
assert (calculatedSecret.equals(testable.secret));
}
@Test
public void test() throws Exception {
for (int i = 0; i < tests; i++){
oneTest(i);
public void stopReceivers(Testable testable){
ChannelImpl channel;
for (int i = 0 ; i < testable.sdkgs.length ; i++){
channel = (ChannelImpl)testable.sdkgs[i].getChannel();
channel.stop();
}
}
@Test
public void test() throws Exception {
Testable testable;
for (int i = 0; i < tests; i++) {
testable = new Testable(new Random());
oneTest(testable);
stopReceivers(testable);
}
}
class Testable{
Set<Integer> valids;
Set<Integer> QUAL;

View File

@ -1,6 +1,6 @@
package meerkat.crypto.concrete.distributed_key_generation.gjkr_secure_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol;
import meerkat.crypto.utilitis.Channel;
import meerkat.destributed_key_generation.utilitis.Channel;
import meerkat.protobuf.DKGMessages;
/**

View File

@ -1,6 +1,6 @@
package meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol;
import meerkat.crypto.utilitis.Channel;
import meerkat.destributed_key_generation.utilitis.Channel;
import java.math.BigInteger;
import java.util.*;

View File

@ -1,15 +1,14 @@
package meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol;
import Utils.ChannelImpl;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.crypto.utilitis.concrete.Fp;
import meerkat.crypto.utilitis.Channel;
import meerkat.crypto.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.crypto.concrete.secret_shring.shamir.SecretSharing;
import Utils.BigIntegerByteEncoder;
import Utils.GenerateRandomPrime;
import meerkat.protobuf.Crypto;
import meerkat.destributed_key_generation.utilitis.ChannelImpl;
import meerkat.destributed_key_generation.utilitis.Arithmetic;
import meerkat.destributed_key_generation.utilitis.concrete.Fp;
import meerkat.destributed_key_generation.utilitis.Channel;
import meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.SecretSharing;
import meerkat.destributed_key_generation.utilitis.BigIntegerByteEncoder;
import meerkat.destributed_key_generation.utilitis.GenerateRandomPrime;
import org.factcenter.qilin.primitives.Group;
import org.factcenter.qilin.primitives.concrete.Zpstar;
import org.factcenter.qilin.util.ByteEncoder;
@ -27,7 +26,7 @@ import java.util.Set;
*/
public class DKGTest {
int tests = 1;
int tests = 10;
BigInteger p = GenerateRandomPrime.SafePrime100Bits;
BigInteger q = p.subtract(BigInteger.ONE).divide(BigInteger.valueOf(2));
Group<BigInteger> group = new Zpstar(p);
@ -35,18 +34,7 @@ public class DKGTest {
int t = 9;
int n = 20;
Testable[] testables;
@Before
public void settings(){
testables = new Testable[tests];
for (int i = 0; i < tests; i++){
testables[i] = new Testable(new Random());
}
}
public void oneTest(int test) throws Exception {
Testable testable = testables[test];
public void oneTest(Testable testable) throws Exception {
for (int i = 0; i < testable.threads.length ; i++){
testable.threads[i].start();
}
@ -84,10 +72,21 @@ public class DKGTest {
assert (calculatedSecret.equals(testable.secret));
}
public void stopReceivers(Testable testable){
ChannelImpl channel;
for (int i = 0 ; i < testable.dkgs.length ; i++){
channel = (ChannelImpl)testable.dkgs[i].getChannel();
channel.stop();
}
}
@Test
public void test() throws Exception {
Testable testable;
for (int i = 0; i < tests; i++){
oneTest(i);
testable = new Testable(new Random());
oneTest(testable);
stopReceivers(testable);
}
}
@ -117,13 +116,13 @@ public class DKGTest {
BigInteger s;
Protocol<BigInteger> dkg;
this.secret = BigInteger.ZERO;
Channel channel;
ChannelImpl channel;
ByteEncoder<BigInteger> byteEncoder = new BigIntegerByteEncoder();
while (!ids.isEmpty()) {
id = ids.remove(random.nextInt(ids.size()));
channel = new ChannelImpl(id,n);
s = randomIntModQ(random);
dkg = new meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol.Protocol<BigInteger>(t, n, s, random, q, g, group, id,byteEncoder);
dkg = new meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Protocol<BigInteger>(t, n, s, random, q, g, group, id,byteEncoder);
dkgs[id - 1] = randomDKGUser(id,channel,dkg,random);
threads[id - 1] = new Thread(dkgs[id - 1]);
if(QUAL.contains(id)){

View File

@ -1,6 +1,6 @@
package meerkat.crypto.concrete.distributed_key_generation.joint_feldman_protocol;
package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol;
import meerkat.crypto.utilitis.Channel;
import meerkat.destributed_key_generation.utilitis.Channel;
import meerkat.protobuf.DKGMessages;
/**

View File

@ -1,6 +1,6 @@
package meerkat.crypto.concrete.secret_shring.feldman_verifiable;
package meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import org.factcenter.qilin.primitives.Group;
import org.factcenter.qilin.primitives.concrete.Zpstar;
import org.junit.Before;

View File

@ -1,7 +1,7 @@
package meerkat.crypto.concrete.secret_shring.shamir.PolynomialTests;
import Utils.GenerateRandomPolynomial;
import Utils.Z;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
package meerkat.destributed_key_generation.concrete.secret_shring.shamir.PolynomialTests;
import meerkat.destributed_key_generation.utilitis.GenerateRandomPolynomial;
import meerkat.destributed_key_generation.utilitis.Z;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import org.junit.Before;
import org.junit.Test;

View File

@ -1,10 +1,10 @@
package meerkat.crypto.concrete.secret_shring.shamir.PolynomialTests;
package meerkat.destributed_key_generation.concrete.secret_shring.shamir.PolynomialTests;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.crypto.utilitis.concrete.Fp;
import Utils.GenerateRandomPolynomial;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import Utils.GenerateRandomPrime;
import meerkat.destributed_key_generation.utilitis.Arithmetic;
import meerkat.destributed_key_generation.utilitis.concrete.Fp;
import meerkat.destributed_key_generation.utilitis.GenerateRandomPolynomial;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.utilitis.GenerateRandomPrime;
import org.junit.Before;
import org.junit.Test;

View File

@ -1,8 +1,8 @@
package meerkat.crypto.concrete.secret_shring.shamir.PolynomialTests;
package meerkat.destributed_key_generation.concrete.secret_shring.shamir.PolynomialTests;
import Utils.GenerateRandomPolynomial;
import Utils.Z;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.utilitis.GenerateRandomPolynomial;
import meerkat.destributed_key_generation.utilitis.Z;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import org.junit.Before;
import org.junit.Test;

View File

@ -1,8 +1,8 @@
package meerkat.crypto.concrete.secret_shring.shamir.PolynomialTests;
package meerkat.destributed_key_generation.concrete.secret_shring.shamir.PolynomialTests;
import Utils.GenerateRandomPolynomial;
import Utils.Z;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.utilitis.GenerateRandomPolynomial;
import meerkat.destributed_key_generation.utilitis.Z;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import org.junit.Before;
import org.junit.Test;

View File

@ -1,7 +1,7 @@
package meerkat.crypto.concrete.secret_shring.shamir;
package meerkat.destributed_key_generation.concrete.secret_shring.shamir;
import meerkat.crypto.utilitis.concrete.Fp;
import Utils.GenerateRandomPrime;
import meerkat.destributed_key_generation.utilitis.concrete.Fp;
import meerkat.destributed_key_generation.utilitis.GenerateRandomPrime;
import org.factcenter.qilin.primitives.CyclicGroup;
import org.factcenter.qilin.primitives.concrete.Zn;
import org.junit.Before;

View File

@ -1,4 +1,4 @@
package Utils;
package meerkat.destributed_key_generation.utilitis;
import java.math.BigInteger;

View File

@ -1,7 +1,6 @@
package Utils;
package meerkat.destributed_key_generation.utilitis;
import com.google.protobuf.Message;
import meerkat.crypto.utilitis.Channel;
import meerkat.protobuf.DKGMessages;
import java.util.Queue;
@ -76,13 +75,17 @@ public class ChannelImpl implements Channel {
}
}
@Override
public void registerReceiverCallback(final ReceiverCallback callback) {
public void stop(){
try{
receiverThread.interrupt();
}catch (Exception e){
//do nothing
}
}
@Override
public void registerReceiverCallback(final ReceiverCallback callback) {
stop();
receiverThread = new Thread(new Runnable() {
@Override
public void run() {

View File

@ -1,8 +1,7 @@
package Utils;
package meerkat.destributed_key_generation.utilitis;
import meerkat.crypto.concrete.secret_shring.shamir.Polynomial;
import meerkat.crypto.utilitis.Arithmetic;
import meerkat.crypto.utilitis.concrete.Fp;
import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial;
import meerkat.destributed_key_generation.utilitis.concrete.Fp;
import java.math.BigInteger;
import java.util.Random;

View File

@ -1,6 +1,4 @@
package Utils;
import org.junit.Test;
package meerkat.destributed_key_generation.utilitis;
import java.math.BigInteger;
import java.util.Random;

View File

@ -1,6 +1,4 @@
package Utils;
import meerkat.crypto.utilitis.Arithmetic;
package meerkat.destributed_key_generation.utilitis;
import java.math.BigInteger;

View File

@ -1,4 +1,4 @@
package meerkat.crypto;
package meerkat.destributed_key_generation;
import com.google.protobuf.Message;

View File

@ -1,4 +1,4 @@
package meerkat.crypto;
package meerkat.destributed_key_generation;
import com.google.protobuf.ByteString;
import com.google.protobuf.Message;

View File

@ -1,4 +1,4 @@
package meerkat.crypto;
package meerkat.destributed_key_generation;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.Message;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import com.google.protobuf.ByteString;
import com.google.protobuf.Message;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import java.io.IOException;
import java.io.InputStream;
@ -16,7 +16,7 @@ import org.slf4j.LoggerFactory;
import com.google.protobuf.Message;
import meerkat.crypto.DigitalSignature;
import meerkat.destributed_key_generation.DigitalSignature;
import meerkat.protobuf.Crypto.Signature;
import javax.security.auth.callback.Callback;

View File

@ -1,9 +1,9 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.Message;
import meerkat.crypto.Encryption;
import meerkat.destributed_key_generation.Encryption;
import meerkat.protobuf.ConcreteCrypto;
import meerkat.protobuf.Crypto;
import org.bouncycastle.crypto.params.AsymmetricKeyParameter;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.slf4j.Logger;
@ -8,7 +8,7 @@ import java.security.Provider;
import java.security.Security;
/**
* A class that performs required crypto setup
* A class that performs required destributed_key_generation setup
*/
public class GlobalCryptoSetup {
final static Logger logger = LoggerFactory.getLogger(GlobalCryptoSetup.class);

View File

@ -1,8 +1,8 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import com.google.protobuf.ByteString;
import com.google.protobuf.Message;
import meerkat.crypto.Digest;
import meerkat.destributed_key_generation.Digest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.mixnet;
package meerkat.destributed_key_generation.mixnet;
import meerkat.protobuf.Crypto;
import meerkat.protobuf.Mixing;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.mixnet;
package meerkat.destributed_key_generation.mixnet;
import meerkat.protobuf.Crypto;
import meerkat.protobuf.Mixing;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.mixnet;
package meerkat.destributed_key_generation.mixnet;
import java.util.List;
import static meerkat.protobuf.Voting.*;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.mixnet;
package meerkat.destributed_key_generation.mixnet;
/**
* Created by talm on 25/10/15.

View File

@ -1,4 +1,4 @@
package meerkat.crypto.mixnet;
package meerkat.destributed_key_generation.mixnet;
/**
* Created by talm on 25/10/15.

View File

@ -1,9 +1,8 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import com.google.protobuf.ByteString;
import com.google.protobuf.Message;
import meerkat.crypto.concrete.ECDSASignature;
import meerkat.protobuf.Crypto;
import org.junit.Test;

View File

@ -1,9 +1,8 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import com.google.protobuf.ByteString;
import com.google.protobuf.Message;
import meerkat.protobuf.Crypto;
import meerkat.crypto.concrete.ECDSASignature;
import org.junit.Before;
import org.junit.Test;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import meerkat.protobuf.ConcreteCrypto;
import meerkat.protobuf.Crypto;

View File

@ -1,4 +1,4 @@
package meerkat.crypto.concrete;
package meerkat.destributed_key_generation.concrete;
import com.google.protobuf.ByteString;
import com.google.protobuf.GeneratedMessage;