From 1ec02173e7859a68f25e205888dc8ddafba0ddc9 Mon Sep 17 00:00:00 2001 From: Tal Moran Date: Mon, 11 Apr 2016 19:48:36 +0300 Subject: [PATCH] package renaming and protobuf moves --- .../bulletinboard/BulletinClientWorker.java | 4 ++-- .../SimpleBulletinBoardClient.java | 4 ++-- .../ThreadedBulletinBoardClient.java | 4 ++-- .../sqlserver/BulletinBoardSQLServer.java | 4 ++-- .../GenericBulletinBoardServerTest.java | 2 +- .../build.gradle | 0 .../meerkat/crypto/dkg/comm}/MailHandler.java | 4 ++-- .../crypto/dkg/comm}/MessageHandler.java | 2 +- .../crypto/dkg/feldman}/MailHandler.java | 6 ++--- .../meerkat/crypto/dkg/feldman}/Party.java | 4 ++-- .../meerkat/crypto/dkg/feldman}/Protocol.java | 8 +++---- .../meerkat/crypto/dkg/feldman}/User.java | 10 ++++---- .../meerkat/crypto/dkg/gjkr}/MailHandler.java | 6 ++--- .../java/meerkat/crypto/dkg/gjkr}/Party.java | 6 ++--- .../meerkat/crypto/dkg/gjkr}/Protocol.java | 8 +++---- .../java/meerkat/crypto/dkg/gjkr}/User.java | 20 ++++++++-------- .../feldman}/VerifiableSecretSharing.java | 6 ++--- .../shamir/LagrangePolynomial.java | 4 ++-- .../secretsharing}/shamir/Polynomial.java | 6 ++--- .../secretsharing}/shamir/SecretSharing.java | 6 ++--- .../meerkat/crypto/utils}/Arithmetic.java | 2 +- .../java/meerkat/crypto/utils}/Channel.java | 2 +- .../meerkat/crypto/utils}/concrete/Fp.java | 4 ++-- .../src/main/proto/meerkat/DKGMessages.proto | 6 ++--- .../crypto/dkg/feldman}/DKGMaliciousUser.java | 6 ++--- .../meerkat/crypto/dkg/feldman}/DKGTest.java | 23 +++++++++---------- .../crypto/dkg/feldman}/DKGUserImplAbort.java | 4 ++-- .../dkg/gjkr}/SDKGMaliciousUserImpl.java | 6 ++--- .../meerkat/crypto/dkg/gjkr}/SDKGTest.java | 23 +++++++++---------- .../crypto/dkg/gjkr}/SDKGUserImplAbort.java | 4 ++-- .../feldman}/VerifiableSecretSharingTest.java | 4 ++-- .../shamir/PolynomialTests/AddTest.java | 8 +++---- .../PolynomialTests/InterpolationTest.java | 12 +++++----- .../PolynomialTests/MulByConstTest.java | 8 +++---- .../shamir/PolynomialTests/MulTest.java | 8 +++---- .../shamir/SecretSharingTest.java | 6 ++--- .../crypto/utils}/BigIntegerByteEncoder.java | 2 +- .../meerkat/crypto/utils}/ChannelImpl.java | 2 +- .../utils}/GenerateRandomPolynomial.java | 6 ++--- .../crypto/utils}/GenerateRandomPrime.java | 2 +- .../test/java/meerkat/crypto/utils}/Z.java | 2 +- .../Digest.java | 2 +- .../DigitalSignature.java | 2 +- .../Encryption.java | 2 +- .../concrete/ECDSADeterministicSignature.java | 2 +- .../concrete/ECDSASignature.java | 4 ++-- .../concrete/ECElGamalEncryption.java | 4 ++-- .../concrete/GlobalCryptoSetup.java | 4 ++-- .../concrete/SHA256Digest.java | 4 ++-- .../mixnet/Mix2ZeroKnowledgeProver.java | 2 +- .../mixnet/Mix2ZeroKnowledgeVerifier.java | 2 +- .../mixnet/Mixer.java | 2 +- .../mixnet/Trustee.java | 2 +- .../mixnet/Verifier.java | 2 +- .../ECDSADeterministicSignatureTest.java | 2 +- .../concrete/ECDSASignatureTest.java | 2 +- .../concrete/ECElGamalEncryptionTest.java | 2 +- .../concrete/ECElGamalUtils.java | 2 +- settings.gradle | 2 +- 59 files changed, 148 insertions(+), 150 deletions(-) rename {destributed-key-generation => distributed-key-generation}/build.gradle (100%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/communication => distributed-key-generation/src/main/java/meerkat/crypto/dkg/comm}/MailHandler.java (93%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/communication => distributed-key-generation/src/main/java/meerkat/crypto/dkg/comm}/MessageHandler.java (90%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol => distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman}/MailHandler.java (82%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol => distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman}/Party.java (84%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol => distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman}/Protocol.java (96%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol => distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman}/User.java (96%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol => distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr}/MailHandler.java (85%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol => distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr}/Party.java (68%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol => distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr}/Protocol.java (92%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol => distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr}/User.java (92%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/feldman_verifiable => distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/feldman}/VerifiableSecretSharing.java (93%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring => distributed-key-generation/src/main/java/meerkat/crypto/secretsharing}/shamir/LagrangePolynomial.java (94%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring => distributed-key-generation/src/main/java/meerkat/crypto/secretsharing}/shamir/Polynomial.java (95%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring => distributed-key-generation/src/main/java/meerkat/crypto/secretsharing}/shamir/SecretSharing.java (93%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis => distributed-key-generation/src/main/java/meerkat/crypto/utils}/Arithmetic.java (92%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis => distributed-key-generation/src/main/java/meerkat/crypto/utils}/Channel.java (95%) rename {destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis => distributed-key-generation/src/main/java/meerkat/crypto/utils}/concrete/Fp.java (88%) rename {meerkat-common => distributed-key-generation}/src/main/proto/meerkat/DKGMessages.proto (85%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol => distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman}/DKGMaliciousUser.java (89%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol => distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman}/DKGTest.java (85%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol => distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman}/DKGUserImplAbort.java (88%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol => distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr}/SDKGMaliciousUserImpl.java (87%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol => distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr}/SDKGTest.java (86%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol => distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr}/SDKGUserImplAbort.java (89%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/feldman_verifiable => distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/feldman}/VerifiableSecretSharingTest.java (93%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring => distributed-key-generation/src/test/java/meerkat/crypto/secretsharing}/shamir/PolynomialTests/AddTest.java (78%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring => distributed-key-generation/src/test/java/meerkat/crypto/secretsharing}/shamir/PolynomialTests/InterpolationTest.java (80%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring => distributed-key-generation/src/test/java/meerkat/crypto/secretsharing}/shamir/PolynomialTests/MulByConstTest.java (77%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring => distributed-key-generation/src/test/java/meerkat/crypto/secretsharing}/shamir/PolynomialTests/MulTest.java (78%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring => distributed-key-generation/src/test/java/meerkat/crypto/secretsharing}/shamir/SecretSharingTest.java (90%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis => distributed-key-generation/src/test/java/meerkat/crypto/utils}/BigIntegerByteEncoder.java (91%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis => distributed-key-generation/src/test/java/meerkat/crypto/utils}/ChannelImpl.java (98%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis => distributed-key-generation/src/test/java/meerkat/crypto/utils}/GenerateRandomPolynomial.java (82%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis => distributed-key-generation/src/test/java/meerkat/crypto/utils}/GenerateRandomPrime.java (94%) rename {destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis => distributed-key-generation/src/test/java/meerkat/crypto/utils}/Z.java (91%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/Digest.java (94%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/DigitalSignature.java (98%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/Encryption.java (96%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/concrete/ECDSADeterministicSignature.java (98%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/concrete/ECDSASignature.java (99%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/concrete/ECElGamalEncryption.java (98%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/concrete/GlobalCryptoSetup.java (92%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/concrete/SHA256Digest.java (95%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/mixnet/Mix2ZeroKnowledgeProver.java (93%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/mixnet/Mix2ZeroKnowledgeVerifier.java (92%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/mixnet/Mixer.java (79%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/mixnet/Trustee.java (56%) rename meerkat-common/src/main/java/meerkat/{destributed_key_generation => crypto}/mixnet/Verifier.java (56%) rename meerkat-common/src/test/java/meerkat/{destributed_key_generation => crypto}/concrete/ECDSADeterministicSignatureTest.java (96%) rename meerkat-common/src/test/java/meerkat/{destributed_key_generation => crypto}/concrete/ECDSASignatureTest.java (99%) rename meerkat-common/src/test/java/meerkat/{destributed_key_generation => crypto}/concrete/ECElGamalEncryptionTest.java (98%) rename meerkat-common/src/test/java/meerkat/{destributed_key_generation => crypto}/concrete/ECElGamalUtils.java (98%) diff --git a/bulletin-board-client/src/main/java/meerkat/bulletinboard/BulletinClientWorker.java b/bulletin-board-client/src/main/java/meerkat/bulletinboard/BulletinClientWorker.java index b519eb4..1d0d741 100644 --- a/bulletin-board-client/src/main/java/meerkat/bulletinboard/BulletinClientWorker.java +++ b/bulletin-board-client/src/main/java/meerkat/bulletinboard/BulletinClientWorker.java @@ -2,8 +2,8 @@ package meerkat.bulletinboard; import com.google.protobuf.Message; import meerkat.comm.CommunicationException; -import meerkat.destributed_key_generation.Digest; -import meerkat.destributed_key_generation.concrete.SHA256Digest; +import meerkat.crypto.Digest; +import meerkat.crypto.concrete.SHA256Digest; import meerkat.protobuf.BulletinBoardAPI.*; import meerkat.rest.Constants; import meerkat.rest.ProtobufMessageBodyReader; diff --git a/bulletin-board-client/src/main/java/meerkat/bulletinboard/SimpleBulletinBoardClient.java b/bulletin-board-client/src/main/java/meerkat/bulletinboard/SimpleBulletinBoardClient.java index b12649e..9d3f24a 100644 --- a/bulletin-board-client/src/main/java/meerkat/bulletinboard/SimpleBulletinBoardClient.java +++ b/bulletin-board-client/src/main/java/meerkat/bulletinboard/SimpleBulletinBoardClient.java @@ -2,8 +2,8 @@ package meerkat.bulletinboard; import com.google.protobuf.ByteString; import meerkat.comm.CommunicationException; -import meerkat.destributed_key_generation.Digest; -import meerkat.destributed_key_generation.concrete.SHA256Digest; +import meerkat.crypto.Digest; +import meerkat.crypto.concrete.SHA256Digest; import meerkat.protobuf.BulletinBoardAPI.*; import meerkat.protobuf.Voting; import meerkat.protobuf.Voting.BulletinBoardClientParams; diff --git a/bulletin-board-client/src/main/java/meerkat/bulletinboard/ThreadedBulletinBoardClient.java b/bulletin-board-client/src/main/java/meerkat/bulletinboard/ThreadedBulletinBoardClient.java index d3957cf..81513f8 100644 --- a/bulletin-board-client/src/main/java/meerkat/bulletinboard/ThreadedBulletinBoardClient.java +++ b/bulletin-board-client/src/main/java/meerkat/bulletinboard/ThreadedBulletinBoardClient.java @@ -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.destributed_key_generation.Digest; -import meerkat.destributed_key_generation.concrete.SHA256Digest; +import meerkat.crypto.Digest; +import meerkat.crypto.concrete.SHA256Digest; import meerkat.protobuf.BulletinBoardAPI.*; import meerkat.protobuf.Voting; diff --git a/bulletin-board-server/src/main/java/meerkat/bulletinboard/sqlserver/BulletinBoardSQLServer.java b/bulletin-board-server/src/main/java/meerkat/bulletinboard/sqlserver/BulletinBoardSQLServer.java index 2c0a8d7..8402e55 100644 --- a/bulletin-board-server/src/main/java/meerkat/bulletinboard/sqlserver/BulletinBoardSQLServer.java +++ b/bulletin-board-server/src/main/java/meerkat/bulletinboard/sqlserver/BulletinBoardSQLServer.java @@ -13,8 +13,8 @@ import meerkat.comm.CommunicationException; import meerkat.protobuf.BulletinBoardAPI.*; import meerkat.protobuf.Crypto.Signature; import meerkat.protobuf.Crypto.SignatureVerificationKey; -import meerkat.destributed_key_generation.Digest; -import meerkat.destributed_key_generation.concrete.SHA256Digest; +import meerkat.crypto.Digest; +import meerkat.crypto.concrete.SHA256Digest; import javax.sql.DataSource; diff --git a/bulletin-board-server/src/test/java/meerkat/bulletinboard/GenericBulletinBoardServerTest.java b/bulletin-board-server/src/test/java/meerkat/bulletinboard/GenericBulletinBoardServerTest.java index fa4c60b..1c5e3c5 100644 --- a/bulletin-board-server/src/test/java/meerkat/bulletinboard/GenericBulletinBoardServerTest.java +++ b/bulletin-board-server/src/test/java/meerkat/bulletinboard/GenericBulletinBoardServerTest.java @@ -18,7 +18,7 @@ import java.util.Random; import com.google.protobuf.ByteString; import meerkat.comm.CommunicationException; -import meerkat.destributed_key_generation.concrete.ECDSASignature; +import meerkat.crypto.concrete.ECDSASignature; import meerkat.protobuf.BulletinBoardAPI.BulletinBoardMessage; import meerkat.protobuf.BulletinBoardAPI.FilterType; import meerkat.protobuf.BulletinBoardAPI.MessageFilter; diff --git a/destributed-key-generation/build.gradle b/distributed-key-generation/build.gradle similarity index 100% rename from destributed-key-generation/build.gradle rename to distributed-key-generation/build.gradle diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/communication/MailHandler.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/comm/MailHandler.java similarity index 93% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/communication/MailHandler.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/comm/MailHandler.java index cc3b08b..3c2052e 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/communication/MailHandler.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/comm/MailHandler.java @@ -1,7 +1,7 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.communication; +package meerkat.crypto.dkg.comm; import com.google.protobuf.Message; -import meerkat.destributed_key_generation.utilitis.Channel; +import meerkat.crypto.utils.Channel; import meerkat.protobuf.DKGMessages; /** diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/communication/MessageHandler.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/comm/MessageHandler.java similarity index 90% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/communication/MessageHandler.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/comm/MessageHandler.java index 0fa7a46..c33e99a 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/communication/MessageHandler.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/comm/MessageHandler.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.communication; +package meerkat.crypto.dkg.comm; import com.google.protobuf.Message; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/MailHandler.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/MailHandler.java similarity index 82% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/MailHandler.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/MailHandler.java index a2d82b2..d2ca352 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/MailHandler.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/MailHandler.java @@ -1,15 +1,15 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol; +package meerkat.crypto.dkg.feldman; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; -import meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MessageHandler; +import meerkat.crypto.dkg.comm.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.destributed_key_generation.concrete.distributed_key_generation.communication.MailHandler { +public class MailHandler extends meerkat.crypto.dkg.comm.MailHandler { /** * constructor diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/Party.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/Party.java similarity index 84% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/Party.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/Party.java index 90ee829..1b2cbe8 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/Party.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/Party.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol; +package meerkat.crypto.dkg.feldman; -import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial; +import meerkat.crypto.secretsharing.shamir.Polynomial; import java.util.ArrayList; import java.util.Arrays; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/Protocol.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/Protocol.java similarity index 96% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/Protocol.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/Protocol.java index e3cddbd..616015a 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/Protocol.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/Protocol.java @@ -1,8 +1,8 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol; +package meerkat.crypto.dkg.feldman; -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.crypto.utils.Channel; +import meerkat.crypto.secretsharing.feldman.VerifiableSecretSharing; +import meerkat.crypto.secretsharing.shamir.Polynomial; import com.google.protobuf.ByteString; import meerkat.protobuf.DKGMessages; import org.factcenter.qilin.primitives.Group; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/User.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/User.java similarity index 96% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/User.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/User.java index 84f5bb8..eee1b85 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/User.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/feldman/User.java @@ -1,7 +1,7 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol; +package meerkat.crypto.dkg.feldman; -import meerkat.destributed_key_generation.utilitis.Channel; -import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial; +import meerkat.crypto.utils.Channel; +import meerkat.crypto.secretsharing.shamir.Polynomial; import com.google.protobuf.ByteString; import com.google.protobuf.Message; import meerkat.protobuf.DKGMessages; @@ -59,7 +59,7 @@ public class User implements Runnable{ /** * mail handler registered to channel as ReceiverCallback */ - protected meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MailHandler mailHandler; + protected meerkat.crypto.dkg.comm.MailHandler mailHandler; /** * channel object @@ -360,7 +360,7 @@ public class User implements Runnable{ /** * an implementation of MessageHandler */ - public class MessageHandler implements meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MessageHandler{ + public class MessageHandler implements meerkat.crypto.dkg.comm.MessageHandler{ /** * commitment message is valid if: diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/MailHandler.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/MailHandler.java similarity index 85% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/MailHandler.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/MailHandler.java index 5f3ee3b..f82f057 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/MailHandler.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/MailHandler.java @@ -1,15 +1,15 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol; +package meerkat.crypto.dkg.gjkr; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; -import meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MessageHandler; +import meerkat.crypto.dkg.comm.MessageHandler; import meerkat.protobuf.DKGMessages; /** * Created by Tzlil on 2/29/2016. * an extension of MailHandler matching gjkr protocl */ -public class MailHandler extends meerkat.destributed_key_generation.concrete.distributed_key_generation.communication.MailHandler { +public class MailHandler extends meerkat.crypto.dkg.comm.MailHandler { /** * flag that indicants whether the diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/Party.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/Party.java similarity index 68% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/Party.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/Party.java index d950beb..529b7be 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/Party.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/Party.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol; +package meerkat.crypto.dkg.gjkr; -import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial; +import meerkat.crypto.secretsharing.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 extends meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Party { +public class Party extends meerkat.crypto.dkg.feldman.Party { public Polynomial.Point shareT; public boolean ysDoneFlag; public ArrayList verifiableValues; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/Protocol.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/Protocol.java similarity index 92% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/Protocol.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/Protocol.java index a0512d6..a98265e 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/Protocol.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/Protocol.java @@ -1,7 +1,7 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol; +package meerkat.crypto.dkg.gjkr; -import meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable.VerifiableSecretSharing; -import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial; +import meerkat.crypto.secretsharing.feldman.VerifiableSecretSharing; +import meerkat.crypto.secretsharing.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 extends meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Protocol { +public class Protocol extends meerkat.crypto.dkg.feldman.Protocol { private VerifiableSecretSharing maskingShares; private final T h; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/User.java b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/User.java similarity index 92% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/User.java rename to distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/User.java index 86ed127..cb4c693 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/User.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/dkg/gjkr/User.java @@ -1,10 +1,10 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol; +package meerkat.crypto.dkg.gjkr; -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 meerkat.crypto.utils.Arithmetic; +import meerkat.crypto.utils.concrete.Fp; +import meerkat.crypto.utils.Channel; +import meerkat.crypto.secretsharing.shamir.Polynomial; +import meerkat.crypto.secretsharing.shamir.SecretSharing; import com.google.protobuf.Message; import meerkat.protobuf.DKGMessages; @@ -22,7 +22,7 @@ import java.util.ArrayList; * 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 extends meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.User { +public class User extends meerkat.crypto.dkg.feldman.User { /** * All parties participating in key generation. @@ -190,7 +190,7 @@ public class User extends meerkat.destributed_key_generation.concrete.distrib super.stage4(); } - private class MessageHandler extends meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.User.MessageHandler { + private class MessageHandler extends meerkat.crypto.dkg.feldman.User.MessageHandler { boolean isStage4; /** @@ -259,10 +259,10 @@ public class User extends meerkat.destributed_key_generation.concrete.distrib synchronized (parties[i - 1]) { if (!isStage4) { if (sdkg.isValidShare(secret, secretT, parties[j - 1].verifiableValues, i)) { - parties[i - 1].complaints[j - 1] = meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Protocol.ComplaintState.NonDisqualified; + parties[i - 1].complaints[j - 1] = meerkat.crypto.dkg.feldman.Protocol.ComplaintState.NonDisqualified; } else { - parties[i - 1].complaints[j - 1] = meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Protocol.ComplaintState.Disqualified; + parties[i - 1].complaints[j - 1] = meerkat.crypto.dkg.feldman.Protocol.ComplaintState.Disqualified; } if (j == id) { parties[i - 1].share = secret; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/feldman_verifiable/VerifiableSecretSharing.java b/distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/feldman/VerifiableSecretSharing.java similarity index 93% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/feldman_verifiable/VerifiableSecretSharing.java rename to distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/feldman/VerifiableSecretSharing.java index 1544564..0c91431 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/feldman_verifiable/VerifiableSecretSharing.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/feldman/VerifiableSecretSharing.java @@ -1,7 +1,7 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable; +package meerkat.crypto.secretsharing.feldman; -import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial; -import meerkat.destributed_key_generation.concrete.secret_shring.shamir.SecretSharing; +import meerkat.crypto.secretsharing.shamir.Polynomial; +import meerkat.crypto.secretsharing.shamir.SecretSharing; import org.factcenter.qilin.primitives.Group; import java.util.ArrayList; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/LagrangePolynomial.java b/distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/LagrangePolynomial.java similarity index 94% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/LagrangePolynomial.java rename to distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/LagrangePolynomial.java index 0da8f48..e12d65f 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/LagrangePolynomial.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/LagrangePolynomial.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.shamir; +package meerkat.crypto.secretsharing.shamir; -import meerkat.destributed_key_generation.utilitis.Arithmetic; +import meerkat.crypto.utils.Arithmetic; import java.math.BigInteger; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/Polynomial.java b/distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/Polynomial.java similarity index 95% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/Polynomial.java rename to distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/Polynomial.java index e0e2361..58f38fb 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/Polynomial.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/Polynomial.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.shamir; +package meerkat.crypto.secretsharing.shamir; -import meerkat.destributed_key_generation.utilitis.Arithmetic; +import meerkat.crypto.utils.Arithmetic; import java.math.BigInteger; import java.util.Arrays; @@ -100,7 +100,7 @@ public class Polynomial implements Comparable { /** * @param other - * @return new meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial of degree max(this degree,other degree) s.t for all x + * @return new 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){ diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/SecretSharing.java b/distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/SecretSharing.java similarity index 93% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/SecretSharing.java rename to distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/SecretSharing.java index d5e73aa..fb86993 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/SecretSharing.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/secretsharing/shamir/SecretSharing.java @@ -1,7 +1,7 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.shamir; +package meerkat.crypto.secretsharing.shamir; -import meerkat.destributed_key_generation.utilitis.Arithmetic; -import meerkat.destributed_key_generation.utilitis.concrete.Fp; +import meerkat.crypto.utils.Arithmetic; +import meerkat.crypto.utils.concrete.Fp; import java.math.BigInteger; import java.util.Random; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/Arithmetic.java b/distributed-key-generation/src/main/java/meerkat/crypto/utils/Arithmetic.java similarity index 92% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/Arithmetic.java rename to distributed-key-generation/src/main/java/meerkat/crypto/utils/Arithmetic.java index 2aab0cf..6221a5c 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/Arithmetic.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/utils/Arithmetic.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.utilitis; +package meerkat.crypto.utils; /** * Created by Tzlil on 3/17/2016. diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/Channel.java b/distributed-key-generation/src/main/java/meerkat/crypto/utils/Channel.java similarity index 95% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/Channel.java rename to distributed-key-generation/src/main/java/meerkat/crypto/utils/Channel.java index 294ffaf..6f477fe 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/Channel.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/utils/Channel.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.utilitis; +package meerkat.crypto.utils; import com.google.protobuf.Message; import meerkat.protobuf.DKGMessages; diff --git a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/concrete/Fp.java b/distributed-key-generation/src/main/java/meerkat/crypto/utils/concrete/Fp.java similarity index 88% rename from destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/concrete/Fp.java rename to distributed-key-generation/src/main/java/meerkat/crypto/utils/concrete/Fp.java index d7d03bc..52fb324 100644 --- a/destributed-key-generation/src/main/java/meerkat/destributed_key_generation/utilitis/concrete/Fp.java +++ b/distributed-key-generation/src/main/java/meerkat/crypto/utils/concrete/Fp.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.utilitis.concrete; +package meerkat.crypto.utils.concrete; -import meerkat.destributed_key_generation.utilitis.Arithmetic; +import meerkat.crypto.utils.Arithmetic; import org.factcenter.qilin.primitives.concrete.Zpstar; import java.math.BigInteger; diff --git a/meerkat-common/src/main/proto/meerkat/DKGMessages.proto b/distributed-key-generation/src/main/proto/meerkat/DKGMessages.proto similarity index 85% rename from meerkat-common/src/main/proto/meerkat/DKGMessages.proto rename to distributed-key-generation/src/main/proto/meerkat/DKGMessages.proto index 046f586..0e40e17 100644 --- a/meerkat-common/src/main/proto/meerkat/DKGMessages.proto +++ b/distributed-key-generation/src/main/proto/meerkat/DKGMessages.proto @@ -4,7 +4,7 @@ package meerkat; option java_package = "meerkat.protobuf"; -message Mail{ +message Mail { enum Type { SHARE = 0; COMMITMENT = 1; @@ -29,14 +29,14 @@ message ShareMessage { bytes share = 3; } -message DoubleShareMessage{ +message DoubleShareMessage { int32 i = 1; int32 j = 2; bytes share = 3; bytes shareT = 4; } -message CommitmentMessage{ +message CommitmentMessage { int32 k = 1; bytes commitment = 2; } diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGMaliciousUser.java b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGMaliciousUser.java similarity index 89% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGMaliciousUser.java rename to distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGMaliciousUser.java index 672de21..ebd2ff6 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGMaliciousUser.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGMaliciousUser.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol; +package meerkat.crypto.dkg.feldman; -import meerkat.destributed_key_generation.utilitis.Channel; +import meerkat.crypto.utils.Channel; import java.math.BigInteger; import java.util.*; @@ -44,7 +44,7 @@ public class DKGMaliciousUser extends User { @Override public void stage1() { dkg.broadcastCommitments(); - sendSecrets(); //insteadof dkg.sendSecrets(channel); + sendSecrets(); //insteadof crypto.sendSecrets(channel); } @Override diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGTest.java b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGTest.java similarity index 85% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGTest.java rename to distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGTest.java index cac11df..18b3674 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGTest.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGTest.java @@ -1,18 +1,17 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol; +package meerkat.crypto.dkg.feldman; -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 meerkat.crypto.utils.ChannelImpl; +import meerkat.crypto.utils.Arithmetic; +import meerkat.crypto.utils.concrete.Fp; +import meerkat.crypto.utils.Channel; +import meerkat.crypto.secretsharing.feldman.VerifiableSecretSharing; +import meerkat.crypto.secretsharing.shamir.Polynomial; +import meerkat.crypto.secretsharing.shamir.SecretSharing; +import meerkat.crypto.utils.BigIntegerByteEncoder; +import meerkat.crypto.utils.GenerateRandomPrime; import org.factcenter.qilin.primitives.Group; import org.factcenter.qilin.primitives.concrete.Zpstar; import org.factcenter.qilin.util.ByteEncoder; -import org.junit.Before; import org.junit.Test; import java.math.BigInteger; @@ -122,7 +121,7 @@ public class DKGTest { id = ids.remove(random.nextInt(ids.size())); channel = new ChannelImpl(id,n); s = randomIntModQ(random); - dkg = new meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol.Protocol(t, n, s, random, q, g, group, id,byteEncoder); + dkg = new meerkat.crypto.dkg.feldman.Protocol(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)){ diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGUserImplAbort.java b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGUserImplAbort.java similarity index 88% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGUserImplAbort.java rename to distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGUserImplAbort.java index dc0f419..c2b05cb 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/joint_feldman_protocol/DKGUserImplAbort.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/feldman/DKGUserImplAbort.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.joint_feldman_protocol; +package meerkat.crypto.dkg.feldman; -import meerkat.destributed_key_generation.utilitis.Channel; +import meerkat.crypto.utils.Channel; import meerkat.protobuf.DKGMessages; /** diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGMaliciousUserImpl.java b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGMaliciousUserImpl.java similarity index 87% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGMaliciousUserImpl.java rename to distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGMaliciousUserImpl.java index 7afb60e..f72b00a 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGMaliciousUserImpl.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGMaliciousUserImpl.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol; +package meerkat.crypto.dkg.gjkr; -import meerkat.destributed_key_generation.utilitis.Channel; +import meerkat.crypto.utils.Channel; import java.math.BigInteger; import java.util.Random; @@ -33,7 +33,7 @@ public class SDKGMaliciousUserImpl extends User { @Override public void stage1() { sdkg.computeAndBroadcastVerificationValues(); - sendSecrets(); //insteadof dkg.sendSecrets(channel); + sendSecrets(); //insteadof crypto.sendSecrets(channel); } @Override diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGTest.java b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGTest.java similarity index 86% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGTest.java rename to distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGTest.java index d296810..b5c4c9f 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGTest.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGTest.java @@ -1,19 +1,18 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol; +package meerkat.crypto.dkg.gjkr; -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 meerkat.crypto.utils.ChannelImpl; +import meerkat.crypto.utils.Arithmetic; +import meerkat.crypto.utils.concrete.Fp; +import meerkat.crypto.utils.Channel; +import meerkat.crypto.secretsharing.feldman.VerifiableSecretSharing; +import meerkat.crypto.dkg.feldman.DKGMaliciousUser; +import meerkat.crypto.secretsharing.shamir.Polynomial; +import meerkat.crypto.secretsharing.shamir.SecretSharing; +import meerkat.crypto.utils.BigIntegerByteEncoder; +import meerkat.crypto.utils.GenerateRandomPrime; import org.factcenter.qilin.primitives.Group; import org.factcenter.qilin.primitives.concrete.Zpstar; import org.factcenter.qilin.util.ByteEncoder; -import org.junit.Before; import org.junit.Test; import java.math.BigInteger; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGUserImplAbort.java b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGUserImplAbort.java similarity index 89% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGUserImplAbort.java rename to distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGUserImplAbort.java index e91d87e..9fc7756 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/distributed_key_generation/gjkr_secure_protocol/SDKGUserImplAbort.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/dkg/gjkr/SDKGUserImplAbort.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.distributed_key_generation.gjkr_secure_protocol; +package meerkat.crypto.dkg.gjkr; -import meerkat.destributed_key_generation.utilitis.Channel; +import meerkat.crypto.utils.Channel; import meerkat.protobuf.DKGMessages; /** diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/feldman_verifiable/VerifiableSecretSharingTest.java b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/feldman/VerifiableSecretSharingTest.java similarity index 93% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/feldman_verifiable/VerifiableSecretSharingTest.java rename to distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/feldman/VerifiableSecretSharingTest.java index 1f2d15e..7992dfb 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/feldman_verifiable/VerifiableSecretSharingTest.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/feldman/VerifiableSecretSharingTest.java @@ -1,6 +1,6 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.feldman_verifiable; +package meerkat.crypto.secretsharing.feldman; -import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial; +import meerkat.crypto.secretsharing.shamir.Polynomial; import org.factcenter.qilin.primitives.Group; import org.factcenter.qilin.primitives.concrete.Zpstar; import org.junit.Before; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/AddTest.java b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/AddTest.java similarity index 78% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/AddTest.java rename to distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/AddTest.java index 24c5e9f..79a9aef 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/AddTest.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/AddTest.java @@ -1,7 +1,7 @@ -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; +package meerkat.crypto.secretsharing.shamir.PolynomialTests; +import meerkat.crypto.utils.GenerateRandomPolynomial; +import meerkat.crypto.utils.Z; +import meerkat.crypto.secretsharing.shamir.Polynomial; import org.junit.Before; import org.junit.Test; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/InterpolationTest.java b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/InterpolationTest.java similarity index 80% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/InterpolationTest.java rename to distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/InterpolationTest.java index 9462cec..ea857f8 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/InterpolationTest.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/InterpolationTest.java @@ -1,10 +1,10 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.shamir.PolynomialTests; +package meerkat.crypto.secretsharing.shamir.PolynomialTests; -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 meerkat.crypto.secretsharing.shamir.Polynomial; +import meerkat.crypto.utils.Arithmetic; +import meerkat.crypto.utils.concrete.Fp; +import meerkat.crypto.utils.GenerateRandomPolynomial; +import meerkat.crypto.utils.GenerateRandomPrime; import org.junit.Before; import org.junit.Test; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/MulByConstTest.java b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/MulByConstTest.java similarity index 77% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/MulByConstTest.java rename to distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/MulByConstTest.java index f63fc2b..77afc32 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/MulByConstTest.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/MulByConstTest.java @@ -1,8 +1,8 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.shamir.PolynomialTests; +package meerkat.crypto.secretsharing.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 meerkat.crypto.utils.GenerateRandomPolynomial; +import meerkat.crypto.utils.Z; +import meerkat.crypto.secretsharing.shamir.Polynomial; import org.junit.Before; import org.junit.Test; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/MulTest.java b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/MulTest.java similarity index 78% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/MulTest.java rename to distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/MulTest.java index e9caa66..1f54247 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/PolynomialTests/MulTest.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/PolynomialTests/MulTest.java @@ -1,8 +1,8 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.shamir.PolynomialTests; +package meerkat.crypto.secretsharing.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 meerkat.crypto.utils.GenerateRandomPolynomial; +import meerkat.crypto.utils.Z; +import meerkat.crypto.secretsharing.shamir.Polynomial; import org.junit.Before; import org.junit.Test; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/SecretSharingTest.java b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/SecretSharingTest.java similarity index 90% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/SecretSharingTest.java rename to distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/SecretSharingTest.java index cf1b8d3..021b529 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/concrete/secret_shring/shamir/SecretSharingTest.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/secretsharing/shamir/SecretSharingTest.java @@ -1,7 +1,7 @@ -package meerkat.destributed_key_generation.concrete.secret_shring.shamir; +package meerkat.crypto.secretsharing.shamir; -import meerkat.destributed_key_generation.utilitis.concrete.Fp; -import meerkat.destributed_key_generation.utilitis.GenerateRandomPrime; +import meerkat.crypto.utils.concrete.Fp; +import meerkat.crypto.utils.GenerateRandomPrime; import org.factcenter.qilin.primitives.CyclicGroup; import org.factcenter.qilin.primitives.concrete.Zn; import org.junit.Before; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/BigIntegerByteEncoder.java b/distributed-key-generation/src/test/java/meerkat/crypto/utils/BigIntegerByteEncoder.java similarity index 91% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/BigIntegerByteEncoder.java rename to distributed-key-generation/src/test/java/meerkat/crypto/utils/BigIntegerByteEncoder.java index 4548451..2781abb 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/BigIntegerByteEncoder.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/utils/BigIntegerByteEncoder.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.utilitis; +package meerkat.crypto.utils; import java.math.BigInteger; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/ChannelImpl.java b/distributed-key-generation/src/test/java/meerkat/crypto/utils/ChannelImpl.java similarity index 98% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/ChannelImpl.java rename to distributed-key-generation/src/test/java/meerkat/crypto/utils/ChannelImpl.java index f6e09f1..55b34fa 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/ChannelImpl.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/utils/ChannelImpl.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.utilitis; +package meerkat.crypto.utils; import com.google.protobuf.Message; import meerkat.protobuf.DKGMessages; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/GenerateRandomPolynomial.java b/distributed-key-generation/src/test/java/meerkat/crypto/utils/GenerateRandomPolynomial.java similarity index 82% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/GenerateRandomPolynomial.java rename to distributed-key-generation/src/test/java/meerkat/crypto/utils/GenerateRandomPolynomial.java index 4648598..802c479 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/GenerateRandomPolynomial.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/utils/GenerateRandomPolynomial.java @@ -1,7 +1,7 @@ -package meerkat.destributed_key_generation.utilitis; +package meerkat.crypto.utils; -import meerkat.destributed_key_generation.concrete.secret_shring.shamir.Polynomial; -import meerkat.destributed_key_generation.utilitis.concrete.Fp; +import meerkat.crypto.secretsharing.shamir.Polynomial; +import meerkat.crypto.utils.concrete.Fp; import java.math.BigInteger; import java.util.Random; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/GenerateRandomPrime.java b/distributed-key-generation/src/test/java/meerkat/crypto/utils/GenerateRandomPrime.java similarity index 94% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/GenerateRandomPrime.java rename to distributed-key-generation/src/test/java/meerkat/crypto/utils/GenerateRandomPrime.java index a0bee5a..b2969bf 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/GenerateRandomPrime.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/utils/GenerateRandomPrime.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.utilitis; +package meerkat.crypto.utils; import java.math.BigInteger; import java.util.Random; diff --git a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/Z.java b/distributed-key-generation/src/test/java/meerkat/crypto/utils/Z.java similarity index 91% rename from destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/Z.java rename to distributed-key-generation/src/test/java/meerkat/crypto/utils/Z.java index fecd227..1814f7e 100644 --- a/destributed-key-generation/src/test/java/meerkat/destributed_key_generation/utilitis/Z.java +++ b/distributed-key-generation/src/test/java/meerkat/crypto/utils/Z.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.utilitis; +package meerkat.crypto.utils; import java.math.BigInteger; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/Digest.java b/meerkat-common/src/main/java/meerkat/crypto/Digest.java similarity index 94% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/Digest.java rename to meerkat-common/src/main/java/meerkat/crypto/Digest.java index 97b141e..06b012c 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/Digest.java +++ b/meerkat-common/src/main/java/meerkat/crypto/Digest.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation; +package meerkat.crypto; import com.google.protobuf.Message; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/DigitalSignature.java b/meerkat-common/src/main/java/meerkat/crypto/DigitalSignature.java similarity index 98% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/DigitalSignature.java rename to meerkat-common/src/main/java/meerkat/crypto/DigitalSignature.java index 0dd76d0..e7b64e5 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/DigitalSignature.java +++ b/meerkat-common/src/main/java/meerkat/crypto/DigitalSignature.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation; +package meerkat.crypto; import com.google.protobuf.ByteString; import com.google.protobuf.Message; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/Encryption.java b/meerkat-common/src/main/java/meerkat/crypto/Encryption.java similarity index 96% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/Encryption.java rename to meerkat-common/src/main/java/meerkat/crypto/Encryption.java index 69b22b5..6a40d0d 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/Encryption.java +++ b/meerkat-common/src/main/java/meerkat/crypto/Encryption.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation; +package meerkat.crypto; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECDSADeterministicSignature.java b/meerkat-common/src/main/java/meerkat/crypto/concrete/ECDSADeterministicSignature.java similarity index 98% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECDSADeterministicSignature.java rename to meerkat-common/src/main/java/meerkat/crypto/concrete/ECDSADeterministicSignature.java index 3e8b36f..0afbdd7 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECDSADeterministicSignature.java +++ b/meerkat-common/src/main/java/meerkat/crypto/concrete/ECDSADeterministicSignature.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.concrete; import com.google.protobuf.ByteString; import com.google.protobuf.Message; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECDSASignature.java b/meerkat-common/src/main/java/meerkat/crypto/concrete/ECDSASignature.java similarity index 99% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECDSASignature.java rename to meerkat-common/src/main/java/meerkat/crypto/concrete/ECDSASignature.java index 5578421..887b8e8 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECDSASignature.java +++ b/meerkat-common/src/main/java/meerkat/crypto/concrete/ECDSASignature.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.concrete; import java.io.IOException; import java.io.InputStream; @@ -16,7 +16,7 @@ import org.slf4j.LoggerFactory; import com.google.protobuf.Message; -import meerkat.destributed_key_generation.DigitalSignature; +import meerkat.crypto.DigitalSignature; import meerkat.protobuf.Crypto.Signature; import javax.security.auth.callback.Callback; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECElGamalEncryption.java b/meerkat-common/src/main/java/meerkat/crypto/concrete/ECElGamalEncryption.java similarity index 98% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECElGamalEncryption.java rename to meerkat-common/src/main/java/meerkat/crypto/concrete/ECElGamalEncryption.java index 973b3c7..6258f5f 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/ECElGamalEncryption.java +++ b/meerkat-common/src/main/java/meerkat/crypto/concrete/ECElGamalEncryption.java @@ -1,9 +1,9 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.concrete; import com.google.protobuf.ByteString; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; -import meerkat.destributed_key_generation.Encryption; +import meerkat.crypto.Encryption; import meerkat.protobuf.ConcreteCrypto; import meerkat.protobuf.Crypto; import org.bouncycastle.crypto.params.AsymmetricKeyParameter; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/GlobalCryptoSetup.java b/meerkat-common/src/main/java/meerkat/crypto/concrete/GlobalCryptoSetup.java similarity index 92% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/GlobalCryptoSetup.java rename to meerkat-common/src/main/java/meerkat/crypto/concrete/GlobalCryptoSetup.java index 7efc793..4f2e7a5 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/GlobalCryptoSetup.java +++ b/meerkat-common/src/main/java/meerkat/crypto/concrete/GlobalCryptoSetup.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.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 destributed_key_generation setup + * A class that performs required crypto setup */ public class GlobalCryptoSetup { final static Logger logger = LoggerFactory.getLogger(GlobalCryptoSetup.class); diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/SHA256Digest.java b/meerkat-common/src/main/java/meerkat/crypto/concrete/SHA256Digest.java similarity index 95% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/SHA256Digest.java rename to meerkat-common/src/main/java/meerkat/crypto/concrete/SHA256Digest.java index 6c2fce2..4f60af3 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/concrete/SHA256Digest.java +++ b/meerkat-common/src/main/java/meerkat/crypto/concrete/SHA256Digest.java @@ -1,8 +1,8 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.concrete; import com.google.protobuf.ByteString; import com.google.protobuf.Message; -import meerkat.destributed_key_generation.Digest; +import meerkat.crypto.Digest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mix2ZeroKnowledgeProver.java b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Mix2ZeroKnowledgeProver.java similarity index 93% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mix2ZeroKnowledgeProver.java rename to meerkat-common/src/main/java/meerkat/crypto/mixnet/Mix2ZeroKnowledgeProver.java index aa63aeb..1113bfd 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mix2ZeroKnowledgeProver.java +++ b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Mix2ZeroKnowledgeProver.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.mixnet; +package meerkat.crypto.mixnet; import meerkat.protobuf.Crypto; import meerkat.protobuf.Mixing; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mix2ZeroKnowledgeVerifier.java b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Mix2ZeroKnowledgeVerifier.java similarity index 92% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mix2ZeroKnowledgeVerifier.java rename to meerkat-common/src/main/java/meerkat/crypto/mixnet/Mix2ZeroKnowledgeVerifier.java index 6faf0ca..dd3c251 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mix2ZeroKnowledgeVerifier.java +++ b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Mix2ZeroKnowledgeVerifier.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.mixnet; +package meerkat.crypto.mixnet; import meerkat.protobuf.Crypto; import meerkat.protobuf.Mixing; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mixer.java b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Mixer.java similarity index 79% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mixer.java rename to meerkat-common/src/main/java/meerkat/crypto/mixnet/Mixer.java index 2b6d3e8..52e8844 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Mixer.java +++ b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Mixer.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.mixnet; +package meerkat.crypto.mixnet; import java.util.List; import static meerkat.protobuf.Voting.*; diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Trustee.java b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Trustee.java similarity index 56% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Trustee.java rename to meerkat-common/src/main/java/meerkat/crypto/mixnet/Trustee.java index ded66c5..e8044cd 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Trustee.java +++ b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Trustee.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.mixnet; +package meerkat.crypto.mixnet; /** * Created by talm on 25/10/15. diff --git a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Verifier.java b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Verifier.java similarity index 56% rename from meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Verifier.java rename to meerkat-common/src/main/java/meerkat/crypto/mixnet/Verifier.java index 18271ed..b733317 100644 --- a/meerkat-common/src/main/java/meerkat/destributed_key_generation/mixnet/Verifier.java +++ b/meerkat-common/src/main/java/meerkat/crypto/mixnet/Verifier.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.mixnet; +package meerkat.crypto.mixnet; /** * Created by talm on 25/10/15. diff --git a/meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECDSADeterministicSignatureTest.java b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECDSADeterministicSignatureTest.java similarity index 96% rename from meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECDSADeterministicSignatureTest.java rename to meerkat-common/src/test/java/meerkat/crypto/concrete/ECDSADeterministicSignatureTest.java index 86ae311..4baa741 100644 --- a/meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECDSADeterministicSignatureTest.java +++ b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECDSADeterministicSignatureTest.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.concrete; import com.google.protobuf.ByteString; import com.google.protobuf.Message; diff --git a/meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECDSASignatureTest.java b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECDSASignatureTest.java similarity index 99% rename from meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECDSASignatureTest.java rename to meerkat-common/src/test/java/meerkat/crypto/concrete/ECDSASignatureTest.java index 9e90cce..e5b448d 100644 --- a/meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECDSASignatureTest.java +++ b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECDSASignatureTest.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.concrete; import com.google.protobuf.ByteString; import com.google.protobuf.Message; diff --git a/meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECElGamalEncryptionTest.java b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalEncryptionTest.java similarity index 98% rename from meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECElGamalEncryptionTest.java rename to meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalEncryptionTest.java index b09fbce..81375e0 100644 --- a/meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECElGamalEncryptionTest.java +++ b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalEncryptionTest.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.concrete; import meerkat.protobuf.ConcreteCrypto; import meerkat.protobuf.Crypto; diff --git a/meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECElGamalUtils.java b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalUtils.java similarity index 98% rename from meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECElGamalUtils.java rename to meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalUtils.java index 9b5de78..66e1647 100644 --- a/meerkat-common/src/test/java/meerkat/destributed_key_generation/concrete/ECElGamalUtils.java +++ b/meerkat-common/src/test/java/meerkat/crypto/concrete/ECElGamalUtils.java @@ -1,4 +1,4 @@ -package meerkat.destributed_key_generation.concrete; +package meerkat.crypto.concrete; import com.google.protobuf.ByteString; import com.google.protobuf.GeneratedMessage; diff --git a/settings.gradle b/settings.gradle index f019032..236a0d1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,5 +4,5 @@ include 'bulletin-board-server' include 'polling-station' include 'restful-api-common' include 'bulletin-board-client' -include 'destributed-key-generation' +include 'distributed-key-generation'