From 84d530acfbfd5b93f7ef6c33b7a450dbd7205ae9 Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Sun, 26 Nov 2023 17:07:16 -0800 Subject: [PATCH 1/4] rename Also add Digest.toUUID() --- .../com/salesforce/apollo/choam/CHOAM.java | 14 +- .../salesforce/apollo/choam/Committee.java | 12 +- .../apollo/choam/GenesisAssembly.java | 7 +- .../apollo/choam/GenesisContext.java | 4 +- .../salesforce/apollo/choam/Parameters.java | 6 +- .../com/salesforce/apollo/choam/Producer.java | 2 +- .../com/salesforce/apollo/choam/Session.java | 8 +- .../salesforce/apollo/choam/ViewAssembly.java | 6 +- .../salesforce/apollo/choam/ViewContext.java | 12 +- .../apollo/choam/comm/Concierge.java | 2 +- .../apollo/choam/comm/Submitter.java | 2 +- .../apollo/choam/comm/Terminal.java | 2 +- .../apollo/choam/comm/TerminalClient.java | 2 +- .../apollo/choam/comm/TerminalServer.java | 2 +- .../apollo/choam/comm/TxnSubmitServer.java | 2 +- .../apollo/choam/support/Bootstrapper.java | 6 +- .../choam/support/CheckpointAssembler.java | 6 +- .../apollo/choam/support/CheckpointState.java | 4 +- .../choam/support/ChoamMetricsImpl.java | 2 +- .../apollo/choam/support/DigestType.java | 2 +- .../apollo/choam/support/HashedBlock.java | 4 +- .../choam/support/HashedCertifiedBlock.java | 4 +- .../apollo/choam/support/Store.java | 4 +- .../choam/support/SubmittedTransaction.java | 2 +- .../apollo/choam/GenesisAssemblyTest.java | 8 +- .../apollo/choam/MembershipTests.java | 4 +- .../salesforce/apollo/choam/SessionTest.java | 2 +- .../salesforce/apollo/choam/TestCHOAM.java | 4 +- .../salesforce/apollo/choam/TestChain.java | 2 +- .../apollo/choam/ViewAssemblyTest.java | 6 +- .../choam/support/BootstrapperTest.java | 2 +- .../support/CheckpointAssemblerTest.java | 4 +- .../choam/support/TxDataSourceTest.java | 2 +- .../apollo/bloomFilters/BloomFilter.java | 2 +- .../salesforce/apollo/bloomFilters/Hash.java | 2 +- .../{crypto => cryptography}/Digest.java | 110 +++++++------- .../DigestAlgorithm.java | 139 +++++++++--------- .../EdDSAOperations.java | 2 +- .../{crypto => cryptography}/HexBloom.java | 2 +- .../{crypto => cryptography}/JohnHancock.java | 4 +- .../QualifiedBase64.java | 8 +- .../SignatureAlgorithm.java | 4 +- .../{crypto => cryptography}/Signer.java | 2 +- .../SigningThreshold.java | 8 +- .../{crypto => cryptography}/Verifier.java | 2 +- .../cert/BcX500NameDnImpl.java | 2 +- .../cert/CertExtension.java | 2 +- .../cert/CertificateWithPrivateKey.java | 2 +- .../cert/Certificates.java | 4 +- .../cert/CrlDistPointExtension.java | 2 +- .../cert/ExtKeyUsageExtension.java | 2 +- .../cert/KeyUsageExtension.java | 2 +- .../cert/NameType.java | 2 +- .../ssl/CertificateValidator.java | 2 +- .../{crypto => cryptography}/ssl/Keys.java | 2 +- .../ssl/NodeKeyManagerFactory.java | 2 +- .../ssl/NodeKeyManagerFactorySpi.java | 2 +- .../ssl/NodeTrustManagerFactory.java | 2 +- .../ssl/NodeTrustManagerFactorySpi.java | 2 +- .../ssl/TlsInterceptor.java | 2 +- .../{crypto => cryptography}/ssl/Trust.java | 2 +- .../com/salesforce/apollo/utils/Utils.java | 14 +- .../apollo/bloomFilters/BloomFilterTest.java | 5 +- .../apollo/bloomFilters/BloomWindowTest.java | 4 +- .../EdDSAOperationsTests.java | 2 +- .../{crypto => cryptography}/HexTests.java | 41 +++--- .../QualifiedBase64Tests.java | 59 ++++---- .../cert/TestCertificates.java | 4 +- .../com/salesforce/apollo/ethereal/Adder.java | 8 +- .../salesforce/apollo/ethereal/Config.java | 10 +- .../com/salesforce/apollo/ethereal/Crown.java | 6 +- .../com/salesforce/apollo/ethereal/Dag.java | 2 +- .../apollo/ethereal/EpochProofBuilder.java | 4 +- .../salesforce/apollo/ethereal/Ethereal.java | 2 +- .../salesforce/apollo/ethereal/PreUnit.java | 10 +- .../salesforce/apollo/ethereal/Processor.java | 2 +- .../com/salesforce/apollo/ethereal/Unit.java | 6 +- .../salesforce/apollo/ethereal/Waiting.java | 2 +- .../apollo/ethereal/WeakThresholdKey.java | 4 +- .../apollo/ethereal/linear/Extender.java | 2 +- .../apollo/ethereal/linear/TimingRound.java | 4 +- .../ethereal/linear/UnanimousVoter.java | 2 +- .../ethereal/memberships/ChRbcGossip.java | 2 +- .../memberships/comm/EtherealMetricsImpl.java | 2 +- .../memberships/comm/GossiperServer.java | 2 +- .../memberships/comm/GossiperService.java | 2 +- .../salesforce/apollo/ethereal/DagReader.java | 2 +- .../salesforce/apollo/ethereal/DagTest.java | 2 +- .../apollo/ethereal/EtherealTest.java | 4 +- .../apollo/ethereal/RbcAdderTest.java | 4 +- .../apollo/ethereal/linear/ExtenderTest.java | 2 +- .../apollo/fireflies/AccusationWrapper.java | 8 +- .../salesforce/apollo/fireflies/Binding.java | 8 +- .../apollo/fireflies/FireflyMetricsImpl.java | 2 +- .../apollo/fireflies/NoteWrapper.java | 8 +- .../com/salesforce/apollo/fireflies/View.java | 14 +- .../apollo/fireflies/ViewManagement.java | 6 +- .../comm/entrance/EntranceServer.java | 2 +- .../comm/entrance/EntranceService.java | 2 +- .../fireflies/comm/gossip/FFService.java | 2 +- .../fireflies/comm/gossip/FfServer.java | 2 +- .../apollo/fireflies/ChurnTest.java | 4 +- .../salesforce/apollo/fireflies/E2ETest.java | 4 +- .../salesforce/apollo/fireflies/MtlsTest.java | 10 +- .../apollo/fireflies/SwarmTest.java | 4 +- .../client/GorgoneionClientTest.java | 4 +- .../apollo/gorgoneion/Gorgoneion.java | 10 +- .../apollo/gorgoneion/Parameters.java | 2 +- .../comm/admissions/AdmissionsServer.java | 2 +- .../comm/admissions/AdmissionsService.java | 2 +- .../comm/endorsement/EndorsementServer.java | 2 +- .../comm/endorsement/EndorsementService.java | 2 +- .../apollo/gorgoneion/GorgoneionTest.java | 2 +- .../demesnes/isolate/DemesneIsolate.java | 6 +- .../apollo/demesnes/DemesneSmoke.java | 6 +- .../apollo/demesnes/FireFliesTrace.java | 4 +- .../apollo/archipelago/Communications.java | 2 +- .../apollo/archipelago/Enclave.java | 6 +- .../apollo/archipelago/EndpointProvider.java | 2 +- .../apollo/archipelago/LocalServer.java | 6 +- .../archipelago/ManagedServerChannel.java | 4 +- .../apollo/archipelago/MtlsClient.java | 2 +- .../apollo/archipelago/MtlsServer.java | 10 +- .../salesforce/apollo/archipelago/Portal.java | 4 +- .../apollo/archipelago/RoutableService.java | 2 +- .../salesforce/apollo/archipelago/Router.java | 2 +- .../apollo/archipelago/RouterImpl.java | 6 +- .../archipelago/ServerConnectionCache.java | 2 +- .../archipelago/StandardEpProvider.java | 2 +- .../apollo/membership/CompactContext.java | 4 +- .../salesforce/apollo/membership/Context.java | 4 +- .../apollo/membership/ContextImpl.java | 2 +- .../salesforce/apollo/membership/Member.java | 10 +- .../salesforce/apollo/membership/Ring.java | 2 +- .../apollo/membership/SigningMember.java | 4 +- .../apollo/membership/ViewChangeListener.java | 2 +- .../apollo/membership/impl/MemberImpl.java | 8 +- .../membership/impl/SigningMemberImpl.java | 10 +- .../messaging/rbc/RbcMetricsImpl.java | 2 +- .../messaging/rbc/ReliableBroadcaster.java | 6 +- .../messaging/rbc/comms/RbcServer.java | 2 +- .../ControlledIdentifierMember.java | 6 +- .../stereotomy/IdentifierMember.java | 8 +- .../apollo/ring/RingCommunications.java | 3 +- .../salesforce/apollo/ring/RingIterator.java | 3 +- .../apollo/archipeligo/DemultiplexerTest.java | 4 +- .../apollo/archipeligo/EnclaveTest.java | 4 +- .../apollo/archipeligo/LocalServerTest.java | 2 +- .../apollo/archipeligo/RouterTest.java | 2 +- .../apollo/membership/CompactRingTest.java | 2 +- .../apollo/membership/ContextTests.java | 2 +- .../apollo/membership/RingTest.java | 8 +- .../apollo/membership/messaging/RbcTest.java | 4 +- .../com/salesforce/apollo/model/Domain.java | 8 +- .../apollo/model/ProcessDomain.java | 12 +- .../salesforce/apollo/model/SubDomain.java | 4 +- .../apollo/model/comms/DelegationService.java | 2 +- .../apollo/model/demesnes/Demesne.java | 2 +- .../apollo/model/demesnes/DemesneImpl.java | 8 +- .../apollo/model/demesnes/JniBridge.java | 2 +- .../apollo/model/stereotomy/ShardedKERL.java | 4 +- .../salesforce/apollo/model/DomainTest.java | 4 +- .../apollo/model/FireFliesTest.java | 4 +- .../apollo/model/StoredProceduresTest.java | 6 +- .../apollo/model/demesnes/DemesneTest.java | 6 +- .../model/stereotomy/ShardedKERLTest.java | 8 +- .../comm/grpc/BaseServerCommunications.java | 4 +- .../comm/grpc/ClientContextSupplier.java | 2 +- .../comm/grpc/ServerContextSupplier.java | 4 +- .../apollo/protocols/ClientIdentity.java | 2 +- .../apollo/comm/grpc/MtlsClient.java | 2 +- .../apollo/comm/grpc/MtlsServer.java | 10 +- .../salesforce/apollo/comm/grpc/TestMtls.java | 13 +- .../src/main/resources/sql-state/internal.xml | 50 ++++--- .../com/salesforce/apollo/state/Emulator.java | 4 +- .../apollo/state/SqlStateMachine.java | 4 +- .../apollo/state/AbstractLifecycleTest.java | 4 +- .../salesforce/apollo/state/CHOAMTest.java | 4 +- .../apollo/state/MigrationTest.java | 4 +- .../salesforce/apollo/state/MutatorTest.java | 4 +- .../salesforce/apollo/state/ScriptTest.java | 4 +- .../salesforce/apollo/state/SmokeTest.java | 4 +- .../salesforce/apollo/state/UpdaterTest.java | 6 +- .../services/grpc/StereotomyMetricsImpl.java | 2 +- .../services/grpc/binder/BinderServer.java | 2 +- .../services/grpc/kerl/KERLAdapter.java | 4 +- .../services/grpc/observer/EventObserver.java | 3 +- .../grpc/observer/EventObserverServer.java | 2 +- .../stereotomy/services/grpc/TestBinder.java | 4 +- .../services/grpc/TestEventObserver.java | 4 +- .../services/grpc/TestEventValidation.java | 2 +- .../services/grpc/TestKerlService.java | 4 +- .../services/grpc/TestResolver.java | 2 +- .../apollo/stereotomy/BoundIdentifier.java | 2 +- .../stereotomy/ControlledIdentifier.java | 8 +- .../apollo/stereotomy/DelegatedKERL.java | 6 +- .../apollo/stereotomy/DigestKERL.java | 2 +- .../apollo/stereotomy/EventCoordinates.java | 4 +- .../apollo/stereotomy/EventValidation.java | 6 +- .../com/salesforce/apollo/stereotomy/KEL.java | 4 +- .../salesforce/apollo/stereotomy/KERL.java | 2 +- .../apollo/stereotomy/KerlVerifier.java | 6 +- .../apollo/stereotomy/KeyState.java | 4 +- .../apollo/stereotomy/ReadOnlyKERL.java | 2 +- .../apollo/stereotomy/Stereotomy.java | 6 +- .../apollo/stereotomy/StereotomyImpl.java | 14 +- .../stereotomy/StereotomyValidator.java | 2 +- .../apollo/stereotomy/Verifiers.java | 4 +- .../apollo/stereotomy/caching/CachingKEL.java | 4 +- .../stereotomy/caching/CachingKERL.java | 2 +- .../apollo/stereotomy/db/UniKERL.java | 6 +- .../apollo/stereotomy/db/UniKERLDirect.java | 4 +- .../stereotomy/db/UniKERLDirectPooled.java | 8 +- .../stereotomy/event/AttachmentEvent.java | 2 +- .../stereotomy/event/EstablishmentEvent.java | 4 +- .../stereotomy/event/EventSignature.java | 2 +- .../apollo/stereotomy/event/KeyEvent.java | 6 +- ...eyStateWithEndorsementsAndValidations.java | 2 +- .../apollo/stereotomy/event/Seal.java | 2 +- .../event/protobuf/AttachmentEventImpl.java | 2 +- .../protobuf/EstablishmentEventImpl.java | 8 +- .../event/protobuf/KeyEventImpl.java | 10 +- .../event/protobuf/KeyStateImpl.java | 14 +- .../event/protobuf/ProtobufEventFactory.java | 10 +- .../identifier/BasicIdentifier.java | 12 +- .../stereotomy/identifier/Identifier.java | 10 +- .../identifier/QualifiedBase64Identifier.java | 12 +- .../identifier/SelfAddressingIdentifier.java | 4 +- .../identifier/SelfSigningIdentifier.java | 2 +- .../spec/IdentifierSpecification.java | 10 +- .../spec/InteractionSpecification.java | 4 +- .../spec/KeyConfigurationDigester.java | 10 +- .../spec/RotationSpecification.java | 10 +- .../apollo/stereotomy/jks/JksKeyStore.java | 8 +- .../apollo/stereotomy/mem/MemKERL.java | 8 +- .../processing/KeyEventVerifier.java | 6 +- .../stereotomy/processing/Validator.java | 8 +- .../apollo/stereotomy/services/Binder.java | 2 +- .../services/proto/ProtoKERLAdapter.java | 4 +- .../apollo/stereotomy/StereotomyTests.java | 10 +- .../stereotomy/StereotomyUniKelTest.java | 2 +- .../apollo/stereotomy/VerifierTest.java | 2 +- .../apollo/stereotomy/db/TestUniKERL.java | 8 +- .../IdentifierSpecificationTests.java | 8 +- .../KeyConfigurationDigesterTest.java | 6 +- .../specification/QualifiedBase64Tests.java | 6 +- .../specification/SigningThresholdsTests.java | 14 +- .../java/com/salesforce/apollo/thoth/Ani.java | 6 +- .../apollo/thoth/CombinedIntervals.java | 2 +- .../com/salesforce/apollo/thoth/KerlDHT.java | 4 +- .../salesforce/apollo/thoth/KerlSpace.java | 6 +- .../salesforce/apollo/thoth/KeyInterval.java | 2 +- .../com/salesforce/apollo/thoth/Maat.java | 6 +- .../salesforce/apollo/thoth/Publisher.java | 2 +- .../thoth/grpc/delegation/Delegation.java | 2 +- .../grpc/reconciliation/Reconciliation.java | 2 +- .../reconciliation/ReconciliationClient.java | 5 +- .../reconciliation/ReconciliationServer.java | 2 +- .../apollo/thoth/AbstractDhtTest.java | 8 +- .../apollo/thoth/BootstrappingTest.java | 2 +- .../apollo/thoth/CombinedIntervalsTest.java | 4 +- .../apollo/thoth/DhtRebalanceTest.java | 2 +- .../apollo/thoth/KerlSpaceTest.java | 2 +- .../com/salesforce/apollo/thoth/KerlTest.java | 6 +- .../com/salesforce/apollo/thoth/MaatTest.java | 4 +- .../apollo/thoth/PublisherTest.java | 2 +- .../salesforce/apollo/thoth/ThothTest.java | 2 +- 267 files changed, 778 insertions(+), 798 deletions(-) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/Digest.java (92%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/DigestAlgorithm.java (87%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/EdDSAOperations.java (99%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/HexBloom.java (99%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/JohnHancock.java (98%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/QualifiedBase64.java (97%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/SignatureAlgorithm.java (98%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/Signer.java (98%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/SigningThreshold.java (96%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/Verifier.java (99%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/cert/BcX500NameDnImpl.java (95%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/cert/CertExtension.java (94%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/cert/CertificateWithPrivateKey.java (94%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/cert/Certificates.java (97%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/cert/CrlDistPointExtension.java (97%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/cert/ExtKeyUsageExtension.java (94%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/cert/KeyUsageExtension.java (96%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/cert/NameType.java (94%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/ssl/CertificateValidator.java (94%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/ssl/Keys.java (97%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/ssl/NodeKeyManagerFactory.java (93%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/ssl/NodeKeyManagerFactorySpi.java (97%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/ssl/NodeTrustManagerFactory.java (91%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/ssl/NodeTrustManagerFactorySpi.java (95%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/ssl/TlsInterceptor.java (96%) rename cryptography/src/main/java/com/salesforce/apollo/{crypto => cryptography}/ssl/Trust.java (97%) rename cryptography/src/test/java/com/salesforce/apollo/{crypto => cryptography}/EdDSAOperationsTests.java (99%) rename cryptography/src/test/java/com/salesforce/apollo/{crypto => cryptography}/HexTests.java (85%) rename cryptography/src/test/java/com/salesforce/apollo/{crypto => cryptography}/QualifiedBase64Tests.java (92%) rename cryptography/src/test/java/com/salesforce/apollo/{crypto => cryptography}/cert/TestCertificates.java (94%) diff --git a/choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java b/choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java index 07fc00dfe1..acf74fec54 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java @@ -23,8 +23,8 @@ import com.salesforce.apollo.choam.support.*; import com.salesforce.apollo.choam.support.Bootstrapper.SynchronizedState; import com.salesforce.apollo.choam.support.HashedCertifiedBlock.NullBlock; -import com.salesforce.apollo.crypto.*; -import com.salesforce.apollo.crypto.Signer.SignerImpl; +import com.salesforce.apollo.cryptography.*; +import com.salesforce.apollo.cryptography.Signer.SignerImpl; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.GroupIterator; import com.salesforce.apollo.membership.Member; @@ -53,8 +53,8 @@ import static com.salesforce.apollo.choam.Committee.validatorsOf; import static com.salesforce.apollo.choam.support.HashedBlock.buildHeader; import static com.salesforce.apollo.choam.support.HashedBlock.height; -import static com.salesforce.apollo.crypto.QualifiedBase64.bs; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.bs; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; /** * Combine Honnete Ober Advancer Mercantiles. @@ -75,9 +75,9 @@ public class CHOAM { private final AtomicReference genesis = new AtomicReference<>(); private final AtomicReference head = new AtomicReference<>(); private final ExecutorService linear; - private final AtomicReference next = new AtomicReference<>(); - private final AtomicReference nextViewId = new AtomicReference<>(); - private final Parameters params; + private final AtomicReference next = new AtomicReference<>(); + private final AtomicReference nextViewId = new AtomicReference<>(); + private final Parameters params; private final PriorityBlockingQueue pending = new PriorityBlockingQueue<>(); private final RoundScheduler roundScheduler; private final Session session; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/Committee.java b/choam/src/main/java/com/salesforce/apollo/choam/Committee.java index 0e91ea8447..9043b554db 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/Committee.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/Committee.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.choam; -import static com.salesforce.apollo.crypto.QualifiedBase64.publicKey; +import static com.salesforce.apollo.cryptography.QualifiedBase64.publicKey; import java.util.HashSet; import java.util.Map; @@ -22,11 +22,11 @@ import com.salesfoce.apollo.choam.proto.Transaction; import com.salesfoce.apollo.choam.proto.ViewMember; import com.salesforce.apollo.choam.support.HashedCertifiedBlock; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Verifier; -import com.salesforce.apollo.crypto.Verifier.DefaultVerifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Verifier; +import com.salesforce.apollo.cryptography.Verifier.DefaultVerifier; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.Member; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/GenesisAssembly.java b/choam/src/main/java/com/salesforce/apollo/choam/GenesisAssembly.java index 871b4461a0..247a364223 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/GenesisAssembly.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/GenesisAssembly.java @@ -18,7 +18,7 @@ import com.salesforce.apollo.choam.support.HashedCertifiedBlock; import com.salesforce.apollo.choam.support.HashedCertifiedBlock.NullBlock; import com.salesforce.apollo.choam.support.OneShot; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.Config; import com.salesforce.apollo.ethereal.Dag; import com.salesforce.apollo.ethereal.DataSource; @@ -36,12 +36,11 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; -import static com.salesforce.apollo.crypto.QualifiedBase64.publicKey; -import static com.salesforce.apollo.crypto.QualifiedBase64.signature; +import static com.salesforce.apollo.cryptography.QualifiedBase64.publicKey; +import static com.salesforce.apollo.cryptography.QualifiedBase64.signature; /** * Construction of the genesis block diff --git a/choam/src/main/java/com/salesforce/apollo/choam/GenesisContext.java b/choam/src/main/java/com/salesforce/apollo/choam/GenesisContext.java index 3d7606c963..d49e7efe91 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/GenesisContext.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/GenesisContext.java @@ -10,8 +10,8 @@ import com.salesfoce.apollo.choam.proto.Validate; import com.salesforce.apollo.choam.CHOAM.BlockProducer; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/Parameters.java b/choam/src/main/java/com/salesforce/apollo/choam/Parameters.java index 738bb5c427..49f3535233 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/Parameters.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/Parameters.java @@ -21,9 +21,9 @@ import com.salesforce.apollo.choam.support.ChoamMetrics; import com.salesforce.apollo.choam.support.ExponentialBackoffPolicy; import com.salesforce.apollo.choam.support.HashedBlock; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; import com.salesforce.apollo.ethereal.Config; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/Producer.java b/choam/src/main/java/com/salesforce/apollo/choam/Producer.java index 4bae00fdcd..cf5805d8ac 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/Producer.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/Producer.java @@ -41,7 +41,7 @@ import com.salesforce.apollo.choam.support.HashedBlock; import com.salesforce.apollo.choam.support.HashedCertifiedBlock; import com.salesforce.apollo.choam.support.TxDataSource; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.Config; import com.salesforce.apollo.ethereal.Config.Builder; import com.salesforce.apollo.ethereal.Ethereal; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/Session.java b/choam/src/main/java/com/salesforce/apollo/choam/Session.java index af7ed7716c..295c247032 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/Session.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/Session.java @@ -17,10 +17,10 @@ import com.salesforce.apollo.choam.support.InvalidTransaction; import com.salesforce.apollo.choam.support.SubmittedTransaction; import com.salesforce.apollo.choam.support.TransactionFailed; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.Verifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java b/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java index 5816366d9b..ab36396327 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java @@ -14,7 +14,7 @@ import com.salesforce.apollo.choam.fsm.Reconfiguration; import com.salesforce.apollo.choam.fsm.Reconfiguration.Reconfigure; import com.salesforce.apollo.choam.fsm.Reconfiguration.Transitions; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.ring.SliceIterator; import org.slf4j.Logger; @@ -32,8 +32,8 @@ import java.util.function.Consumer; import java.util.stream.Collectors; -import static com.salesforce.apollo.crypto.QualifiedBase64.publicKey; -import static com.salesforce.apollo.crypto.QualifiedBase64.signature; +import static com.salesforce.apollo.cryptography.QualifiedBase64.publicKey; +import static com.salesforce.apollo.cryptography.QualifiedBase64.signature; /** * View reconfiguration. Attempts to create a new view reconfiguration. View reconfiguration needs at least 2f+1 diff --git a/choam/src/main/java/com/salesforce/apollo/choam/ViewContext.java b/choam/src/main/java/com/salesforce/apollo/choam/ViewContext.java index af9b437ac2..579537f304 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/ViewContext.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/ViewContext.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.choam; -import static com.salesforce.apollo.crypto.QualifiedBase64.publicKey; +import static com.salesforce.apollo.cryptography.QualifiedBase64.publicKey; import java.util.HashMap; import java.util.Map; @@ -25,11 +25,11 @@ import com.salesforce.apollo.choam.CHOAM.BlockProducer; import com.salesforce.apollo.choam.support.HashedBlock; import com.salesforce.apollo.choam.support.HashedCertifiedBlock; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/comm/Concierge.java b/choam/src/main/java/com/salesforce/apollo/choam/comm/Concierge.java index 9835dddf09..33ce159317 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/comm/Concierge.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/comm/Concierge.java @@ -13,7 +13,7 @@ import com.salesfoce.apollo.choam.proto.Initial; import com.salesfoce.apollo.choam.proto.Synchronize; import com.salesfoce.apollo.choam.proto.ViewMember; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/choam/src/main/java/com/salesforce/apollo/choam/comm/Submitter.java b/choam/src/main/java/com/salesforce/apollo/choam/comm/Submitter.java index 150664a51a..ca6f8231a2 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/comm/Submitter.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/comm/Submitter.java @@ -8,7 +8,7 @@ import com.salesfoce.apollo.choam.proto.SubmitResult; import com.salesfoce.apollo.choam.proto.Transaction; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/choam/src/main/java/com/salesforce/apollo/choam/comm/Terminal.java b/choam/src/main/java/com/salesforce/apollo/choam/comm/Terminal.java index 1d0522c6df..8e301eeceb 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/comm/Terminal.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/comm/Terminal.java @@ -8,7 +8,7 @@ import com.salesfoce.apollo.choam.proto.*; import com.salesforce.apollo.archipelago.Link; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/comm/TerminalClient.java b/choam/src/main/java/com/salesforce/apollo/choam/comm/TerminalClient.java index 2c8ae72d0d..4ab9110b99 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/comm/TerminalClient.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/comm/TerminalClient.java @@ -10,7 +10,7 @@ import com.salesforce.apollo.archipelago.ManagedServerChannel; import com.salesforce.apollo.archipelago.ServerConnectionCache.CreateClientCommunications; import com.salesforce.apollo.choam.support.ChoamMetrics; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; /** diff --git a/choam/src/main/java/com/salesforce/apollo/choam/comm/TerminalServer.java b/choam/src/main/java/com/salesforce/apollo/choam/comm/TerminalServer.java index 550853dc3e..a466e1f027 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/comm/TerminalServer.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/comm/TerminalServer.java @@ -17,7 +17,7 @@ import com.salesfoce.apollo.cryptography.proto.Digeste; import com.salesforce.apollo.archipelago.RoutableService; import com.salesforce.apollo.choam.support.ChoamMetrics; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.ClientIdentity; import io.grpc.stub.StreamObserver; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/comm/TxnSubmitServer.java b/choam/src/main/java/com/salesforce/apollo/choam/comm/TxnSubmitServer.java index 6a22607cfa..7b789ea9db 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/comm/TxnSubmitServer.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/comm/TxnSubmitServer.java @@ -11,7 +11,7 @@ import com.salesfoce.apollo.choam.proto.TransactionSubmissionGrpc.TransactionSubmissionImplBase; import com.salesforce.apollo.archipelago.RoutableService; import com.salesforce.apollo.choam.support.ChoamMetrics; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.ClientIdentity; import io.grpc.StatusRuntimeException; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/Bootstrapper.java b/choam/src/main/java/com/salesforce/apollo/choam/support/Bootstrapper.java index 037f7b203a..bcbc97ac85 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/Bootstrapper.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/Bootstrapper.java @@ -15,9 +15,9 @@ import com.salesforce.apollo.choam.Parameters; import com.salesforce.apollo.choam.comm.Concierge; import com.salesforce.apollo.choam.comm.Terminal; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.HexBloom; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.HexBloom; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.ring.RingCommunications; import com.salesforce.apollo.ring.RingIterator; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/CheckpointAssembler.java b/choam/src/main/java/com/salesforce/apollo/choam/support/CheckpointAssembler.java index 67fc5c5fca..ca9f2c1293 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/CheckpointAssembler.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/CheckpointAssembler.java @@ -13,9 +13,9 @@ import com.salesforce.apollo.bloomFilters.BloomFilter; import com.salesforce.apollo.choam.comm.Concierge; import com.salesforce.apollo.choam.comm.Terminal; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.HexBloom; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.HexBloom; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/CheckpointState.java b/choam/src/main/java/com/salesforce/apollo/choam/support/CheckpointState.java index 3c64e4794f..63a3899a77 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/CheckpointState.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/CheckpointState.java @@ -10,8 +10,8 @@ import com.salesfoce.apollo.choam.proto.Checkpoint; import com.salesfoce.apollo.choam.proto.Slice; import com.salesforce.apollo.bloomFilters.BloomFilter; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.HexBloom; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.HexBloom; import com.salesforce.apollo.utils.Utils; import org.h2.mvstore.MVMap; import org.slf4j.LoggerFactory; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/ChoamMetricsImpl.java b/choam/src/main/java/com/salesforce/apollo/choam/support/ChoamMetricsImpl.java index e762e225f6..00c1ca1608 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/ChoamMetricsImpl.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/ChoamMetricsImpl.java @@ -7,7 +7,7 @@ package com.salesforce.apollo.choam.support; import com.codahale.metrics.*; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.memberships.comm.EtherealMetrics; import com.salesforce.apollo.ethereal.memberships.comm.EtherealMetricsImpl; import com.salesforce.apollo.membership.messaging.rbc.RbcMetrics; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/DigestType.java b/choam/src/main/java/com/salesforce/apollo/choam/support/DigestType.java index 002efdaadf..0d32964229 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/DigestType.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/DigestType.java @@ -11,7 +11,7 @@ import org.h2.mvstore.WriteBuffer; import org.h2.mvstore.type.BasicDataType; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/HashedBlock.java b/choam/src/main/java/com/salesforce/apollo/choam/support/HashedBlock.java index 051ed63c39..d5cd7109d6 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/HashedBlock.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/HashedBlock.java @@ -17,8 +17,8 @@ import com.salesfoce.apollo.choam.proto.Block; import com.salesfoce.apollo.choam.proto.CertifiedBlock; import com.salesfoce.apollo.choam.proto.Header; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; public class HashedBlock implements Comparable { public static class NullBlock extends HashedBlock { diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/HashedCertifiedBlock.java b/choam/src/main/java/com/salesforce/apollo/choam/support/HashedCertifiedBlock.java index 0ffed018e9..8b0b68adb9 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/HashedCertifiedBlock.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/HashedCertifiedBlock.java @@ -9,8 +9,8 @@ import org.joou.ULong; import com.salesfoce.apollo.choam.proto.CertifiedBlock; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; /** * @author hal.hildebrand diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/Store.java b/choam/src/main/java/com/salesforce/apollo/choam/support/Store.java index 65ec6292fa..1bd281dcfb 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/Store.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/Store.java @@ -9,8 +9,8 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.salesfoce.apollo.choam.proto.*; import com.salesforce.apollo.bloomFilters.BloomFilter; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import org.h2.mvstore.MVMap; import org.h2.mvstore.MVStore; import org.joou.ULong; diff --git a/choam/src/main/java/com/salesforce/apollo/choam/support/SubmittedTransaction.java b/choam/src/main/java/com/salesforce/apollo/choam/support/SubmittedTransaction.java index 1a9474bda7..a830c5585f 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/support/SubmittedTransaction.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/support/SubmittedTransaction.java @@ -8,7 +8,7 @@ import com.codahale.metrics.Timer; import com.salesfoce.apollo.choam.proto.Transaction; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import org.joou.ULong; import java.util.concurrent.CompletableFuture; diff --git a/choam/src/test/java/com/salesforce/apollo/choam/GenesisAssemblyTest.java b/choam/src/test/java/com/salesforce/apollo/choam/GenesisAssemblyTest.java index d5ae243046..6036622bf7 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/GenesisAssemblyTest.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/GenesisAssemblyTest.java @@ -19,9 +19,9 @@ import com.salesforce.apollo.choam.comm.TerminalClient; import com.salesforce.apollo.choam.comm.TerminalServer; import com.salesforce.apollo.choam.support.HashedBlock; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Signer; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Signer; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.Member; @@ -45,7 +45,7 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import static com.salesforce.apollo.crypto.QualifiedBase64.bs; +import static com.salesforce.apollo.cryptography.QualifiedBase64.bs; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/choam/src/test/java/com/salesforce/apollo/choam/MembershipTests.java b/choam/src/test/java/com/salesforce/apollo/choam/MembershipTests.java index 7a1da98665..04b5d4fd08 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/MembershipTests.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/MembershipTests.java @@ -14,8 +14,8 @@ import com.salesforce.apollo.choam.Parameters.BootstrapParameters; import com.salesforce.apollo.choam.Parameters.ProducerParameters; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.SigningMember; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; diff --git a/choam/src/test/java/com/salesforce/apollo/choam/SessionTest.java b/choam/src/test/java/com/salesforce/apollo/choam/SessionTest.java index 9c23625cf4..7ad879be30 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/SessionTest.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/SessionTest.java @@ -23,7 +23,7 @@ import com.salesforce.apollo.choam.support.HashedCertifiedBlock; import com.salesforce.apollo.choam.support.InvalidTransaction; import com.salesforce.apollo.choam.support.SubmittedTransaction; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.Member; diff --git a/choam/src/test/java/com/salesforce/apollo/choam/TestCHOAM.java b/choam/src/test/java/com/salesforce/apollo/choam/TestCHOAM.java index a17f786469..768afcb295 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/TestCHOAM.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/TestCHOAM.java @@ -17,8 +17,8 @@ import com.salesforce.apollo.choam.Parameters.ProducerParameters; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; import com.salesforce.apollo.choam.support.ChoamMetricsImpl; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.SigningMember; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; diff --git a/choam/src/test/java/com/salesforce/apollo/choam/TestChain.java b/choam/src/test/java/com/salesforce/apollo/choam/TestChain.java index d86c4773f0..43ba1b1c5a 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/TestChain.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/TestChain.java @@ -9,7 +9,7 @@ import com.salesfoce.apollo.choam.proto.*; import com.salesforce.apollo.choam.support.HashedCertifiedBlock; import com.salesforce.apollo.choam.support.Store; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import org.slf4j.LoggerFactory; /** diff --git a/choam/src/test/java/com/salesforce/apollo/choam/ViewAssemblyTest.java b/choam/src/test/java/com/salesforce/apollo/choam/ViewAssemblyTest.java index 6c58a9f650..0086d9c7b6 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/ViewAssemblyTest.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/ViewAssemblyTest.java @@ -14,7 +14,7 @@ import com.salesforce.apollo.choam.comm.Terminal; import com.salesforce.apollo.choam.comm.TerminalClient; import com.salesforce.apollo.choam.comm.TerminalServer; -import com.salesforce.apollo.crypto.*; +import com.salesforce.apollo.cryptography.*; import com.salesforce.apollo.ethereal.Config; import com.salesforce.apollo.ethereal.DataSource; import com.salesforce.apollo.ethereal.Ethereal; @@ -61,8 +61,8 @@ public class ViewAssemblyTest { private List controllers = new ArrayList<>(); private Map dataSources; private List gossipers = new ArrayList<>(); - private List members; - private Digest nextViewId; + private List members; + private Digest nextViewId; @AfterEach public void after() { diff --git a/choam/src/test/java/com/salesforce/apollo/choam/support/BootstrapperTest.java b/choam/src/test/java/com/salesforce/apollo/choam/support/BootstrapperTest.java index 754732bffd..a24e3e0a6a 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/support/BootstrapperTest.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/support/BootstrapperTest.java @@ -17,7 +17,7 @@ import com.salesforce.apollo.choam.comm.Concierge; import com.salesforce.apollo.choam.comm.Terminal; import com.salesforce.apollo.choam.support.Bootstrapper.SynchronizedState; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.Member; diff --git a/choam/src/test/java/com/salesforce/apollo/choam/support/CheckpointAssemblerTest.java b/choam/src/test/java/com/salesforce/apollo/choam/support/CheckpointAssemblerTest.java index f451b87141..39e390bbf4 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/support/CheckpointAssemblerTest.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/support/CheckpointAssemblerTest.java @@ -15,8 +15,8 @@ import com.salesforce.apollo.choam.CHOAM; import com.salesforce.apollo.choam.comm.Concierge; import com.salesforce.apollo.choam.comm.Terminal; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.Member; diff --git a/choam/src/test/java/com/salesforce/apollo/choam/support/TxDataSourceTest.java b/choam/src/test/java/com/salesforce/apollo/choam/support/TxDataSourceTest.java index a77a49cdb5..c2e09fc4df 100644 --- a/choam/src/test/java/com/salesforce/apollo/choam/support/TxDataSourceTest.java +++ b/choam/src/test/java/com/salesforce/apollo/choam/support/TxDataSourceTest.java @@ -17,7 +17,7 @@ import com.google.protobuf.ByteString; import com.salesfoce.apollo.choam.proto.Transaction; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.StereotomyImpl; import com.salesforce.apollo.stereotomy.mem.MemKERL; diff --git a/cryptography/src/main/java/com/salesforce/apollo/bloomFilters/BloomFilter.java b/cryptography/src/main/java/com/salesforce/apollo/bloomFilters/BloomFilter.java index c14594ed1c..5ae590c25e 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/bloomFilters/BloomFilter.java +++ b/cryptography/src/main/java/com/salesforce/apollo/bloomFilters/BloomFilter.java @@ -7,7 +7,7 @@ package com.salesforce.apollo.bloomFilters; import com.salesfoce.apollo.cryptography.proto.Biff; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import org.joou.ULong; import java.util.BitSet; diff --git a/cryptography/src/main/java/com/salesforce/apollo/bloomFilters/Hash.java b/cryptography/src/main/java/com/salesforce/apollo/bloomFilters/Hash.java index 785ad27a49..010200f179 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/bloomFilters/Hash.java +++ b/cryptography/src/main/java/com/salesforce/apollo/bloomFilters/Hash.java @@ -11,7 +11,7 @@ import org.joou.ULong; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/Digest.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/Digest.java similarity index 92% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/Digest.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/Digest.java index 2d29e3435b..dad1c34b2a 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/Digest.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/Digest.java @@ -4,25 +4,25 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; - -import java.nio.ByteBuffer; -import java.util.stream.Stream; +package com.salesforce.apollo.cryptography; import com.salesfoce.apollo.cryptography.proto.Digeste; import com.salesfoce.apollo.cryptography.proto.Digeste.Builder; +import com.salesforce.apollo.bloomFilters.Hash; import com.salesforce.apollo.utils.BUZ; import com.salesforce.apollo.utils.Hex; -import com.salesforce.apollo.bloomFilters.Hash; + +import java.nio.ByteBuffer; +import java.util.UUID; +import java.util.stream.Stream; /** * A computed digest - * - * @author hal.hildebrand * + * @author hal.hildebrand */ public class Digest implements Comparable { - public static final Digest NONE = new Digest(DigestAlgorithm.NONE, new byte[0]) { + public static final Digest NONE = new Digest(DigestAlgorithm.NONE, new byte[0]) { @Override public String toString() { @@ -30,51 +30,9 @@ public String toString() { } }; - - public static Digest combine(DigestAlgorithm algo, Digest[] digests) { - return algo.digest(Stream.of(digests) - .map(e -> e != null ? e : algo.getOrigin()) - .map(e -> ByteBuffer.wrap(e.getBytes())) - .toList()); - } - - public static int compare(byte[] o1, byte[] o2) { - if (o1 == null) { - return o2 == null ? 0 : -1; - } else if (o2 == null) { - return 1; - } - if (o1.length != o2.length) { - return o1.length - o2.length; - } - for (int i = 0; i < o1.length; i++) { - final int diff = (o1[i] & 0xFF) - (o2[i] & 0xFF); - if (diff != 0) { - return diff; - } - } - return 0; - } - - public static Digest from(Digeste d) { - return new Digest(d); - } - - public static Digest normalized(DigestAlgorithm digestAlgorithm, byte[] bs) { - if (bs.length > digestAlgorithm.digestLength()) { - throw new IllegalArgumentException(); - } - byte[] hash = new byte[digestAlgorithm.digestLength()]; - for (int i = 0; i < bs.length; i++) { - hash[i] = bs[i]; - } - return new Digest(digestAlgorithm, hash); - } - - private final DigestAlgorithm algorithm; - - private final long[] hash; - private volatile int hashCode = 0; + private final DigestAlgorithm algorithm; + private final long[] hash; + private volatile int hashCode = 0; public Digest(byte code, long[] hash) { algorithm = DigestAlgorithm.fromDigestCode(code); @@ -94,8 +52,8 @@ public Digest(DigestAlgorithm algorithm, byte[] bytes) { assert bytes != null && algorithm != null; if (bytes.length != algorithm.digestLength()) { - throw new IllegalArgumentException("Invalid bytes length. Require: " + algorithm.digestLength() - + " found: " + bytes.length); + throw new IllegalArgumentException( + "Invalid bytes length. Require: " + algorithm.digestLength() + " found: " + bytes.length); } this.algorithm = algorithm; int length = algorithm.longLength(); @@ -124,6 +82,44 @@ public Digest(Digeste d) { } } + public static Digest combine(DigestAlgorithm algo, Digest[] digests) { + return algo.digest( + Stream.of(digests).map(e -> e != null ? e : algo.getOrigin()).map(e -> ByteBuffer.wrap(e.getBytes())).toList()); + } + + public static int compare(byte[] o1, byte[] o2) { + if (o1 == null) { + return o2 == null ? 0 : -1; + } else if (o2 == null) { + return 1; + } + if (o1.length != o2.length) { + return o1.length - o2.length; + } + for (int i = 0; i < o1.length; i++) { + final int diff = (o1[i] & 0xFF) - (o2[i] & 0xFF); + if (diff != 0) { + return diff; + } + } + return 0; + } + + public static Digest from(Digeste d) { + return new Digest(d); + } + + public static Digest normalized(DigestAlgorithm digestAlgorithm, byte[] bs) { + if (bs.length > digestAlgorithm.digestLength()) { + throw new IllegalArgumentException(); + } + byte[] hash = new byte[digestAlgorithm.digestLength()]; + for (int i = 0; i < bs.length; i++) { + hash[i] = bs[i]; + } + return new Digest(digestAlgorithm, hash); + } + @Override public int compareTo(Digest id) { if (id == this) { @@ -295,6 +291,10 @@ public String toString() { return "[" + hexString.substring(0, Math.min(hexString.length(), 12)) + ":" + algorithm.digestCode() + "]"; } + public UUID toUUID() { + return algorithm.toUUID(hash); + } + public Digest xor(Digest b) { if (algorithm != b.algorithm) { throw new IllegalArgumentException("Cannot xor digests of different algorithms"); diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/DigestAlgorithm.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/DigestAlgorithm.java similarity index 87% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/DigestAlgorithm.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/DigestAlgorithm.java index 4c9efae7dc..bfece121af 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/DigestAlgorithm.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/DigestAlgorithm.java @@ -4,36 +4,30 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; + +import com.google.protobuf.ByteString; +import com.salesforce.apollo.utils.BbBackedInputStream; +import com.salesforce.apollo.utils.Entropy; +import org.bouncycastle.crypto.digests.Blake2bDigest; +import org.bouncycastle.crypto.digests.Blake2sDigest; +import org.bouncycastle.crypto.digests.Blake3Digest; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import org.bouncycastle.crypto.digests.Blake2bDigest; -import org.bouncycastle.crypto.digests.Blake2sDigest; -import org.bouncycastle.crypto.digests.Blake3Digest; - -import com.google.protobuf.ByteString; -import com.salesforce.apollo.utils.BbBackedInputStream; -import com.salesforce.apollo.utils.Entropy; +import java.util.*; /** * Enumerations of digest algorithms - * + * * @author hal.hildebrand */ public enum DigestAlgorithm { BLAKE2B_256 { - @Override public byte digestCode() { return 1; @@ -71,9 +65,7 @@ public byte[] hashOf(InputStream is) { return digest; } - }, - BLAKE2B_512 { - + }, BLAKE2B_512 { @Override public byte digestCode() { return 2; @@ -110,9 +102,7 @@ public byte[] hashOf(InputStream is) { digester.doFinal(digest, 0); return digest; } - }, - BLAKE2S_256 { - + }, BLAKE2S_256 { @Override public byte digestCode() { return 3; @@ -150,8 +140,7 @@ public byte[] hashOf(InputStream is) { return digest; } - }, - BLAKE3_256 { + }, BLAKE3_256 { @Override public byte digestCode() { return 4; @@ -188,8 +177,7 @@ public byte[] hashOf(InputStream is) { digester.doFinal(digest, 0); return digest; } - }, - BLAKE3_512 { + }, BLAKE3_512 { @Override public byte digestCode() { return 5; @@ -226,8 +214,7 @@ public byte[] hashOf(InputStream is) { digester.doFinal(digest, 0); return digest; } - }, - NONE { + }, NONE { @Override public byte digestCode() { return 0; @@ -257,8 +244,7 @@ public byte[] hashOf(byte[] bytes, int len) { public byte[] hashOf(InputStream is) { return EMPTY; } - }, - SHA2_256 { + }, SHA2_256 { @Override public byte digestCode() { return 6; @@ -295,8 +281,7 @@ public int digestLength() { return 32; } - }, - SHA3_512 { + }, SHA3_512 { @Override public byte digestCode() { return 9; @@ -309,23 +294,14 @@ public int digestLength() { }; - private static class DigestCache { - private final Map cache = new HashMap<>(); - - public MessageDigest lookup(DigestAlgorithm da) { - return cache.computeIfAbsent(da, k -> k.createJCA()); - } - } - - public static final DigestAlgorithm DEFAULT = BLAKE2B_256; - public static final long MAX_UNSIGNED_LONG = -1L; - - private static final byte[] EMPTY = new byte[0]; - private static final long[] LAST_32 = new long[4]; - private static final long[] LAST_64 = new long[8]; - private static final ThreadLocal MESSAGE_DIGEST = ThreadLocal.withInitial(() -> new DigestCache()); - private static final long[] ORIGIN_32 = new long[4]; - private static final long[] ORIGIN_64 = new long[8]; + public static final DigestAlgorithm DEFAULT = BLAKE2B_256; + public static final long MAX_UNSIGNED_LONG = -1L; + private static final byte[] EMPTY = new byte[0]; + private static final long[] LAST_32 = new long[4]; + private static final long[] LAST_64 = new long[8]; + private static final ThreadLocal MESSAGE_DIGEST = ThreadLocal.withInitial(() -> new DigestCache()); + private static final long[] ORIGIN_32 = new long[4]; + private static final long[] ORIGIN_64 = new long[8]; static { Arrays.fill(LAST_32, MAX_UNSIGNED_LONG); @@ -334,28 +310,28 @@ public MessageDigest lookup(DigestAlgorithm da) { public static DigestAlgorithm fromDigestCode(int i) { return switch (i) { - case 0: - yield NONE; - case 1: - yield BLAKE2B_256; - case 2: - yield BLAKE2B_512; - case 3: - yield BLAKE2S_256; - case 4: - yield BLAKE3_256; - case 5: - yield BLAKE3_512; - case 6: - yield SHA2_256; - case 7: - yield SHA2_512; - case 8: - yield SHA3_256; - case 9: - yield SHA3_512; - default: - throw new IllegalArgumentException("Unknown digest code: " + i); + case 0: + yield NONE; + case 1: + yield BLAKE2B_256; + case 2: + yield BLAKE2B_512; + case 3: + yield BLAKE2S_256; + case 4: + yield BLAKE3_256; + case 5: + yield BLAKE3_512; + case 6: + yield SHA2_256; + case 7: + yield SHA2_512; + case 8: + yield SHA3_256; + case 9: + yield SHA3_512; + default: + throw new IllegalArgumentException("Unknown digest code: " + i); }; } @@ -464,16 +440,33 @@ public Digest random(Random random) { return new Digest(digestCode(), hash); } + public UUID toUUID(long[] hash) { + assert hash != null; + return switch (hash.length) { + case 4 -> new UUID(hash[0] ^ hash[2], hash[1] ^ hash[3]); + case 8 -> toUUID(new long[] { hash[0] ^ hash[2], hash[1] ^ hash[3], hash[4] ^ hash[6], hash[5] ^ hash[7] }); + default -> throw new IllegalArgumentException("invalid hash array size: " + hash.length); + }; + } + protected MessageDigest createJCA() { try { return MessageDigest.getInstance(algorithmName()); } catch (NoSuchAlgorithmException e) { - throw new IllegalStateException("Unable to retrieve " + algorithmName() - + " Message DigestAlgorithm instance", e); + throw new IllegalStateException( + "Unable to retrieve " + algorithmName() + " Message DigestAlgorithm instance", e); } } private MessageDigest lookupJCA() { return MESSAGE_DIGEST.get().lookup(this); } + + private static class DigestCache { + private final Map cache = new HashMap<>(); + + public MessageDigest lookup(DigestAlgorithm da) { + return cache.computeIfAbsent(da, k -> k.createJCA()); + } + } } diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/EdDSAOperations.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/EdDSAOperations.java similarity index 99% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/EdDSAOperations.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/EdDSAOperations.java index 1cedf27077..9131e34710 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/EdDSAOperations.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/EdDSAOperations.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.edec.EdECObjectIdentifiers; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/HexBloom.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/HexBloom.java similarity index 99% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/HexBloom.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/HexBloom.java index edf4532d4c..794c5df68e 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/HexBloom.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/HexBloom.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import com.salesfoce.apollo.cryptography.proto.HexBloome; import com.salesforce.apollo.bloomFilters.BloomFilter; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/JohnHancock.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/JohnHancock.java similarity index 98% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/JohnHancock.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/JohnHancock.java index 2f8eef22fe..ad7f09fbf7 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/JohnHancock.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/JohnHancock.java @@ -4,11 +4,11 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import com.google.protobuf.ByteString; import com.salesfoce.apollo.cryptography.proto.Sig; -import com.salesforce.apollo.crypto.Verifier.Filtered; +import com.salesforce.apollo.cryptography.Verifier.Filtered; import com.salesforce.apollo.utils.Hex; import org.joou.ULong; import org.slf4j.LoggerFactory; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/QualifiedBase64.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/QualifiedBase64.java similarity index 97% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/QualifiedBase64.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/QualifiedBase64.java index ec9333a42e..cbc76c299e 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/QualifiedBase64.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/QualifiedBase64.java @@ -1,4 +1,4 @@ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import com.google.protobuf.ByteString; import com.salesfoce.apollo.cryptography.proto.Digeste; @@ -9,9 +9,9 @@ import java.util.Arrays; import java.util.Base64; -import static com.salesforce.apollo.crypto.DigestAlgorithm.*; -import static com.salesforce.apollo.crypto.SignatureAlgorithm.ED_25519; -import static com.salesforce.apollo.crypto.SignatureAlgorithm.ED_448; +import static com.salesforce.apollo.cryptography.DigestAlgorithm.*; +import static com.salesforce.apollo.cryptography.SignatureAlgorithm.ED_25519; +import static com.salesforce.apollo.cryptography.SignatureAlgorithm.ED_448; /** * Qualifieed Base 64 KERI conversion for core crypto interop diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/SignatureAlgorithm.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/SignatureAlgorithm.java similarity index 98% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/SignatureAlgorithm.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/SignatureAlgorithm.java index b06155419b..2e535d71b9 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/SignatureAlgorithm.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/SignatureAlgorithm.java @@ -4,10 +4,10 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import com.google.protobuf.ByteString; -import com.salesforce.apollo.crypto.Verifier.DefaultVerifier; +import com.salesforce.apollo.cryptography.Verifier.DefaultVerifier; import com.salesforce.apollo.utils.BbBackedInputStream; import org.joou.ULong; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/Signer.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/Signer.java similarity index 98% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/Signer.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/Signer.java index 7df0b859f9..2842a32a0b 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/Signer.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/Signer.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import com.google.protobuf.ByteString; import com.salesforce.apollo.utils.BbBackedInputStream; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/SigningThreshold.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/SigningThreshold.java similarity index 96% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/SigningThreshold.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/SigningThreshold.java index 792a307f77..69939133ea 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/SigningThreshold.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/SigningThreshold.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import static java.util.Objects.requireNonNull; @@ -16,9 +16,9 @@ import org.apache.commons.math3.fraction.Fraction; -import com.salesforce.apollo.crypto.SigningThreshold.Weighted.Weight; -import com.salesforce.apollo.crypto.SigningThreshold.Weighted.Weight.WeightImpl; -import com.salesforce.apollo.crypto.SigningThreshold.Weighted.WeightedImpl; +import com.salesforce.apollo.cryptography.SigningThreshold.Weighted.Weight; +import com.salesforce.apollo.cryptography.SigningThreshold.Weighted.Weight.WeightImpl; +import com.salesforce.apollo.cryptography.SigningThreshold.Weighted.WeightedImpl; /** * @author hal.hildebrand diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/Verifier.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/Verifier.java similarity index 99% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/Verifier.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/Verifier.java index fac3bcea65..16e4c6478a 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/Verifier.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/Verifier.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import java.io.InputStream; import java.nio.ByteBuffer; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/BcX500NameDnImpl.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/BcX500NameDnImpl.java similarity index 95% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/cert/BcX500NameDnImpl.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/BcX500NameDnImpl.java index 97c828dc34..2c78999722 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/BcX500NameDnImpl.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/BcX500NameDnImpl.java @@ -1,4 +1,4 @@ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import java.io.IOException; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CertExtension.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CertExtension.java similarity index 94% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CertExtension.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CertExtension.java index 89967f971e..46dd5629ea 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CertExtension.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CertExtension.java @@ -1,4 +1,4 @@ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import org.bouncycastle.asn1.ASN1Encodable; import org.bouncycastle.asn1.ASN1ObjectIdentifier; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CertificateWithPrivateKey.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CertificateWithPrivateKey.java similarity index 94% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CertificateWithPrivateKey.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CertificateWithPrivateKey.java index 1b51f0afc4..0eb2690253 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CertificateWithPrivateKey.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CertificateWithPrivateKey.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import java.security.PrivateKey; import java.security.cert.X509Certificate; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/Certificates.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/Certificates.java similarity index 97% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/cert/Certificates.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/Certificates.java index 2c56f49f00..7b6b41730f 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/Certificates.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/Certificates.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import java.math.BigInteger; import java.security.InvalidKeyException; @@ -30,7 +30,7 @@ import org.bouncycastle.operator.OperatorCreationException; import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; -import com.salesforce.apollo.crypto.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; import com.salesforce.apollo.utils.Entropy; /** diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CrlDistPointExtension.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CrlDistPointExtension.java similarity index 97% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CrlDistPointExtension.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CrlDistPointExtension.java index 9f2c1b05cc..192e3481cc 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/CrlDistPointExtension.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/CrlDistPointExtension.java @@ -1,4 +1,4 @@ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import org.bouncycastle.asn1.x509.CRLDistPoint; import org.bouncycastle.asn1.x509.DistributionPoint; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/ExtKeyUsageExtension.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/ExtKeyUsageExtension.java similarity index 94% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/cert/ExtKeyUsageExtension.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/ExtKeyUsageExtension.java index 5c6084b2b4..7274881a84 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/ExtKeyUsageExtension.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/ExtKeyUsageExtension.java @@ -1,4 +1,4 @@ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import org.bouncycastle.asn1.x509.ExtendedKeyUsage; import org.bouncycastle.asn1.x509.Extension; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/KeyUsageExtension.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/KeyUsageExtension.java similarity index 96% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/cert/KeyUsageExtension.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/KeyUsageExtension.java index 195117326b..5bf77715a6 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/KeyUsageExtension.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/KeyUsageExtension.java @@ -1,4 +1,4 @@ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import org.bouncycastle.asn1.x509.Extension; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/NameType.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/NameType.java similarity index 94% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/cert/NameType.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/NameType.java index 285fc09412..2c792263db 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/cert/NameType.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/cert/NameType.java @@ -1,4 +1,4 @@ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import org.bouncycastle.asn1.x509.GeneralName; import org.bouncycastle.asn1.x509.GeneralNames; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/CertificateValidator.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/CertificateValidator.java similarity index 94% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/CertificateValidator.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/CertificateValidator.java index def28f28a3..291fee26d0 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/CertificateValidator.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/CertificateValidator.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.ssl; +package com.salesforce.apollo.cryptography.ssl; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/Keys.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/Keys.java similarity index 97% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/Keys.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/Keys.java index 4b4b8d6016..e95fd4ed5c 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/Keys.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/Keys.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.ssl; +package com.salesforce.apollo.cryptography.ssl; import java.net.Socket; import java.security.Principal; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeKeyManagerFactory.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeKeyManagerFactory.java similarity index 93% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeKeyManagerFactory.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeKeyManagerFactory.java index dc0f48a13c..56366b511b 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeKeyManagerFactory.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeKeyManagerFactory.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.ssl; +package com.salesforce.apollo.cryptography.ssl; import java.security.PrivateKey; import java.security.Provider; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeKeyManagerFactorySpi.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeKeyManagerFactorySpi.java similarity index 97% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeKeyManagerFactorySpi.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeKeyManagerFactorySpi.java index 2f59c577cb..7282e8b7b0 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeKeyManagerFactorySpi.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeKeyManagerFactorySpi.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.ssl; +package com.salesforce.apollo.cryptography.ssl; import java.security.InvalidAlgorithmParameterException; import java.security.KeyStore; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeTrustManagerFactory.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeTrustManagerFactory.java similarity index 91% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeTrustManagerFactory.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeTrustManagerFactory.java index 7353272691..5afda9012c 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeTrustManagerFactory.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeTrustManagerFactory.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.ssl; +package com.salesforce.apollo.cryptography.ssl; import java.security.Provider; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeTrustManagerFactorySpi.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeTrustManagerFactorySpi.java similarity index 95% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeTrustManagerFactorySpi.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeTrustManagerFactorySpi.java index ec2ce42c9a..de080e89d0 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/NodeTrustManagerFactorySpi.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/NodeTrustManagerFactorySpi.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.ssl; +package com.salesforce.apollo.cryptography.ssl; import java.security.InvalidAlgorithmParameterException; import java.security.KeyStore; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/TlsInterceptor.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/TlsInterceptor.java similarity index 96% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/TlsInterceptor.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/TlsInterceptor.java index 4dee897cb8..6fdc592f9e 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/TlsInterceptor.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/TlsInterceptor.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.ssl; +package com.salesforce.apollo.cryptography.ssl; import javax.net.ssl.SSLSession; diff --git a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/Trust.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/Trust.java similarity index 97% rename from cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/Trust.java rename to cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/Trust.java index b778f8d204..e830e61d54 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/crypto/ssl/Trust.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/ssl/Trust.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.ssl; +package com.salesforce.apollo.cryptography.ssl; import java.net.Socket; import java.security.cert.CertificateException; diff --git a/cryptography/src/main/java/com/salesforce/apollo/utils/Utils.java b/cryptography/src/main/java/com/salesforce/apollo/utils/Utils.java index 4159bdf435..b366fb61a4 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/utils/Utils.java +++ b/cryptography/src/main/java/com/salesforce/apollo/utils/Utils.java @@ -1,11 +1,11 @@ package com.salesforce.apollo.utils; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.cert.BcX500NameDnImpl; -import com.salesforce.apollo.crypto.cert.CertificateWithPrivateKey; -import com.salesforce.apollo.crypto.cert.Certificates; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.cert.BcX500NameDnImpl; +import com.salesforce.apollo.cryptography.cert.CertificateWithPrivateKey; +import com.salesforce.apollo.cryptography.cert.Certificates; import org.slf4j.Logger; import java.io.File; @@ -23,7 +23,7 @@ import java.util.function.Consumer; import java.util.function.Supplier; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; /** * @author hal.hildebrand diff --git a/cryptography/src/test/java/com/salesforce/apollo/bloomFilters/BloomFilterTest.java b/cryptography/src/test/java/com/salesforce/apollo/bloomFilters/BloomFilterTest.java index 05c2d343e8..9f2316a91b 100644 --- a/cryptography/src/test/java/com/salesforce/apollo/bloomFilters/BloomFilterTest.java +++ b/cryptography/src/test/java/com/salesforce/apollo/bloomFilters/BloomFilterTest.java @@ -12,11 +12,10 @@ import java.util.ArrayList; import java.util.List; -import com.salesforce.apollo.bloomFilters.BloomFilter; import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.utils.Entropy; import com.salesforce.apollo.bloomFilters.BloomFilter.DigestBloomFilter; diff --git a/cryptography/src/test/java/com/salesforce/apollo/bloomFilters/BloomWindowTest.java b/cryptography/src/test/java/com/salesforce/apollo/bloomFilters/BloomWindowTest.java index 80a961e258..cae4bf65a1 100644 --- a/cryptography/src/test/java/com/salesforce/apollo/bloomFilters/BloomWindowTest.java +++ b/cryptography/src/test/java/com/salesforce/apollo/bloomFilters/BloomWindowTest.java @@ -1,8 +1,8 @@ package com.salesforce.apollo.bloomFilters; import com.salesfoce.apollo.cryptography.proto.Biff; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import org.junit.jupiter.api.Test; import java.security.SecureRandom; diff --git a/cryptography/src/test/java/com/salesforce/apollo/crypto/EdDSAOperationsTests.java b/cryptography/src/test/java/com/salesforce/apollo/cryptography/EdDSAOperationsTests.java similarity index 99% rename from cryptography/src/test/java/com/salesforce/apollo/crypto/EdDSAOperationsTests.java rename to cryptography/src/test/java/com/salesforce/apollo/cryptography/EdDSAOperationsTests.java index 3ec3b3384d..fafcd694d5 100644 --- a/cryptography/src/test/java/com/salesforce/apollo/crypto/EdDSAOperationsTests.java +++ b/cryptography/src/test/java/com/salesforce/apollo/cryptography/EdDSAOperationsTests.java @@ -1,4 +1,4 @@ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; import com.salesforce.apollo.utils.Hex; import org.joou.ULong; diff --git a/cryptography/src/test/java/com/salesforce/apollo/crypto/HexTests.java b/cryptography/src/test/java/com/salesforce/apollo/cryptography/HexTests.java similarity index 85% rename from cryptography/src/test/java/com/salesforce/apollo/crypto/HexTests.java rename to cryptography/src/test/java/com/salesforce/apollo/cryptography/HexTests.java index 19f0e20557..aa2832f504 100644 --- a/cryptography/src/test/java/com/salesforce/apollo/crypto/HexTests.java +++ b/cryptography/src/test/java/com/salesforce/apollo/cryptography/HexTests.java @@ -1,14 +1,11 @@ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; -import static com.salesforce.apollo.utils.Hex.hex; -import static com.salesforce.apollo.utils.Hex.hexNoPad; -import static com.salesforce.apollo.utils.Hex.unhex; -import static com.salesforce.apollo.utils.Hex.unhexLong; +import org.junit.jupiter.api.Test; + +import static com.salesforce.apollo.utils.Hex.*; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.jupiter.api.Test; - public class HexTests { @Test @@ -21,11 +18,16 @@ public void testHex() { } @Test - public void testUnhex() { - var bytes = unhex("01090a0f10f0ff"); - - var expected = new byte[] { 0x01, 0x09, 0x0a, 0x0f, 0x10, (byte) 0xf0, (byte) 0xff }; - assertArrayEquals(expected, bytes); + public void testHexToLong() { + assertEquals(Long.MIN_VALUE, unhexLong("-8000000000000000")); + assertEquals(-1, unhexLong("-1")); + assertEquals(0, unhexLong("0")); + assertEquals(1, unhexLong("1")); + assertEquals(1, unhexLong("1")); + assertEquals(2, unhexLong("2")); + assertEquals(10, unhexLong("a")); + assertEquals(16, unhexLong("10")); + assertEquals(Long.MAX_VALUE, unhexLong("7fffffffffffffff")); } @Test @@ -41,16 +43,11 @@ public void testLongToHex() { } @Test - public void testHexToLong() { - assertEquals(Long.MIN_VALUE, unhexLong("-8000000000000000")); - assertEquals(-1, unhexLong("-1")); - assertEquals(0, unhexLong("0")); - assertEquals(1, unhexLong("1")); - assertEquals(1, unhexLong("1")); - assertEquals(2, unhexLong("2")); - assertEquals(10, unhexLong("a")); - assertEquals(16, unhexLong("10")); - assertEquals(Long.MAX_VALUE, unhexLong("7fffffffffffffff")); + public void testUnhex() { + var bytes = unhex("01090a0f10f0ff"); + + var expected = new byte[] { 0x01, 0x09, 0x0a, 0x0f, 0x10, (byte) 0xf0, (byte) 0xff }; + assertArrayEquals(expected, bytes); } } diff --git a/cryptography/src/test/java/com/salesforce/apollo/crypto/QualifiedBase64Tests.java b/cryptography/src/test/java/com/salesforce/apollo/cryptography/QualifiedBase64Tests.java similarity index 92% rename from cryptography/src/test/java/com/salesforce/apollo/crypto/QualifiedBase64Tests.java rename to cryptography/src/test/java/com/salesforce/apollo/cryptography/QualifiedBase64Tests.java index 3979637aa7..d7d34f2e88 100644 --- a/cryptography/src/test/java/com/salesforce/apollo/crypto/QualifiedBase64Tests.java +++ b/cryptography/src/test/java/com/salesforce/apollo/cryptography/QualifiedBase64Tests.java @@ -4,18 +4,15 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto; +package com.salesforce.apollo.cryptography; -import static com.salesforce.apollo.crypto.QualifiedBase64.base64; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64Length; -import static com.salesforce.apollo.crypto.QualifiedBase64.unbase64; -import static com.salesforce.apollo.crypto.QualifiedBase64.unbase64Int; -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; import java.util.Base64; -import org.junit.jupiter.api.Test; +import static com.salesforce.apollo.cryptography.QualifiedBase64.*; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class QualifiedBase64Tests { @@ -27,14 +24,6 @@ public void test__base64__bytea() { assertEquals("AAECAw", base64(new byte[] { 0x00, 0x01, 0x02, 0x03 })); } - @Test - public void test__unbase64() { - assertArrayEquals(new byte[] { 0x00 }, unbase64("AA")); - assertArrayEquals(new byte[] { 0x00, 0x01 }, unbase64("AAE")); - assertArrayEquals(new byte[] { 0x00, 0x01, 0x02 }, unbase64("AAEC")); - assertArrayEquals(new byte[] { 0x00, 0x01, 0x02, 0x03 }, unbase64("AAECAw")); - } - @Test public void test__base64__int() { assertEquals("A", base64(0)); @@ -73,6 +62,29 @@ public void test__base64__int_padding() { assertEquals("Bd7", base64(6011, 2)); } + @Test + public void test__qb64Length() { + var enc = Base64.getUrlEncoder(); + assertEquals(enc.encodeToString(new byte[0]).length() + 4, qb64Length(0)); + assertEquals(enc.encodeToString(new byte[1]).length(), qb64Length(1)); + assertEquals(enc.encodeToString(new byte[2]).length(), qb64Length(2)); + assertEquals(enc.encodeToString(new byte[3]).length() + 4, qb64Length(3)); + assertEquals(enc.encodeToString(new byte[4]).length(), qb64Length(4)); + assertEquals(enc.encodeToString(new byte[5]).length(), qb64Length(5)); + assertEquals(enc.encodeToString(new byte[6]).length() + 4, qb64Length(6)); + assertEquals(enc.encodeToString(new byte[7]).length(), qb64Length(7)); + assertEquals(enc.encodeToString(new byte[8]).length(), qb64Length(8)); + assertEquals(enc.encodeToString(new byte[9]).length() + 4, qb64Length(9)); + } + + @Test + public void test__unbase64() { + assertArrayEquals(new byte[] { 0x00 }, unbase64("AA")); + assertArrayEquals(new byte[] { 0x00, 0x01 }, unbase64("AAE")); + assertArrayEquals(new byte[] { 0x00, 0x01, 0x02 }, unbase64("AAEC")); + assertArrayEquals(new byte[] { 0x00, 0x01, 0x02, 0x03 }, unbase64("AAECAw")); + } + @Test public void test__unbase64Int() { assertEquals(0, unbase64Int("A")); @@ -90,19 +102,4 @@ public void test__unbase64Int() { assertEquals(4096, unbase64Int("BAA")); assertEquals(6011, unbase64Int("Bd7")); } - - @Test - public void test__qb64Length() { - var enc = Base64.getUrlEncoder(); - assertEquals(enc.encodeToString(new byte[0]).length() + 4, qb64Length(0)); - assertEquals(enc.encodeToString(new byte[1]).length(), qb64Length(1)); - assertEquals(enc.encodeToString(new byte[2]).length(), qb64Length(2)); - assertEquals(enc.encodeToString(new byte[3]).length() + 4, qb64Length(3)); - assertEquals(enc.encodeToString(new byte[4]).length(), qb64Length(4)); - assertEquals(enc.encodeToString(new byte[5]).length(), qb64Length(5)); - assertEquals(enc.encodeToString(new byte[6]).length() + 4, qb64Length(6)); - assertEquals(enc.encodeToString(new byte[7]).length(), qb64Length(7)); - assertEquals(enc.encodeToString(new byte[8]).length(), qb64Length(8)); - assertEquals(enc.encodeToString(new byte[9]).length() + 4, qb64Length(9)); - } } diff --git a/cryptography/src/test/java/com/salesforce/apollo/crypto/cert/TestCertificates.java b/cryptography/src/test/java/com/salesforce/apollo/cryptography/cert/TestCertificates.java similarity index 94% rename from cryptography/src/test/java/com/salesforce/apollo/crypto/cert/TestCertificates.java rename to cryptography/src/test/java/com/salesforce/apollo/cryptography/cert/TestCertificates.java index 8440ca7384..7637d95ee6 100644 --- a/cryptography/src/test/java/com/salesforce/apollo/crypto/cert/TestCertificates.java +++ b/cryptography/src/test/java/com/salesforce/apollo/cryptography/cert/TestCertificates.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.crypto.cert; +package com.salesforce.apollo.cryptography.cert; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.fail; @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; /** * @author hal.hildebrand diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Adder.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Adder.java index f98fb11d89..571fbee373 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Adder.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Adder.java @@ -31,10 +31,10 @@ import com.salesfoce.apollo.ethereal.proto.SignedCommit; import com.salesfoce.apollo.ethereal.proto.SignedPreVote; import com.salesfoce.apollo.cryptography.proto.Biff; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Signer; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Signer; import com.salesforce.apollo.utils.Entropy; import com.salesforce.apollo.bloomFilters.BloomFilter; import com.salesforce.apollo.bloomFilters.BloomFilter.DigestBloomFilter; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Config.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Config.java index ea9d401215..c87ad03cce 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Config.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Config.java @@ -6,11 +6,11 @@ */ package com.salesforce.apollo.ethereal; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.Signer.MockSigner; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.Signer.MockSigner; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.ethereal.WeakThresholdKey.NoOpWeakThresholdKey; import com.salesforce.apollo.membership.Context; import org.joou.ULong; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Crown.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Crown.java index 151507fd3e..ef061530a5 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Crown.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Crown.java @@ -6,12 +6,12 @@ */ package com.salesforce.apollo.ethereal; -import static com.salesforce.apollo.crypto.Digest.combine; +import static com.salesforce.apollo.cryptography.Digest.combine; import com.salesfoce.apollo.ethereal.proto.Crown_s; import com.salesfoce.apollo.ethereal.proto.Crown_s.Builder; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; /** * Crown represents nProc units created by different processes in a condensed diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Dag.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Dag.java index 192334684c..27bb5cb1e4 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Dag.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Dag.java @@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory; import com.salesfoce.apollo.ethereal.proto.PreUnit_s; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.PreUnit.DecodedId; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.bloomFilters.BloomFilter; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/EpochProofBuilder.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/EpochProofBuilder.java index c24797f042..f6b965edc9 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/EpochProofBuilder.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/EpochProofBuilder.java @@ -17,8 +17,8 @@ import com.salesfoce.apollo.ethereal.proto.EpochProof; import com.salesfoce.apollo.ethereal.proto.EpochProof.Builder; import com.salesfoce.apollo.ethereal.proto.Proof; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; /** * the epoch proof is a message required to verify if the epoch has finished. It diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Ethereal.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Ethereal.java index 3885878616..2f474d65b3 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Ethereal.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Ethereal.java @@ -10,7 +10,7 @@ import com.salesfoce.apollo.ethereal.proto.Gossip; import com.salesfoce.apollo.ethereal.proto.Missing; import com.salesfoce.apollo.ethereal.proto.Update; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.Dag.DagImpl; import com.salesforce.apollo.ethereal.EpochProofBuilder.epochProofImpl; import com.salesforce.apollo.ethereal.EpochProofBuilder.sharesDB; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/PreUnit.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/PreUnit.java index deb9372a9c..474aa67bb5 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/PreUnit.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/PreUnit.java @@ -19,11 +19,11 @@ import com.google.protobuf.ByteString; import com.salesfoce.apollo.ethereal.proto.PreUnit_s; import com.salesfoce.apollo.ethereal.proto.PreUnit_s.Builder; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.utils.Entropy; /** diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Processor.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Processor.java index a7910f3382..8177872b63 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Processor.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Processor.java @@ -9,7 +9,7 @@ import com.salesfoce.apollo.ethereal.proto.Gossip; import com.salesfoce.apollo.ethereal.proto.Update; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Unit.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Unit.java index 554bacff45..989ea8f9ce 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Unit.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Unit.java @@ -12,9 +12,9 @@ import com.google.protobuf.ByteString; import com.salesfoce.apollo.ethereal.proto.PreUnit_s; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.membership.Context; /** diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Waiting.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Waiting.java index 4cc3b7d937..b2a17436b5 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Waiting.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Waiting.java @@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicReference; import com.salesfoce.apollo.ethereal.proto.PreUnit_s; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.Adder.State; /** diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/WeakThresholdKey.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/WeakThresholdKey.java index d1f30153f4..76d6feead7 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/WeakThresholdKey.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/WeakThresholdKey.java @@ -8,8 +8,8 @@ import com.salesfoce.apollo.ethereal.proto.EpochProof; import com.salesfoce.apollo.ethereal.proto.Proof; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; import com.salesforce.apollo.ethereal.EpochProofBuilder.DecodedShare; import com.salesforce.apollo.ethereal.EpochProofBuilder.Share; import org.joou.ULong; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/Extender.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/Extender.java index cc2a308841..edfb67348b 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/Extender.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/Extender.java @@ -14,7 +14,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.Config; import com.salesforce.apollo.ethereal.Dag; import com.salesforce.apollo.ethereal.Unit; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/TimingRound.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/TimingRound.java index 4c0425fbd9..07ce1555aa 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/TimingRound.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/TimingRound.java @@ -13,8 +13,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.ethereal.Unit; /** diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/UnanimousVoter.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/UnanimousVoter.java index dd65e29ca6..dcde398b11 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/UnanimousVoter.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/linear/UnanimousVoter.java @@ -15,7 +15,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.Dag; import com.salesforce.apollo.ethereal.Unit; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/ChRbcGossip.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/ChRbcGossip.java index 9618f17783..3c1183dbec 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/ChRbcGossip.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/ChRbcGossip.java @@ -12,7 +12,7 @@ import com.salesfoce.apollo.ethereal.proto.Update; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.ethereal.Processor; import com.salesforce.apollo.ethereal.memberships.comm.EtherealMetrics; import com.salesforce.apollo.ethereal.memberships.comm.Gossiper; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/EtherealMetricsImpl.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/EtherealMetricsImpl.java index fc5a4606b7..02ee34c789 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/EtherealMetricsImpl.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/EtherealMetricsImpl.java @@ -11,7 +11,7 @@ import com.codahale.metrics.Histogram; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.EndpointMetrics; import com.salesforce.apollo.protocols.EndpointMetricsImpl; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/GossiperServer.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/GossiperServer.java index b321d3668d..adcaf6125f 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/GossiperServer.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/GossiperServer.java @@ -13,7 +13,7 @@ import com.salesfoce.apollo.ethereal.proto.GossiperGrpc.GossiperImplBase; import com.salesfoce.apollo.ethereal.proto.Update; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.ClientIdentity; import io.grpc.stub.StreamObserver; diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/GossiperService.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/GossiperService.java index a48367d88e..f70aa82485 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/GossiperService.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/memberships/comm/GossiperService.java @@ -9,7 +9,7 @@ import com.salesfoce.apollo.ethereal.proto.ContextUpdate; import com.salesfoce.apollo.ethereal.proto.Gossip; import com.salesfoce.apollo.ethereal.proto.Update; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/ethereal/src/test/java/com/salesforce/apollo/ethereal/DagReader.java b/ethereal/src/test/java/com/salesforce/apollo/ethereal/DagReader.java index b4ad4d1e27..45914241b2 100644 --- a/ethereal/src/test/java/com/salesforce/apollo/ethereal/DagReader.java +++ b/ethereal/src/test/java/com/salesforce/apollo/ethereal/DagReader.java @@ -7,7 +7,7 @@ package com.salesforce.apollo.ethereal; import com.google.protobuf.ByteString; -import com.salesforce.apollo.crypto.*; +import com.salesforce.apollo.cryptography.*; import com.salesforce.apollo.ethereal.Dag.Decoded; import com.salesforce.apollo.ethereal.PreUnit.preUnit; import org.joou.ULong; diff --git a/ethereal/src/test/java/com/salesforce/apollo/ethereal/DagTest.java b/ethereal/src/test/java/com/salesforce/apollo/ethereal/DagTest.java index dc87566811..83f860aafb 100644 --- a/ethereal/src/test/java/com/salesforce/apollo/ethereal/DagTest.java +++ b/ethereal/src/test/java/com/salesforce/apollo/ethereal/DagTest.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/ethereal/src/test/java/com/salesforce/apollo/ethereal/EtherealTest.java b/ethereal/src/test/java/com/salesforce/apollo/ethereal/EtherealTest.java index f755bae94a..61e8d3b279 100644 --- a/ethereal/src/test/java/com/salesforce/apollo/ethereal/EtherealTest.java +++ b/ethereal/src/test/java/com/salesforce/apollo/ethereal/EtherealTest.java @@ -14,8 +14,8 @@ import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.ethereal.memberships.ChRbcGossip; import com.salesforce.apollo.ethereal.memberships.comm.EtherealMetricsImpl; import com.salesforce.apollo.membership.Context; diff --git a/ethereal/src/test/java/com/salesforce/apollo/ethereal/RbcAdderTest.java b/ethereal/src/test/java/com/salesforce/apollo/ethereal/RbcAdderTest.java index d08cf3c71f..be78d1e3c0 100644 --- a/ethereal/src/test/java/com/salesforce/apollo/ethereal/RbcAdderTest.java +++ b/ethereal/src/test/java/com/salesforce/apollo/ethereal/RbcAdderTest.java @@ -6,8 +6,8 @@ */ package com.salesforce.apollo.ethereal; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.ethereal.Adder.State; import com.salesforce.apollo.ethereal.Dag.DagImpl; import com.salesforce.apollo.membership.Context; diff --git a/ethereal/src/test/java/com/salesforce/apollo/ethereal/linear/ExtenderTest.java b/ethereal/src/test/java/com/salesforce/apollo/ethereal/linear/ExtenderTest.java index 737d7600a1..59bd103c09 100644 --- a/ethereal/src/test/java/com/salesforce/apollo/ethereal/linear/ExtenderTest.java +++ b/ethereal/src/test/java/com/salesforce/apollo/ethereal/linear/ExtenderTest.java @@ -19,7 +19,7 @@ import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.ethereal.Config; import com.salesforce.apollo.ethereal.Dag; import com.salesforce.apollo.ethereal.DagFactory; diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/AccusationWrapper.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/AccusationWrapper.java index e62db901bb..8299c64f0c 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/AccusationWrapper.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/AccusationWrapper.java @@ -6,12 +6,12 @@ */ package com.salesforce.apollo.fireflies; -import static com.salesforce.apollo.crypto.QualifiedBase64.signature; +import static com.salesforce.apollo.cryptography.QualifiedBase64.signature; import com.salesfoce.apollo.fireflies.proto.SignedAccusation; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; /** * @author hal.hildebrand diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/Binding.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/Binding.java index cfa5fae2f0..d67622bc0d 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/Binding.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/Binding.java @@ -13,10 +13,10 @@ import com.salesfoce.apollo.cryptography.proto.HexBloome; import com.salesfoce.apollo.fireflies.proto.*; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.HexBloom; -import com.salesforce.apollo.crypto.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.HexBloom; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; import com.salesforce.apollo.fireflies.View.Node; import com.salesforce.apollo.fireflies.View.Participant; import com.salesforce.apollo.fireflies.View.Seed; diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/FireflyMetricsImpl.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/FireflyMetricsImpl.java index 4b6c062232..1e1f5925f1 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/FireflyMetricsImpl.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/FireflyMetricsImpl.java @@ -12,7 +12,7 @@ import com.codahale.metrics.Meter; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.EndpointMetricsImpl; /** diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/NoteWrapper.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/NoteWrapper.java index fd12b0571d..c91c84e141 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/NoteWrapper.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/NoteWrapper.java @@ -6,16 +6,16 @@ */ package com.salesforce.apollo.fireflies; -import static com.salesforce.apollo.crypto.QualifiedBase64.signature; +import static com.salesforce.apollo.cryptography.QualifiedBase64.signature; import java.util.BitSet; import com.salesfoce.apollo.fireflies.proto.Note; import com.salesfoce.apollo.fireflies.proto.Note.Builder; import com.salesfoce.apollo.fireflies.proto.SignedNote; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.identifier.Identifier; import com.salesforce.apollo.stereotomy.identifier.SelfAddressingIdentifier; diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/View.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/View.java index 18af0b1afb..388c939046 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/View.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/View.java @@ -19,7 +19,7 @@ import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.Router.ServiceRouting; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.*; +import com.salesforce.apollo.cryptography.*; import com.salesforce.apollo.fireflies.Binding.Bound; import com.salesforce.apollo.fireflies.ViewManagement.Ballot; import com.salesforce.apollo.fireflies.comm.entrance.Entrance; @@ -86,15 +86,15 @@ public class View { private static final String SCHEDULED_VIEW_CHANGE = "Scheduled View Change"; private final CommonCommunications approaches; private final CommonCommunications comm; - private final Context context; - private final DigestAlgorithm digestAlgo; - private final RingCommunications gossiper; + private final Context context; + private final DigestAlgorithm digestAlgo; + private final RingCommunications gossiper; private final AtomicBoolean introduced = new AtomicBoolean(); private final Map lifecycleListeners = new HashMap<>(); private final FireflyMetrics metrics; - private final Node node; - private final Map observations = new ConcurrentSkipListMap<>(); - private final Parameters params; + private final Node node; + private final Map observations = new ConcurrentSkipListMap<>(); + private final Parameters params; private final ConcurrentMap pendingRebuttals = new ConcurrentSkipListMap<>(); private final RoundScheduler roundTimers; private final Set shunned = new ConcurrentSkipListSet<>(); diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/ViewManagement.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/ViewManagement.java index 37f45fa4ad..930657c597 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/ViewManagement.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/ViewManagement.java @@ -11,9 +11,9 @@ import com.salesfoce.apollo.fireflies.proto.*; import com.salesfoce.apollo.fireflies.proto.Update.Builder; import com.salesforce.apollo.bloomFilters.BloomFilter; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.HexBloom; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.HexBloom; import com.salesforce.apollo.fireflies.Binding.Bound; import com.salesforce.apollo.fireflies.View.Node; import com.salesforce.apollo.fireflies.View.Participant; diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/entrance/EntranceServer.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/entrance/EntranceServer.java index 50c8ebb0f3..010009f971 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/entrance/EntranceServer.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/entrance/EntranceServer.java @@ -13,7 +13,7 @@ import com.salesfoce.apollo.fireflies.proto.Redirect; import com.salesfoce.apollo.fireflies.proto.Registration; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.fireflies.FireflyMetrics; import com.salesforce.apollo.fireflies.View.Service; import com.salesforce.apollo.protocols.ClientIdentity; diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/entrance/EntranceService.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/entrance/EntranceService.java index a0a34df0c2..c2c507447b 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/entrance/EntranceService.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/entrance/EntranceService.java @@ -11,7 +11,7 @@ import com.salesfoce.apollo.fireflies.proto.Join; import com.salesfoce.apollo.fireflies.proto.Redirect; import com.salesfoce.apollo.fireflies.proto.Registration; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import io.grpc.stub.StreamObserver; diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/gossip/FFService.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/gossip/FFService.java index e1fd73dc43..3c205fb6df 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/gossip/FFService.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/gossip/FFService.java @@ -9,7 +9,7 @@ import com.salesfoce.apollo.fireflies.proto.Gossip; import com.salesfoce.apollo.fireflies.proto.SayWhat; import com.salesfoce.apollo.fireflies.proto.State; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/gossip/FfServer.java b/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/gossip/FfServer.java index 83378572fd..94cee1098e 100644 --- a/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/gossip/FfServer.java +++ b/fireflies/src/main/java/com/salesforce/apollo/fireflies/comm/gossip/FfServer.java @@ -13,7 +13,7 @@ import com.salesfoce.apollo.fireflies.proto.SayWhat; import com.salesfoce.apollo.fireflies.proto.State; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.fireflies.FireflyMetrics; import com.salesforce.apollo.fireflies.View.Service; import com.salesforce.apollo.protocols.ClientIdentity; diff --git a/fireflies/src/test/java/com/salesforce/apollo/fireflies/ChurnTest.java b/fireflies/src/test/java/com/salesforce/apollo/fireflies/ChurnTest.java index 136bfd1b9a..4f49ded588 100644 --- a/fireflies/src/test/java/com/salesforce/apollo/fireflies/ChurnTest.java +++ b/fireflies/src/test/java/com/salesforce/apollo/fireflies/ChurnTest.java @@ -12,8 +12,8 @@ import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; import com.salesforce.apollo.archipelago.ServerConnectionCacheMetricsImpl; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.fireflies.View.Participant; import com.salesforce.apollo.fireflies.View.Seed; import com.salesforce.apollo.membership.Context; diff --git a/fireflies/src/test/java/com/salesforce/apollo/fireflies/E2ETest.java b/fireflies/src/test/java/com/salesforce/apollo/fireflies/E2ETest.java index bbe028484d..5c87e3c7ee 100644 --- a/fireflies/src/test/java/com/salesforce/apollo/fireflies/E2ETest.java +++ b/fireflies/src/test/java/com/salesforce/apollo/fireflies/E2ETest.java @@ -12,8 +12,8 @@ import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; import com.salesforce.apollo.archipelago.ServerConnectionCacheMetricsImpl; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.fireflies.View.Participant; import com.salesforce.apollo.fireflies.View.Seed; import com.salesforce.apollo.membership.Context; diff --git a/fireflies/src/test/java/com/salesforce/apollo/fireflies/MtlsTest.java b/fireflies/src/test/java/com/salesforce/apollo/fireflies/MtlsTest.java index bce23f7140..413406bc8d 100644 --- a/fireflies/src/test/java/com/salesforce/apollo/fireflies/MtlsTest.java +++ b/fireflies/src/test/java/com/salesforce/apollo/fireflies/MtlsTest.java @@ -11,11 +11,11 @@ import com.salesforce.apollo.archipelago.*; import com.salesforce.apollo.comm.grpc.ClientContextSupplier; import com.salesforce.apollo.comm.grpc.ServerContextSupplier; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.cert.CertificateWithPrivateKey; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.cert.CertificateWithPrivateKey; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import com.salesforce.apollo.fireflies.View.Participant; import com.salesforce.apollo.fireflies.View.Seed; import com.salesforce.apollo.membership.Context; diff --git a/fireflies/src/test/java/com/salesforce/apollo/fireflies/SwarmTest.java b/fireflies/src/test/java/com/salesforce/apollo/fireflies/SwarmTest.java index 9ce20245aa..58375529fa 100644 --- a/fireflies/src/test/java/com/salesforce/apollo/fireflies/SwarmTest.java +++ b/fireflies/src/test/java/com/salesforce/apollo/fireflies/SwarmTest.java @@ -12,8 +12,8 @@ import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; import com.salesforce.apollo.archipelago.ServerConnectionCacheMetricsImpl; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.fireflies.View.Participant; import com.salesforce.apollo.fireflies.View.Seed; import com.salesforce.apollo.membership.Context; diff --git a/gorgoneion-client/src/test/java/com/salesforce/apollo/gorgoneion/client/GorgoneionClientTest.java b/gorgoneion-client/src/test/java/com/salesforce/apollo/gorgoneion/client/GorgoneionClientTest.java index fdecd4bbcc..b0ee93f65e 100644 --- a/gorgoneion-client/src/test/java/com/salesforce/apollo/gorgoneion/client/GorgoneionClientTest.java +++ b/gorgoneion-client/src/test/java/com/salesforce/apollo/gorgoneion/client/GorgoneionClientTest.java @@ -11,7 +11,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.Validations; import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.gorgoneion.Gorgoneion; import com.salesforce.apollo.gorgoneion.Parameters; import com.salesforce.apollo.gorgoneion.client.client.comm.Admissions; @@ -26,14 +26,12 @@ import com.salesforce.apollo.stereotomy.mem.MemKeyStore; import com.salesforce.apollo.stereotomy.services.proto.ProtoEventObserver; import org.junit.jupiter.api.Test; -import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import java.security.SecureRandom; import java.time.Duration; -import java.util.Collections; import java.util.UUID; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; diff --git a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/Gorgoneion.java b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/Gorgoneion.java index bf8a9a477c..6f9e4675ef 100644 --- a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/Gorgoneion.java +++ b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/Gorgoneion.java @@ -17,11 +17,11 @@ import com.salesfoce.apollo.cryptography.proto.Digeste; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.Verifier; -import com.salesforce.apollo.crypto.Verifier.DefaultVerifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.Verifier; +import com.salesforce.apollo.cryptography.Verifier.DefaultVerifier; import com.salesforce.apollo.gorgoneion.comm.GorgoneionMetrics; import com.salesforce.apollo.gorgoneion.comm.admissions.AdmissionsServer; import com.salesforce.apollo.gorgoneion.comm.admissions.AdmissionsService; diff --git a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/Parameters.java b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/Parameters.java index 2373596867..7ddacece77 100644 --- a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/Parameters.java +++ b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/Parameters.java @@ -7,7 +7,7 @@ package com.salesforce.apollo.gorgoneion; import com.salesfoce.apollo.gorgoneion.proto.SignedAttestation; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.stereotomy.KERL; import java.time.Clock; diff --git a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/admissions/AdmissionsServer.java b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/admissions/AdmissionsServer.java index 78a680ec07..3537dfe9a4 100644 --- a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/admissions/AdmissionsServer.java +++ b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/admissions/AdmissionsServer.java @@ -12,7 +12,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.KERL_; import com.salesfoce.apollo.stereotomy.event.proto.Validations; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.gorgoneion.comm.GorgoneionMetrics; import com.salesforce.apollo.protocols.ClientIdentity; diff --git a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/admissions/AdmissionsService.java b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/admissions/AdmissionsService.java index cd8c9cefc1..154d83c79c 100644 --- a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/admissions/AdmissionsService.java +++ b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/admissions/AdmissionsService.java @@ -11,7 +11,7 @@ import com.salesfoce.apollo.gorgoneion.proto.SignedNonce; import com.salesfoce.apollo.stereotomy.event.proto.KERL_; import com.salesfoce.apollo.stereotomy.event.proto.Validations; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import io.grpc.stub.StreamObserver; diff --git a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/endorsement/EndorsementServer.java b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/endorsement/EndorsementServer.java index 41f88f4b24..036125e7c4 100644 --- a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/endorsement/EndorsementServer.java +++ b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/endorsement/EndorsementServer.java @@ -14,7 +14,7 @@ import com.salesfoce.apollo.gorgoneion.proto.Notarization; import com.salesfoce.apollo.stereotomy.event.proto.Validation_; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.gorgoneion.comm.GorgoneionMetrics; import com.salesforce.apollo.protocols.ClientIdentity; import io.grpc.stub.StreamObserver; diff --git a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/endorsement/EndorsementService.java b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/endorsement/EndorsementService.java index b9fd389748..1dee788f63 100644 --- a/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/endorsement/EndorsementService.java +++ b/gorgoneion/src/main/java/com/salesforce/apollo/gorgoneion/comm/endorsement/EndorsementService.java @@ -11,7 +11,7 @@ import com.salesfoce.apollo.gorgoneion.proto.Nonce; import com.salesfoce.apollo.gorgoneion.proto.Notarization; import com.salesfoce.apollo.stereotomy.event.proto.Validation_; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/gorgoneion/src/test/java/com/salesforce/apollo/gorgoneion/GorgoneionTest.java b/gorgoneion/src/test/java/com/salesforce/apollo/gorgoneion/GorgoneionTest.java index 52e153bdb6..724fbcf870 100644 --- a/gorgoneion/src/test/java/com/salesforce/apollo/gorgoneion/GorgoneionTest.java +++ b/gorgoneion/src/test/java/com/salesforce/apollo/gorgoneion/GorgoneionTest.java @@ -15,7 +15,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.Validations; import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.gorgoneion.comm.admissions.AdmissionsServer; import com.salesforce.apollo.gorgoneion.comm.admissions.AdmissionsService; import com.salesforce.apollo.membership.Context; diff --git a/isolates/src/main/java/com/salesforce/apollo/demesnes/isolate/DemesneIsolate.java b/isolates/src/main/java/com/salesforce/apollo/demesnes/isolate/DemesneIsolate.java index 8506d4a237..91045a0be7 100644 --- a/isolates/src/main/java/com/salesforce/apollo/demesnes/isolate/DemesneIsolate.java +++ b/isolates/src/main/java/com/salesforce/apollo/demesnes/isolate/DemesneIsolate.java @@ -6,7 +6,6 @@ */ package com.salesforce.apollo.demesnes.isolate; -import static com.salesforce.apollo.comm.grpc.DomainSockets.getChannelType; import static com.salesforce.apollo.comm.grpc.DomainSockets.getEventLoopGroup; import java.io.File; @@ -37,7 +36,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.RotationEvent; import com.salesfoce.apollo.stereotomy.event.proto.RotationSpec; import com.salesfoce.apollo.cryptography.proto.Digeste; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.model.demesnes.Demesne; import com.salesforce.apollo.model.demesnes.DemesneImpl; import com.salesforce.apollo.stereotomy.EventCoordinates; @@ -45,9 +44,6 @@ import com.salesforce.apollo.stereotomy.identifier.spec.IdentifierSpecification; import com.salesforce.apollo.stereotomy.identifier.spec.RotationSpecification; -import io.netty.channel.Channel; -import io.netty.channel.EventLoopGroup; - /** * GraalVM Isolate for the Apollo SubDomain stack * diff --git a/isolates/src/test/java/com/salesforce/apollo/demesnes/DemesneSmoke.java b/isolates/src/test/java/com/salesforce/apollo/demesnes/DemesneSmoke.java index 9f6505f060..5a78ca659f 100644 --- a/isolates/src/test/java/com/salesforce/apollo/demesnes/DemesneSmoke.java +++ b/isolates/src/test/java/com/salesforce/apollo/demesnes/DemesneSmoke.java @@ -17,8 +17,8 @@ import com.salesfoce.apollo.cryptography.proto.Digeste; import com.salesforce.apollo.archipelago.*; import com.salesforce.apollo.comm.grpc.DomainSocketServerInterceptor; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.model.demesnes.DemesneImpl; @@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit; import static com.salesforce.apollo.comm.grpc.DomainSockets.*; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; /** * @author hal.hildebrand diff --git a/isolates/src/test/java/com/salesforce/apollo/demesnes/FireFliesTrace.java b/isolates/src/test/java/com/salesforce/apollo/demesnes/FireFliesTrace.java index 0914834482..b279f6257a 100644 --- a/isolates/src/test/java/com/salesforce/apollo/demesnes/FireFliesTrace.java +++ b/isolates/src/test/java/com/salesforce/apollo/demesnes/FireFliesTrace.java @@ -15,8 +15,8 @@ import com.salesforce.apollo.choam.Parameters.Builder; import com.salesforce.apollo.choam.Parameters.ProducerParameters; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.delphinius.Oracle; import com.salesforce.apollo.delphinius.Oracle.Assertion; import com.salesforce.apollo.fireflies.View; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/Communications.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/Communications.java index b43a7e7db3..b3513069f8 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/Communications.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/Communications.java @@ -7,7 +7,7 @@ package com.salesforce.apollo.archipelago; import com.salesforce.apollo.archipelago.Router.ClientConnector; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; /** diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/Enclave.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/Enclave.java index e94d5828b3..071304fe49 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/Enclave.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/Enclave.java @@ -10,7 +10,7 @@ import com.netflix.concurrency.limits.grpc.server.ConcurrencyLimitServerInterceptor; import com.netflix.concurrency.limits.grpc.server.GrpcServerLimiterBuilder; import com.salesforce.apollo.comm.grpc.DomainSocketServerInterceptor; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.protocols.ClientIdentity; import com.salesforce.apollo.protocols.LimitsRegistry; @@ -30,8 +30,8 @@ import java.util.function.Supplier; import static com.salesforce.apollo.comm.grpc.DomainSockets.*; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; /** * Enclave Server for routing from a process endpoint in the default Isolate into individual Isolates. diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/EndpointProvider.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/EndpointProvider.java index a68c1bdada..f76eac2c31 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/EndpointProvider.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/EndpointProvider.java @@ -8,7 +8,7 @@ import java.net.SocketAddress; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import com.salesforce.apollo.membership.Member; import io.netty.handler.ssl.ClientAuth; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/LocalServer.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/LocalServer.java index 9a061727e0..bc9ec5167c 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/LocalServer.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/LocalServer.java @@ -9,7 +9,7 @@ import com.netflix.concurrency.limits.Limit; import com.netflix.concurrency.limits.grpc.server.ConcurrencyLimitServerInterceptor; import com.netflix.concurrency.limits.grpc.server.GrpcServerLimiterBuilder; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.protocols.ClientIdentity; import com.salesforce.apollo.protocols.LimitsRegistry; @@ -27,8 +27,8 @@ import java.util.concurrent.Executors; import java.util.function.Supplier; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; /** * @author hal.hildebrand diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/ManagedServerChannel.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/ManagedServerChannel.java index e1f0e9d862..7635b26410 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/ManagedServerChannel.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/ManagedServerChannel.java @@ -6,13 +6,13 @@ */ package com.salesforce.apollo.archipelago; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; import java.util.concurrent.TimeUnit; import com.google.common.base.MoreObjects; import com.salesforce.apollo.archipelago.ServerConnectionCache.ReleasableManagedChannel; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import io.grpc.CallOptions; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsClient.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsClient.java index 1f6122f3e8..98e98eaf0e 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsClient.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsClient.java @@ -15,7 +15,7 @@ import com.netflix.concurrency.limits.grpc.client.GrpcClientLimiterBuilder; import com.netflix.concurrency.limits.grpc.client.GrpcClientRequestContext; import com.salesforce.apollo.comm.grpc.ClientContextSupplier; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import io.grpc.ManagedChannel; import io.grpc.Status; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsServer.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsServer.java index 44499db151..7bd34a5892 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsServer.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsServer.java @@ -13,11 +13,11 @@ import com.netflix.concurrency.limits.grpc.server.GrpcServerLimiterBuilder; import com.salesforce.apollo.comm.grpc.ClientContextSupplier; import com.salesforce.apollo.comm.grpc.ServerContextSupplier; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; -import com.salesforce.apollo.crypto.ssl.NodeKeyManagerFactory; -import com.salesforce.apollo.crypto.ssl.NodeTrustManagerFactory; -import com.salesforce.apollo.crypto.ssl.TlsInterceptor; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.ssl.NodeKeyManagerFactory; +import com.salesforce.apollo.cryptography.ssl.NodeTrustManagerFactory; +import com.salesforce.apollo.cryptography.ssl.TlsInterceptor; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.protocols.ClientIdentity; import com.salesforce.apollo.protocols.LimitsRegistry; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/Portal.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/Portal.java index 294f80ab71..95ddbfa2b6 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/Portal.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/Portal.java @@ -7,8 +7,8 @@ package com.salesforce.apollo.archipelago; import com.salesforce.apollo.comm.grpc.DomainSocketServerInterceptor; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.QualifiedBase64; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.QualifiedBase64; import com.salesforce.apollo.membership.Member; import io.grpc.*; import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/RoutableService.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/RoutableService.java index 2bb993f52f..f7148077ff 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/RoutableService.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/RoutableService.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.archipelago; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/Router.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/Router.java index eab392eb1c..40c760ab72 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/Router.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/Router.java @@ -11,7 +11,7 @@ import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; import com.salesforce.apollo.archipelago.ServerConnectionCache.CreateClientCommunications; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.protocols.ClientIdentity; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/RouterImpl.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/RouterImpl.java index 8e5e9fcfec..e619502ec9 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/RouterImpl.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/RouterImpl.java @@ -9,7 +9,7 @@ import com.netflix.concurrency.limits.Limit; import com.netflix.concurrency.limits.limit.AIMDLimit; import com.salesforce.apollo.archipelago.ServerConnectionCache.CreateClientCommunications; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.protocols.ClientIdentity; import io.grpc.*; @@ -27,8 +27,8 @@ import java.util.function.Consumer; import java.util.function.Function; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; /** * Context based GRPC routing diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/ServerConnectionCache.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/ServerConnectionCache.java index 4cb2af5a39..daebe5f4ec 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/ServerConnectionCache.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/ServerConnectionCache.java @@ -24,7 +24,7 @@ import com.codahale.metrics.Counter; import com.codahale.metrics.Meter; import com.codahale.metrics.Timer; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import io.grpc.ManagedChannel; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/StandardEpProvider.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/StandardEpProvider.java index 5e3b36c184..1cc4095049 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/StandardEpProvider.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/StandardEpProvider.java @@ -9,7 +9,7 @@ import java.net.SocketAddress; import java.util.function.Function; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import com.salesforce.apollo.membership.Member; import io.netty.handler.ssl.ClientAuth; diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/CompactContext.java b/memberships/src/main/java/com/salesforce/apollo/membership/CompactContext.java index 9d71bfad90..c2d3133226 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/CompactContext.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/CompactContext.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; /** * Compact context structure that mimics a context, but only tracks the digest diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/Context.java b/memberships/src/main/java/com/salesforce/apollo/membership/Context.java index b8513cd040..fd872d73fe 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/Context.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/Context.java @@ -17,8 +17,8 @@ import org.apache.commons.math3.random.BitsStreamGenerator; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; /** * Provides a Context for Membership and is uniquely identified by a Digest;. diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/ContextImpl.java b/memberships/src/main/java/com/salesforce/apollo/membership/ContextImpl.java index 0c9c543617..f0ad2c7c0a 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/ContextImpl.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/ContextImpl.java @@ -25,7 +25,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * Provides a Context for Membership and is uniquely identified by a Digest;. diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/Member.java b/memberships/src/main/java/com/salesforce/apollo/membership/Member.java index 81cf90e3c2..82bfe8ad10 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/Member.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/Member.java @@ -6,8 +6,8 @@ */ package com.salesforce.apollo.membership; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; -import static com.salesforce.apollo.crypto.QualifiedBase64.publicKey; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.publicKey; import java.io.InputStream; import java.net.InetSocketAddress; @@ -15,9 +15,9 @@ import java.security.cert.X509Certificate; import java.util.Map; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Verifier; /** * @author hal.hildebrand diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/Ring.java b/memberships/src/main/java/com/salesforce/apollo/membership/Ring.java index 310ed6bed2..8df434de6b 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/Ring.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/Ring.java @@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory; import com.google.common.collect.Sets; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * A ring of members. Also, too, addressable functions by Digest, for ring diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/SigningMember.java b/memberships/src/main/java/com/salesforce/apollo/membership/SigningMember.java index 38bf0ccfcf..995f2cc686 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/SigningMember.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/SigningMember.java @@ -8,8 +8,8 @@ import java.io.InputStream; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Signer; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Signer; /** * @author hal.hildebrand diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/ViewChangeListener.java b/memberships/src/main/java/com/salesforce/apollo/membership/ViewChangeListener.java index a4ae7b3125..89011299e4 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/ViewChangeListener.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/ViewChangeListener.java @@ -8,7 +8,7 @@ import java.util.List; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/impl/MemberImpl.java b/memberships/src/main/java/com/salesforce/apollo/membership/impl/MemberImpl.java index 269667ac49..ca4b7b4eb6 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/impl/MemberImpl.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/impl/MemberImpl.java @@ -13,10 +13,10 @@ import java.security.PublicKey; import java.security.cert.X509Certificate; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.membership.Member; /** diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/impl/SigningMemberImpl.java b/memberships/src/main/java/com/salesforce/apollo/membership/impl/SigningMemberImpl.java index 116d049153..c251dca7d0 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/impl/SigningMemberImpl.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/impl/SigningMemberImpl.java @@ -6,11 +6,11 @@ */ package com.salesforce.apollo.membership.impl; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.cert.CertificateWithPrivateKey; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.cert.CertificateWithPrivateKey; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; import org.joou.ULong; diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/RbcMetricsImpl.java b/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/RbcMetricsImpl.java index d8861b753f..6b0e91e8b7 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/RbcMetricsImpl.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/RbcMetricsImpl.java @@ -11,7 +11,7 @@ import com.codahale.metrics.Histogram; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.EndpointMetricsImpl; /** diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/ReliableBroadcaster.java b/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/ReliableBroadcaster.java index 0e38cc67e4..b93c4c77bd 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/ReliableBroadcaster.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/ReliableBroadcaster.java @@ -17,9 +17,9 @@ import com.salesforce.apollo.bloomFilters.BloomFilter; import com.salesforce.apollo.bloomFilters.BloomFilter.DigestBloomFilter; import com.salesforce.apollo.bloomFilters.BloomWindow; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/comms/RbcServer.java b/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/comms/RbcServer.java index 10d689d759..09959de274 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/comms/RbcServer.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/messaging/rbc/comms/RbcServer.java @@ -13,7 +13,7 @@ import com.salesfoce.apollo.messaging.proto.Reconcile; import com.salesfoce.apollo.messaging.proto.ReconcileContext; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.messaging.rbc.RbcMetrics; import com.salesforce.apollo.membership.messaging.rbc.ReliableBroadcaster.Service; import com.salesforce.apollo.protocols.ClientIdentity; diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/stereotomy/ControlledIdentifierMember.java b/memberships/src/main/java/com/salesforce/apollo/membership/stereotomy/ControlledIdentifierMember.java index fee7be5b63..7768a7ad58 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/stereotomy/ControlledIdentifierMember.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/stereotomy/ControlledIdentifierMember.java @@ -7,8 +7,8 @@ package com.salesforce.apollo.membership.stereotomy; import com.salesfoce.apollo.stereotomy.event.proto.KERL_; -import com.salesforce.apollo.crypto.*; -import com.salesforce.apollo.crypto.cert.CertificateWithPrivateKey; +import com.salesforce.apollo.cryptography.*; +import com.salesforce.apollo.cryptography.cert.CertificateWithPrivateKey; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; import com.salesforce.apollo.stereotomy.ControlledIdentifier; @@ -26,7 +26,7 @@ */ public class ControlledIdentifierMember implements SigningMember { - private final Digest id; + private final Digest id; private final ControlledIdentifier identifier; public ControlledIdentifierMember(ControlledIdentifier identifier) { diff --git a/memberships/src/main/java/com/salesforce/apollo/membership/stereotomy/IdentifierMember.java b/memberships/src/main/java/com/salesforce/apollo/membership/stereotomy/IdentifierMember.java index 18902ab5d4..078f1202ee 100644 --- a/memberships/src/main/java/com/salesforce/apollo/membership/stereotomy/IdentifierMember.java +++ b/memberships/src/main/java/com/salesforce/apollo/membership/stereotomy/IdentifierMember.java @@ -6,10 +6,10 @@ */ package com.salesforce.apollo.membership.stereotomy; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.membership.Member; import java.io.InputStream; diff --git a/memberships/src/main/java/com/salesforce/apollo/ring/RingCommunications.java b/memberships/src/main/java/com/salesforce/apollo/ring/RingCommunications.java index 2509f5d0ca..4047d31268 100644 --- a/memberships/src/main/java/com/salesforce/apollo/ring/RingCommunications.java +++ b/memberships/src/main/java/com/salesforce/apollo/ring/RingCommunications.java @@ -8,14 +8,13 @@ import com.salesforce.apollo.archipelago.Link; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.Ring; import com.salesforce.apollo.membership.Ring.IterateResult; import com.salesforce.apollo.membership.SigningMember; import com.salesforce.apollo.utils.Entropy; -import io.grpc.StatusRuntimeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/memberships/src/main/java/com/salesforce/apollo/ring/RingIterator.java b/memberships/src/main/java/com/salesforce/apollo/ring/RingIterator.java index 70da6e844c..42d20dbd7e 100644 --- a/memberships/src/main/java/com/salesforce/apollo/ring/RingIterator.java +++ b/memberships/src/main/java/com/salesforce/apollo/ring/RingIterator.java @@ -8,12 +8,11 @@ import com.salesforce.apollo.archipelago.Link; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; import com.salesforce.apollo.utils.Utils; -import io.grpc.StatusRuntimeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/memberships/src/test/java/com/salesforce/apollo/archipeligo/DemultiplexerTest.java b/memberships/src/test/java/com/salesforce/apollo/archipeligo/DemultiplexerTest.java index 29ef6bebb0..613da07415 100644 --- a/memberships/src/test/java/com/salesforce/apollo/archipeligo/DemultiplexerTest.java +++ b/memberships/src/test/java/com/salesforce/apollo/archipeligo/DemultiplexerTest.java @@ -16,7 +16,7 @@ import com.salesforce.apollo.archipelago.Demultiplexer; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.comm.grpc.DomainSocketServerInterceptor; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import io.grpc.ManagedChannel; import io.grpc.Server; import io.grpc.Status; @@ -48,7 +48,7 @@ import static com.salesforce.apollo.archipelago.RouterImpl.clientInterceptor; import static com.salesforce.apollo.comm.grpc.DomainSocketServerInterceptor.PEER_CREDENTIALS_CONTEXT_KEY; import static com.salesforce.apollo.comm.grpc.DomainSockets.*; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; import static org.junit.jupiter.api.Assertions.*; /** diff --git a/memberships/src/test/java/com/salesforce/apollo/archipeligo/EnclaveTest.java b/memberships/src/test/java/com/salesforce/apollo/archipeligo/EnclaveTest.java index 643cb18e69..cfca0d65bb 100644 --- a/memberships/src/test/java/com/salesforce/apollo/archipeligo/EnclaveTest.java +++ b/memberships/src/test/java/com/salesforce/apollo/archipeligo/EnclaveTest.java @@ -15,7 +15,7 @@ import com.salesforce.apollo.archipelago.*; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; import com.salesforce.apollo.comm.grpc.DomainSocketServerInterceptor; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.impl.SigningMemberImpl; import com.salesforce.apollo.utils.Utils; @@ -42,7 +42,7 @@ import java.util.function.Function; import static com.salesforce.apollo.comm.grpc.DomainSockets.*; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/memberships/src/test/java/com/salesforce/apollo/archipeligo/LocalServerTest.java b/memberships/src/test/java/com/salesforce/apollo/archipeligo/LocalServerTest.java index d71fd20430..c824664349 100644 --- a/memberships/src/test/java/com/salesforce/apollo/archipeligo/LocalServerTest.java +++ b/memberships/src/test/java/com/salesforce/apollo/archipeligo/LocalServerTest.java @@ -14,7 +14,7 @@ import com.salesfoce.apollo.test.proto.TestItGrpc.TestItImplBase; import com.salesforce.apollo.archipelago.*; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.impl.SigningMemberImpl; import com.salesforce.apollo.utils.Utils; diff --git a/memberships/src/test/java/com/salesforce/apollo/archipeligo/RouterTest.java b/memberships/src/test/java/com/salesforce/apollo/archipeligo/RouterTest.java index 149f9ab4eb..34108b5201 100644 --- a/memberships/src/test/java/com/salesforce/apollo/archipeligo/RouterTest.java +++ b/memberships/src/test/java/com/salesforce/apollo/archipeligo/RouterTest.java @@ -13,7 +13,7 @@ import com.salesfoce.apollo.test.proto.TestItGrpc.TestItBlockingStub; import com.salesfoce.apollo.test.proto.TestItGrpc.TestItImplBase; import com.salesforce.apollo.archipelago.*; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.impl.SigningMemberImpl; import com.salesforce.apollo.utils.Utils; diff --git a/memberships/src/test/java/com/salesforce/apollo/membership/CompactRingTest.java b/memberships/src/test/java/com/salesforce/apollo/membership/CompactRingTest.java index e3913aee80..d3ef720ee6 100644 --- a/memberships/src/test/java/com/salesforce/apollo/membership/CompactRingTest.java +++ b/memberships/src/test/java/com/salesforce/apollo/membership/CompactRingTest.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.membership; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.StereotomyImpl; import com.salesforce.apollo.stereotomy.mem.MemKERL; diff --git a/memberships/src/test/java/com/salesforce/apollo/membership/ContextTests.java b/memberships/src/test/java/com/salesforce/apollo/membership/ContextTests.java index 9a6022fd5d..6656333f4b 100644 --- a/memberships/src/test/java/com/salesforce/apollo/membership/ContextTests.java +++ b/memberships/src/test/java/com/salesforce/apollo/membership/ContextTests.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.membership; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.StereotomyImpl; import com.salesforce.apollo.stereotomy.mem.MemKERL; diff --git a/memberships/src/test/java/com/salesforce/apollo/membership/RingTest.java b/memberships/src/test/java/com/salesforce/apollo/membership/RingTest.java index 92bf389fc1..e500b127f7 100644 --- a/memberships/src/test/java/com/salesforce/apollo/membership/RingTest.java +++ b/memberships/src/test/java/com/salesforce/apollo/membership/RingTest.java @@ -24,10 +24,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.cert.Certificates; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.cert.Certificates; import com.salesforce.apollo.membership.impl.MemberImpl; import com.salesforce.apollo.utils.Utils; diff --git a/memberships/src/test/java/com/salesforce/apollo/membership/messaging/RbcTest.java b/memberships/src/test/java/com/salesforce/apollo/membership/messaging/RbcTest.java index 460c4cb611..6f0b37ac8a 100644 --- a/memberships/src/test/java/com/salesforce/apollo/membership/messaging/RbcTest.java +++ b/memberships/src/test/java/com/salesforce/apollo/membership/messaging/RbcTest.java @@ -15,8 +15,8 @@ import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; import com.salesforce.apollo.archipelago.ServerConnectionCacheMetricsImpl; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; diff --git a/model/src/main/java/com/salesforce/apollo/model/Domain.java b/model/src/main/java/com/salesforce/apollo/model/Domain.java index 3b4936e683..622c6962e0 100644 --- a/model/src/main/java/com/salesforce/apollo/model/Domain.java +++ b/model/src/main/java/com/salesforce/apollo/model/Domain.java @@ -18,9 +18,9 @@ import com.salesforce.apollo.choam.CHOAM; import com.salesforce.apollo.choam.Parameters; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Signer; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Signer; import com.salesforce.apollo.delphinius.Oracle; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; @@ -56,7 +56,7 @@ import java.util.concurrent.Executor; import java.util.concurrent.Executors; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; import static com.salesforce.apollo.model.schema.tables.Member.MEMBER; import static com.salesforce.apollo.stereotomy.schema.tables.Identifier.IDENTIFIER; import static java.nio.file.Path.of; diff --git a/model/src/main/java/com/salesforce/apollo/model/ProcessDomain.java b/model/src/main/java/com/salesforce/apollo/model/ProcessDomain.java index 07ab3efcf4..f67b50be21 100644 --- a/model/src/main/java/com/salesforce/apollo/model/ProcessDomain.java +++ b/model/src/main/java/com/salesforce/apollo/model/ProcessDomain.java @@ -15,8 +15,8 @@ import com.salesforce.apollo.choam.Parameters; import com.salesforce.apollo.choam.Parameters.Builder; import com.salesforce.apollo.comm.grpc.DomainSocketServerInterceptor; -import com.salesforce.apollo.crypto.*; -import com.salesforce.apollo.crypto.cert.CertificateWithPrivateKey; +import com.salesforce.apollo.cryptography.*; +import com.salesforce.apollo.cryptography.cert.CertificateWithPrivateKey; import com.salesforce.apollo.fireflies.View; import com.salesforce.apollo.fireflies.View.Participant; import com.salesforce.apollo.fireflies.View.ViewLifecycleListener; @@ -61,7 +61,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import static com.salesforce.apollo.comm.grpc.DomainSockets.*; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; /** * The logical domain of the current "Process" - OS and Simulation defined, 'natch. @@ -84,9 +84,9 @@ public class ProcessDomain extends Domain { private final Path communicationsDirectory; private final EventLoopGroup contextEventLoopGroup = getEventLoopGroup(); private final KerlDHT dht; - private final View foundation; - private final Map hostedDomains = new ConcurrentHashMap<>(); - private final UUID listener; + private final View foundation; + private final Map hostedDomains = new ConcurrentHashMap<>(); + private final UUID listener; private final DomainSocketAddress outerContextEndpoint; private final Server outerContextService; private final Portal portal; diff --git a/model/src/main/java/com/salesforce/apollo/model/SubDomain.java b/model/src/main/java/com/salesforce/apollo/model/SubDomain.java index 46e66b48d8..1d0573cee0 100644 --- a/model/src/main/java/com/salesforce/apollo/model/SubDomain.java +++ b/model/src/main/java/com/salesforce/apollo/model/SubDomain.java @@ -15,7 +15,7 @@ import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; import com.salesforce.apollo.choam.Parameters.Builder; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.model.comms.Delegation; @@ -39,7 +39,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; /** * @author hal.hildebrand diff --git a/model/src/main/java/com/salesforce/apollo/model/comms/DelegationService.java b/model/src/main/java/com/salesforce/apollo/model/comms/DelegationService.java index 3509ee6841..6f0dd90948 100644 --- a/model/src/main/java/com/salesforce/apollo/model/comms/DelegationService.java +++ b/model/src/main/java/com/salesforce/apollo/model/comms/DelegationService.java @@ -8,7 +8,7 @@ import com.salesfoce.apollo.demesne.proto.DelegationUpdate; import com.salesfoce.apollo.cryptography.proto.Biff; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/model/src/main/java/com/salesforce/apollo/model/demesnes/Demesne.java b/model/src/main/java/com/salesforce/apollo/model/demesnes/Demesne.java index 1d70512441..f2c3d67b1f 100644 --- a/model/src/main/java/com/salesforce/apollo/model/demesnes/Demesne.java +++ b/model/src/main/java/com/salesforce/apollo/model/demesnes/Demesne.java @@ -10,7 +10,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.EventCoords; import com.salesfoce.apollo.stereotomy.event.proto.Ident; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.event.DelegatedInceptionEvent; import com.salesforce.apollo.stereotomy.event.DelegatedRotationEvent; diff --git a/model/src/main/java/com/salesforce/apollo/model/demesnes/DemesneImpl.java b/model/src/main/java/com/salesforce/apollo/model/demesnes/DemesneImpl.java index 69d7e0ced0..327cf8f97d 100644 --- a/model/src/main/java/com/salesforce/apollo/model/demesnes/DemesneImpl.java +++ b/model/src/main/java/com/salesforce/apollo/model/demesnes/DemesneImpl.java @@ -14,10 +14,10 @@ import com.salesforce.apollo.archipelago.Enclave; import com.salesforce.apollo.choam.Parameters; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; diff --git a/model/src/main/java/com/salesforce/apollo/model/demesnes/JniBridge.java b/model/src/main/java/com/salesforce/apollo/model/demesnes/JniBridge.java index 249e6dcbe6..20eb9b6130 100644 --- a/model/src/main/java/com/salesforce/apollo/model/demesnes/JniBridge.java +++ b/model/src/main/java/com/salesforce/apollo/model/demesnes/JniBridge.java @@ -21,7 +21,7 @@ import com.salesfoce.apollo.demesne.proto.ViewChange; import com.salesfoce.apollo.stereotomy.event.proto.EventCoords; import com.salesfoce.apollo.stereotomy.event.proto.Ident; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.event.DelegatedInceptionEvent; import com.salesforce.apollo.stereotomy.event.DelegatedRotationEvent; diff --git a/model/src/main/java/com/salesforce/apollo/model/stereotomy/ShardedKERL.java b/model/src/main/java/com/salesforce/apollo/model/stereotomy/ShardedKERL.java index 74f92b64c3..d2f97387d0 100644 --- a/model/src/main/java/com/salesforce/apollo/model/stereotomy/ShardedKERL.java +++ b/model/src/main/java/com/salesforce/apollo/model/stereotomy/ShardedKERL.java @@ -9,8 +9,8 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.salesfoce.apollo.stereotomy.event.proto.KeyState_; import com.salesforce.apollo.choam.support.InvalidTransaction; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.state.Mutator; import com.salesforce.apollo.state.SqlStateMachine.CallResult; import com.salesforce.apollo.stereotomy.EventCoordinates; diff --git a/model/src/test/java/com/salesforce/apollo/model/DomainTest.java b/model/src/test/java/com/salesforce/apollo/model/DomainTest.java index f607d92868..9ca436dd23 100644 --- a/model/src/test/java/com/salesforce/apollo/model/DomainTest.java +++ b/model/src/test/java/com/salesforce/apollo/model/DomainTest.java @@ -15,8 +15,8 @@ import com.salesforce.apollo.choam.Parameters.Builder; import com.salesforce.apollo.choam.Parameters.ProducerParameters; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.delphinius.Oracle; import com.salesforce.apollo.delphinius.Oracle.Assertion; import com.salesforce.apollo.membership.ContextImpl; diff --git a/model/src/test/java/com/salesforce/apollo/model/FireFliesTest.java b/model/src/test/java/com/salesforce/apollo/model/FireFliesTest.java index 7265cd6507..cac4d491f6 100644 --- a/model/src/test/java/com/salesforce/apollo/model/FireFliesTest.java +++ b/model/src/test/java/com/salesforce/apollo/model/FireFliesTest.java @@ -15,8 +15,8 @@ import com.salesforce.apollo.choam.Parameters.Builder; import com.salesforce.apollo.choam.Parameters.ProducerParameters; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.delphinius.Oracle; import com.salesforce.apollo.fireflies.View; import com.salesforce.apollo.fireflies.View.Participant; diff --git a/model/src/test/java/com/salesforce/apollo/model/StoredProceduresTest.java b/model/src/test/java/com/salesforce/apollo/model/StoredProceduresTest.java index 9a5673d59e..8de97184b3 100644 --- a/model/src/test/java/com/salesforce/apollo/model/StoredProceduresTest.java +++ b/model/src/test/java/com/salesforce/apollo/model/StoredProceduresTest.java @@ -6,20 +6,16 @@ */ package com.salesforce.apollo.model; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.state.Emulator; import com.salesforce.apollo.stereotomy.identifier.SelfAddressingIdentifier; import org.jooq.SQLDialect; import org.jooq.impl.DSL; import org.junit.jupiter.api.Test; -import javax.xml.bind.DatatypeConverter; import java.time.Duration; import java.util.ArrayList; import java.util.Random; -import java.util.concurrent.Executor; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; import static com.salesforce.apollo.model.schema.tables.Member.MEMBER; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/model/src/test/java/com/salesforce/apollo/model/demesnes/DemesneTest.java b/model/src/test/java/com/salesforce/apollo/model/demesnes/DemesneTest.java index 904cee8a44..b5a79dc3fc 100644 --- a/model/src/test/java/com/salesforce/apollo/model/demesnes/DemesneTest.java +++ b/model/src/test/java/com/salesforce/apollo/model/demesnes/DemesneTest.java @@ -18,8 +18,8 @@ import com.salesforce.apollo.archipelago.*; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; import com.salesforce.apollo.comm.grpc.DomainSocketServerInterceptor; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.impl.SigningMemberImpl; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; @@ -67,7 +67,7 @@ import java.util.concurrent.TimeUnit; import static com.salesforce.apollo.comm.grpc.DomainSockets.*; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; import static org.junit.jupiter.api.Assertions.*; /** diff --git a/model/src/test/java/com/salesforce/apollo/model/stereotomy/ShardedKERLTest.java b/model/src/test/java/com/salesforce/apollo/model/stereotomy/ShardedKERLTest.java index 796d491c1b..e6c94f8a3a 100644 --- a/model/src/test/java/com/salesforce/apollo/model/stereotomy/ShardedKERLTest.java +++ b/model/src/test/java/com/salesforce/apollo/model/stereotomy/ShardedKERLTest.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.model.stereotomy; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.SigningThreshold.Unweighted; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.SigningThreshold.Unweighted; import com.salesforce.apollo.model.Domain; import com.salesforce.apollo.state.Emulator; import com.salesforce.apollo.stereotomy.*; @@ -31,8 +31,6 @@ import java.security.SecureRandom; import java.time.Duration; import java.util.List; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; import static org.junit.jupiter.api.Assertions.*; diff --git a/protocols/src/main/java/com/salesforce/apollo/comm/grpc/BaseServerCommunications.java b/protocols/src/main/java/com/salesforce/apollo/comm/grpc/BaseServerCommunications.java index 77e231a90b..6016e64388 100644 --- a/protocols/src/main/java/com/salesforce/apollo/comm/grpc/BaseServerCommunications.java +++ b/protocols/src/main/java/com/salesforce/apollo/comm/grpc/BaseServerCommunications.java @@ -6,12 +6,12 @@ */ package com.salesforce.apollo.comm.grpc; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; import java.util.Map; import java.util.function.Consumer; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.ClientIdentity; import io.grpc.Status; diff --git a/protocols/src/main/java/com/salesforce/apollo/comm/grpc/ClientContextSupplier.java b/protocols/src/main/java/com/salesforce/apollo/comm/grpc/ClientContextSupplier.java index 59ae6dad9b..6906c36484 100644 --- a/protocols/src/main/java/com/salesforce/apollo/comm/grpc/ClientContextSupplier.java +++ b/protocols/src/main/java/com/salesforce/apollo/comm/grpc/ClientContextSupplier.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.comm.grpc; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; diff --git a/protocols/src/main/java/com/salesforce/apollo/comm/grpc/ServerContextSupplier.java b/protocols/src/main/java/com/salesforce/apollo/comm/grpc/ServerContextSupplier.java index fc7989d856..1507f2abbb 100644 --- a/protocols/src/main/java/com/salesforce/apollo/comm/grpc/ServerContextSupplier.java +++ b/protocols/src/main/java/com/salesforce/apollo/comm/grpc/ServerContextSupplier.java @@ -9,8 +9,8 @@ import java.security.Provider; import java.security.cert.X509Certificate; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; diff --git a/protocols/src/main/java/com/salesforce/apollo/protocols/ClientIdentity.java b/protocols/src/main/java/com/salesforce/apollo/protocols/ClientIdentity.java index 08f92d4f5e..2ded9e7836 100644 --- a/protocols/src/main/java/com/salesforce/apollo/protocols/ClientIdentity.java +++ b/protocols/src/main/java/com/salesforce/apollo/protocols/ClientIdentity.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.protocols; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/protocols/src/test/java/com/salesforce/apollo/comm/grpc/MtlsClient.java b/protocols/src/test/java/com/salesforce/apollo/comm/grpc/MtlsClient.java index 1dc9b4ce76..b3519c9954 100644 --- a/protocols/src/test/java/com/salesforce/apollo/comm/grpc/MtlsClient.java +++ b/protocols/src/test/java/com/salesforce/apollo/comm/grpc/MtlsClient.java @@ -17,7 +17,7 @@ import com.netflix.concurrency.limits.grpc.client.ConcurrencyLimitClientInterceptor; import com.netflix.concurrency.limits.grpc.client.GrpcClientLimiterBuilder; import com.netflix.concurrency.limits.grpc.client.GrpcClientRequestContext; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import io.grpc.ManagedChannel; import io.grpc.Status; diff --git a/protocols/src/test/java/com/salesforce/apollo/comm/grpc/MtlsServer.java b/protocols/src/test/java/com/salesforce/apollo/comm/grpc/MtlsServer.java index 71a4825e30..864d485ddd 100644 --- a/protocols/src/test/java/com/salesforce/apollo/comm/grpc/MtlsServer.java +++ b/protocols/src/test/java/com/salesforce/apollo/comm/grpc/MtlsServer.java @@ -22,11 +22,11 @@ import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; -import com.salesforce.apollo.crypto.ssl.NodeKeyManagerFactory; -import com.salesforce.apollo.crypto.ssl.NodeTrustManagerFactory; -import com.salesforce.apollo.crypto.ssl.TlsInterceptor; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.ssl.NodeKeyManagerFactory; +import com.salesforce.apollo.cryptography.ssl.NodeTrustManagerFactory; +import com.salesforce.apollo.cryptography.ssl.TlsInterceptor; import com.salesforce.apollo.protocols.ClientIdentity; import io.grpc.BindableService; diff --git a/protocols/src/test/java/com/salesforce/apollo/comm/grpc/TestMtls.java b/protocols/src/test/java/com/salesforce/apollo/comm/grpc/TestMtls.java index 08bd3b162f..f71b3d2aba 100644 --- a/protocols/src/test/java/com/salesforce/apollo/comm/grpc/TestMtls.java +++ b/protocols/src/test/java/com/salesforce/apollo/comm/grpc/TestMtls.java @@ -10,7 +10,6 @@ import java.net.InetAddress; import java.net.InetSocketAddress; -import java.net.UnknownHostException; import java.security.KeyPair; import java.security.Provider; import java.security.cert.CertificateException; @@ -24,12 +23,12 @@ import com.google.protobuf.Any; import com.salesfoce.apollo.test.proto.TestItGrpc; import com.salesfoce.apollo.test.proto.TestItGrpc.TestItImplBase; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.cert.CertificateWithPrivateKey; -import com.salesforce.apollo.crypto.cert.Certificates; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.cert.CertificateWithPrivateKey; +import com.salesforce.apollo.cryptography.cert.Certificates; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import com.salesforce.apollo.utils.Utils; import io.grpc.stub.StreamObserver; diff --git a/schemas/src/main/resources/sql-state/internal.xml b/schemas/src/main/resources/sql-state/internal.xml index d6b135c07d..a3b7e3c74b 100644 --- a/schemas/src/main/resources/sql-state/internal.xml +++ b/schemas/src/main/resources/sql-state/internal.xml @@ -1,45 +1,59 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.4.xsd"> create schema if not exists apollo_internal + schemaName="apollo_internal"> - + - + - - + + - + - - + + + + + + + + + + + + + + schemaName="apollo_internal"> + type="IDENTITY"> + primaryKey="true" primaryKeyName="trampoline_pkey"/> - + - + - \ No newline at end of file + diff --git a/sql-state/src/main/java/com/salesforce/apollo/state/Emulator.java b/sql-state/src/main/java/com/salesforce/apollo/state/Emulator.java index a2358cc625..0b76a9e375 100644 --- a/sql-state/src/main/java/com/salesforce/apollo/state/Emulator.java +++ b/sql-state/src/main/java/com/salesforce/apollo/state/Emulator.java @@ -15,8 +15,8 @@ import com.salesforce.apollo.choam.Parameters.RuntimeParameters; import com.salesforce.apollo.choam.Session; import com.salesforce.apollo.choam.support.HashedCertifiedBlock; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.ControlledIdentifier; diff --git a/sql-state/src/main/java/com/salesforce/apollo/state/SqlStateMachine.java b/sql-state/src/main/java/com/salesforce/apollo/state/SqlStateMachine.java index 140f19c2fe..3b8fd6aa20 100644 --- a/sql-state/src/main/java/com/salesforce/apollo/state/SqlStateMachine.java +++ b/sql-state/src/main/java/com/salesforce/apollo/state/SqlStateMachine.java @@ -17,8 +17,8 @@ import com.salesforce.apollo.choam.Session; import com.salesforce.apollo.choam.support.CheckpointState; import com.salesforce.apollo.choam.support.HashedBlock; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.QualifiedBase64; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.QualifiedBase64; import com.salesforce.apollo.state.Mutator.BatchedTransactionException; import com.salesforce.apollo.state.liquibase.*; import com.salesforce.apollo.utils.Entropy; diff --git a/sql-state/src/test/java/com/salesforce/apollo/state/AbstractLifecycleTest.java b/sql-state/src/test/java/com/salesforce/apollo/state/AbstractLifecycleTest.java index e017fed59a..fae0362d83 100644 --- a/sql-state/src/test/java/com/salesforce/apollo/state/AbstractLifecycleTest.java +++ b/sql-state/src/test/java/com/salesforce/apollo/state/AbstractLifecycleTest.java @@ -18,8 +18,8 @@ import com.salesforce.apollo.choam.Parameters.Builder; import com.salesforce.apollo.choam.Parameters.ProducerParameters; import com.salesforce.apollo.choam.Parameters.RuntimeParameters; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.Member; diff --git a/sql-state/src/test/java/com/salesforce/apollo/state/CHOAMTest.java b/sql-state/src/test/java/com/salesforce/apollo/state/CHOAMTest.java index 85dc50ab66..881d094dc2 100644 --- a/sql-state/src/test/java/com/salesforce/apollo/state/CHOAMTest.java +++ b/sql-state/src/test/java/com/salesforce/apollo/state/CHOAMTest.java @@ -21,8 +21,8 @@ import com.salesforce.apollo.choam.Parameters.RuntimeParameters; import com.salesforce.apollo.choam.support.ChoamMetrics; import com.salesforce.apollo.choam.support.ChoamMetricsImpl; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.ContextImpl; import com.salesforce.apollo.membership.Member; diff --git a/sql-state/src/test/java/com/salesforce/apollo/state/MigrationTest.java b/sql-state/src/test/java/com/salesforce/apollo/state/MigrationTest.java index f07c10663a..08e6cceeaa 100644 --- a/sql-state/src/test/java/com/salesforce/apollo/state/MigrationTest.java +++ b/sql-state/src/test/java/com/salesforce/apollo/state/MigrationTest.java @@ -31,8 +31,8 @@ import com.salesfoce.apollo.state.proto.ChangeLog; import com.salesfoce.apollo.state.proto.Migration; import com.salesfoce.apollo.state.proto.Txn; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import deterministic.org.h2.jdbc.JdbcSQLSyntaxErrorException; diff --git a/sql-state/src/test/java/com/salesforce/apollo/state/MutatorTest.java b/sql-state/src/test/java/com/salesforce/apollo/state/MutatorTest.java index 9a290a79cc..1dad0db321 100644 --- a/sql-state/src/test/java/com/salesforce/apollo/state/MutatorTest.java +++ b/sql-state/src/test/java/com/salesforce/apollo/state/MutatorTest.java @@ -26,8 +26,8 @@ import com.salesfoce.apollo.state.proto.Migration; import com.salesfoce.apollo.state.proto.Txn; import com.salesforce.apollo.choam.Session; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.state.SqlStateMachine.CallResult; /** diff --git a/sql-state/src/test/java/com/salesforce/apollo/state/ScriptTest.java b/sql-state/src/test/java/com/salesforce/apollo/state/ScriptTest.java index f4075eda4e..b0820f5446 100644 --- a/sql-state/src/test/java/com/salesforce/apollo/state/ScriptTest.java +++ b/sql-state/src/test/java/com/salesforce/apollo/state/ScriptTest.java @@ -8,8 +8,8 @@ import com.salesfoce.apollo.choam.proto.Transaction; import com.salesfoce.apollo.state.proto.Txn; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import org.junit.jupiter.api.Test; import java.io.BufferedReader; diff --git a/sql-state/src/test/java/com/salesforce/apollo/state/SmokeTest.java b/sql-state/src/test/java/com/salesforce/apollo/state/SmokeTest.java index 35c019350d..acc85b304e 100644 --- a/sql-state/src/test/java/com/salesforce/apollo/state/SmokeTest.java +++ b/sql-state/src/test/java/com/salesforce/apollo/state/SmokeTest.java @@ -18,8 +18,8 @@ import deterministic.org.h2.jdbc.JdbcConnection; import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; public class SmokeTest { diff --git a/sql-state/src/test/java/com/salesforce/apollo/state/UpdaterTest.java b/sql-state/src/test/java/com/salesforce/apollo/state/UpdaterTest.java index d24bf103c6..fe72409d3c 100644 --- a/sql-state/src/test/java/com/salesforce/apollo/state/UpdaterTest.java +++ b/sql-state/src/test/java/com/salesforce/apollo/state/UpdaterTest.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.state; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; import static com.salesforce.apollo.state.Mutator.batch; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -28,8 +28,8 @@ import com.salesfoce.apollo.choam.proto.Transaction; import com.salesfoce.apollo.state.proto.Txn; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.state.SqlStateMachine.Event; /** diff --git a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/StereotomyMetricsImpl.java b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/StereotomyMetricsImpl.java index 06b2537159..d2215dc825 100644 --- a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/StereotomyMetricsImpl.java +++ b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/StereotomyMetricsImpl.java @@ -11,7 +11,7 @@ import com.codahale.metrics.Meter; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.EndpointMetricsImpl; /** diff --git a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/binder/BinderServer.java b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/binder/BinderServer.java index 0b45eed3b5..23e9311602 100644 --- a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/binder/BinderServer.java +++ b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/binder/BinderServer.java @@ -12,7 +12,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.Ident; import com.salesfoce.apollo.stereotomy.services.grpc.proto.BinderGrpc.BinderImplBase; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.ClientIdentity; import com.salesforce.apollo.stereotomy.services.grpc.StereotomyMetrics; import com.salesforce.apollo.stereotomy.services.proto.ProtoBinder; diff --git a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/kerl/KERLAdapter.java b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/kerl/KERLAdapter.java index ea86513004..36347bc6a6 100644 --- a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/kerl/KERLAdapter.java +++ b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/kerl/KERLAdapter.java @@ -7,8 +7,8 @@ package com.salesforce.apollo.stereotomy.services.grpc.kerl; import com.salesfoce.apollo.stereotomy.event.proto.*; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KERL; import com.salesforce.apollo.stereotomy.KeyState; diff --git a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/observer/EventObserver.java b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/observer/EventObserver.java index 5b8ebf9031..08cc519c83 100644 --- a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/observer/EventObserver.java +++ b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/observer/EventObserver.java @@ -7,13 +7,12 @@ package com.salesforce.apollo.stereotomy.services.grpc.observer; import java.util.List; -import java.util.concurrent.CompletableFuture; import com.salesfoce.apollo.stereotomy.event.proto.AttachmentEvent; import com.salesfoce.apollo.stereotomy.event.proto.KERL_; import com.salesfoce.apollo.stereotomy.event.proto.KeyEvent_; import com.salesfoce.apollo.stereotomy.event.proto.Validations; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/observer/EventObserverServer.java b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/observer/EventObserverServer.java index 1d03c79083..0e870c8391 100644 --- a/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/observer/EventObserverServer.java +++ b/stereotomy-services/src/main/java/com/salesforce/apollo/stereotomy/services/grpc/observer/EventObserverServer.java @@ -13,7 +13,7 @@ import com.salesfoce.apollo.stereotomy.services.grpc.proto.KERLContext; import com.salesfoce.apollo.stereotomy.services.grpc.proto.KeyEventsContext; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.ClientIdentity; import com.salesforce.apollo.stereotomy.services.grpc.StereotomyMetrics; import io.grpc.stub.StreamObserver; diff --git a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestBinder.java b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestBinder.java index 999daac31f..a3d228e172 100644 --- a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestBinder.java +++ b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestBinder.java @@ -11,8 +11,8 @@ import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.protocols.ClientIdentity; import com.salesforce.apollo.stereotomy.StereotomyImpl; diff --git a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestEventObserver.java b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestEventObserver.java index 4d9188f677..e4b6612916 100644 --- a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestEventObserver.java +++ b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestEventObserver.java @@ -13,8 +13,8 @@ import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.protocols.ClientIdentity; import com.salesforce.apollo.stereotomy.StereotomyImpl; diff --git a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestEventValidation.java b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestEventValidation.java index cb9a74aa5a..f657d23977 100644 --- a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestEventValidation.java +++ b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestEventValidation.java @@ -10,7 +10,7 @@ import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.StereotomyImpl; import com.salesforce.apollo.stereotomy.mem.MemKERL; diff --git a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestKerlService.java b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestKerlService.java index a1ce9c6148..f5dda7e51c 100644 --- a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestKerlService.java +++ b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestKerlService.java @@ -9,8 +9,8 @@ import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.*; import com.salesforce.apollo.stereotomy.event.KeyEvent; diff --git a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestResolver.java b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestResolver.java index 943f3ec336..208ba6507a 100644 --- a/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestResolver.java +++ b/stereotomy-services/src/test/java/com/salesforce/apollo/stereotomy/services/grpc/TestResolver.java @@ -11,7 +11,7 @@ import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.StereotomyImpl; import com.salesforce.apollo.stereotomy.mem.MemKERL; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/BoundIdentifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/BoundIdentifier.java index 0871b08406..13785124a4 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/BoundIdentifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/BoundIdentifier.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.stereotomy; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.stereotomy.event.EstablishmentEvent; import com.salesforce.apollo.stereotomy.identifier.Identifier; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/ControlledIdentifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/ControlledIdentifier.java index e10b960544..3c41144be8 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/ControlledIdentifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/ControlledIdentifier.java @@ -6,10 +6,10 @@ */ package com.salesforce.apollo.stereotomy; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.cert.CertExtension; -import com.salesforce.apollo.crypto.cert.CertificateWithPrivateKey; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.cert.CertExtension; +import com.salesforce.apollo.cryptography.cert.CertificateWithPrivateKey; import com.salesforce.apollo.stereotomy.KERL.EventWithAttachments; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; import com.salesforce.apollo.stereotomy.event.DelegatedRotationEvent; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/DelegatedKERL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/DelegatedKERL.java index c6c768f678..d87980e969 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/DelegatedKERL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/DelegatedKERL.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.stereotomy; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; import com.salesforce.apollo.stereotomy.event.AttachmentEvent.Attachment; import com.salesforce.apollo.stereotomy.event.KeyEvent; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/DigestKERL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/DigestKERL.java index 53194cd245..06dd1c5a05 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/DigestKERL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/DigestKERL.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.stereotomy; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.stereotomy.event.KeyEvent; /** diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/EventCoordinates.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/EventCoordinates.java index e19b4bcab6..104e5ef457 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/EventCoordinates.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/EventCoordinates.java @@ -13,8 +13,8 @@ import org.joou.ULong; import com.salesfoce.apollo.stereotomy.event.proto.EventCoords; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.stereotomy.event.KeyEvent; import com.salesforce.apollo.stereotomy.identifier.Identifier; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/EventValidation.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/EventValidation.java index e19f3d7679..d97d495c40 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/EventValidation.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/EventValidation.java @@ -10,9 +10,9 @@ import java.util.Optional; import com.google.protobuf.ByteString; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.Verifier.Filtered; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.Verifier.Filtered; import com.salesforce.apollo.stereotomy.event.EstablishmentEvent; import com.salesforce.apollo.utils.BbBackedInputStream; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KEL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KEL.java index 89847b1f16..4575b9c24b 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KEL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KEL.java @@ -7,8 +7,8 @@ package com.salesforce.apollo.stereotomy; import com.salesfoce.apollo.stereotomy.event.proto.KeyStateWithAttachments_; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; import com.salesforce.apollo.stereotomy.event.AttachmentEvent.Attachment; import com.salesforce.apollo.stereotomy.event.KeyEvent; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KERL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KERL.java index 3a484e424e..36dcdff710 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KERL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KERL.java @@ -8,7 +8,7 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.salesfoce.apollo.stereotomy.event.proto.KeyEventWithAttachments; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; import com.salesforce.apollo.stereotomy.event.AttachmentEvent.Attachment; import com.salesforce.apollo.stereotomy.event.KeyEvent; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KerlVerifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KerlVerifier.java index 57e6b7b6e6..5de68d9685 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KerlVerifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KerlVerifier.java @@ -1,8 +1,8 @@ package com.salesforce.apollo.stereotomy; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.stereotomy.identifier.Identifier; import org.joou.ULong; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KeyState.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KeyState.java index 912de7f986..31430c117d 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KeyState.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/KeyState.java @@ -14,8 +14,8 @@ import org.joou.ULong; import com.salesfoce.apollo.stereotomy.event.proto.KeyState_; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.stereotomy.event.InceptionEvent.ConfigurationTrait; import com.salesforce.apollo.stereotomy.identifier.BasicIdentifier; import com.salesforce.apollo.stereotomy.identifier.Identifier; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/ReadOnlyKERL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/ReadOnlyKERL.java index 6239798539..1c4dc0d69d 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/ReadOnlyKERL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/ReadOnlyKERL.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.stereotomy; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; import com.salesforce.apollo.stereotomy.event.KeyEvent; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/Stereotomy.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/Stereotomy.java index 7290fd5297..d7bb301eb6 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/Stereotomy.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/Stereotomy.java @@ -9,9 +9,9 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.salesfoce.apollo.cryptography.proto.Sig; import com.salesfoce.apollo.stereotomy.event.proto.EventCoords; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; import com.salesforce.apollo.stereotomy.event.DelegatedInceptionEvent; import com.salesforce.apollo.stereotomy.event.Version; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/StereotomyImpl.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/StereotomyImpl.java index 4145321368..96b8cb5e56 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/StereotomyImpl.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/StereotomyImpl.java @@ -7,12 +7,12 @@ package com.salesforce.apollo.stereotomy; import com.salesfoce.apollo.stereotomy.event.proto.KeyState_; -import com.salesforce.apollo.crypto.*; -import com.salesforce.apollo.crypto.Signer.SignerImpl; -import com.salesforce.apollo.crypto.cert.BcX500NameDnImpl; -import com.salesforce.apollo.crypto.cert.CertExtension; -import com.salesforce.apollo.crypto.cert.CertificateWithPrivateKey; -import com.salesforce.apollo.crypto.cert.Certificates; +import com.salesforce.apollo.cryptography.*; +import com.salesforce.apollo.cryptography.Signer.SignerImpl; +import com.salesforce.apollo.cryptography.cert.BcX500NameDnImpl; +import com.salesforce.apollo.cryptography.cert.CertExtension; +import com.salesforce.apollo.cryptography.cert.CertificateWithPrivateKey; +import com.salesforce.apollo.cryptography.cert.Certificates; import com.salesforce.apollo.stereotomy.KERL.EventWithAttachments; import com.salesforce.apollo.stereotomy.event.*; import com.salesforce.apollo.stereotomy.event.AttachmentEvent.AttachmentImpl; @@ -38,7 +38,7 @@ import java.time.Instant; import java.util.*; -import static com.salesforce.apollo.crypto.SigningThreshold.unweighted; +import static com.salesforce.apollo.cryptography.SigningThreshold.unweighted; import static com.salesforce.apollo.stereotomy.identifier.QualifiedBase64Identifier.qb64; /** diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/StereotomyValidator.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/StereotomyValidator.java index b9fbf7c7f1..2157d6ef84 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/StereotomyValidator.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/StereotomyValidator.java @@ -11,7 +11,7 @@ import java.security.cert.CertificateException; import java.security.cert.X509Certificate; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import com.salesforce.apollo.stereotomy.Stereotomy.Decoded; import com.salesforce.apollo.stereotomy.identifier.BasicIdentifier; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/Verifiers.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/Verifiers.java index 0e264ea371..5ec9d31fe6 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/Verifiers.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/Verifiers.java @@ -13,8 +13,8 @@ import java.util.Optional; import com.salesfoce.apollo.stereotomy.event.proto.KeyState_; -import com.salesforce.apollo.crypto.Verifier; -import com.salesforce.apollo.crypto.Verifier.DefaultVerifier; +import com.salesforce.apollo.cryptography.Verifier; +import com.salesforce.apollo.cryptography.Verifier.DefaultVerifier; import com.salesforce.apollo.stereotomy.event.InceptionEvent; import com.salesforce.apollo.stereotomy.event.protobuf.KeyStateImpl; import com.salesforce.apollo.stereotomy.event.protobuf.ProtobufEventFactory; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/caching/CachingKEL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/caching/CachingKEL.java index e496269737..9e31bca719 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/caching/CachingKEL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/caching/CachingKEL.java @@ -11,8 +11,8 @@ import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.LoadingCache; import com.github.benmanes.caffeine.cache.RemovalCause; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KEL; import com.salesforce.apollo.stereotomy.KeyCoordinates; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/caching/CachingKERL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/caching/CachingKERL.java index 0ed281d6e3..ab0e9bf1d5 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/caching/CachingKERL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/caching/CachingKERL.java @@ -8,7 +8,7 @@ package com.salesforce.apollo.stereotomy.caching; import com.github.benmanes.caffeine.cache.Caffeine; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KERL; import com.salesforce.apollo.stereotomy.KeyState; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERL.java index 8e2982ed93..33b04e08dc 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERL.java @@ -10,9 +10,9 @@ import com.salesfoce.apollo.cryptography.proto.Sig; import com.salesfoce.apollo.stereotomy.event.proto.EventCoords; import com.salesfoce.apollo.stereotomy.event.proto.Sealed; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.DigestKERL; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KeyState; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERLDirect.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERLDirect.java index bb9c7d0988..b1a7a9fd0f 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERLDirect.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERLDirect.java @@ -6,8 +6,8 @@ */ package com.salesforce.apollo.stereotomy.db; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KeyState; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERLDirectPooled.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERLDirectPooled.java index 254972900e..eb1bdb4cc3 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERLDirectPooled.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/db/UniKERLDirectPooled.java @@ -7,10 +7,10 @@ package com.salesforce.apollo.stereotomy.db; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.stereotomy.DigestKERL; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KeyCoordinates; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/AttachmentEvent.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/AttachmentEvent.java index af8d463d5b..b6522abb5b 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/AttachmentEvent.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/AttachmentEvent.java @@ -13,7 +13,7 @@ import java.util.TreeMap; import java.util.stream.Collectors; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; /** diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/EstablishmentEvent.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/EstablishmentEvent.java index 07081ef141..7ee2372e37 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/EstablishmentEvent.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/EstablishmentEvent.java @@ -10,8 +10,8 @@ import java.util.List; import java.util.Optional; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.SigningThreshold; /** * @author hal.hildebrand diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/EventSignature.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/EventSignature.java index 648a949990..e89669e2f8 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/EventSignature.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/EventSignature.java @@ -9,7 +9,7 @@ import java.util.Map; import java.util.Objects; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; /** diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/KeyEvent.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/KeyEvent.java index 753ca20e1c..5589eba813 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/KeyEvent.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/KeyEvent.java @@ -10,9 +10,9 @@ import com.salesfoce.apollo.stereotomy.event.proto.KeyEventWithAttachments.Builder; import com.salesfoce.apollo.stereotomy.event.proto.KeyEvent_; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.identifier.Identifier; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/KeyStateWithEndorsementsAndValidations.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/KeyStateWithEndorsementsAndValidations.java index 4271215c91..a8dd8ef358 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/KeyStateWithEndorsementsAndValidations.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/KeyStateWithEndorsementsAndValidations.java @@ -12,7 +12,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.KeyStateWithEndorsementsAndValidations_; import com.salesfoce.apollo.stereotomy.event.proto.Validation_; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KeyState; import com.salesforce.apollo.stereotomy.event.protobuf.KeyStateImpl; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/Seal.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/Seal.java index 7b7a5f456b..15df4ba2f0 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/Seal.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/Seal.java @@ -8,7 +8,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.EventLoc; import com.salesfoce.apollo.stereotomy.event.proto.Sealed; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.identifier.Identifier; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/AttachmentEventImpl.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/AttachmentEventImpl.java index c7690db5a8..4fbefd356e 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/AttachmentEventImpl.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/AttachmentEventImpl.java @@ -12,7 +12,7 @@ import java.util.stream.Collectors; import com.google.protobuf.ByteString; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; import com.salesforce.apollo.stereotomy.event.Seal; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/EstablishmentEventImpl.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/EstablishmentEventImpl.java index 3de814e345..6aa3aecabc 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/EstablishmentEventImpl.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/EstablishmentEventImpl.java @@ -6,8 +6,8 @@ */ package com.salesforce.apollo.stereotomy.event.protobuf; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; -import static com.salesforce.apollo.crypto.QualifiedBase64.publicKey; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.publicKey; import java.security.PublicKey; import java.util.List; @@ -17,8 +17,8 @@ import com.salesfoce.apollo.stereotomy.event.proto.Establishment; import com.salesfoce.apollo.stereotomy.event.proto.EventCommon; import com.salesfoce.apollo.stereotomy.event.proto.Header; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.stereotomy.event.EstablishmentEvent; /** diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/KeyEventImpl.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/KeyEventImpl.java index c75727e20c..86baaa14d2 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/KeyEventImpl.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/KeyEventImpl.java @@ -6,8 +6,8 @@ */ package com.salesforce.apollo.stereotomy.event.protobuf; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; -import static com.salesforce.apollo.crypto.QualifiedBase64.signature; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.signature; import static com.salesforce.apollo.stereotomy.identifier.QualifiedBase64Identifier.identifier; import org.joou.ULong; @@ -15,9 +15,9 @@ import com.google.protobuf.ByteString; import com.salesfoce.apollo.stereotomy.event.proto.EventCommon; import com.salesfoce.apollo.stereotomy.event.proto.Header; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.event.KeyEvent; import com.salesforce.apollo.stereotomy.event.Version; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/KeyStateImpl.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/KeyStateImpl.java index 0ebdb190b4..7433cd0a96 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/KeyStateImpl.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/KeyStateImpl.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.stereotomy.event.protobuf; -import static com.salesforce.apollo.crypto.QualifiedBase64.bs; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; -import static com.salesforce.apollo.crypto.QualifiedBase64.publicKey; +import static com.salesforce.apollo.cryptography.QualifiedBase64.bs; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.publicKey; import static com.salesforce.apollo.stereotomy.event.protobuf.ProtobufEventFactory.toSigningThreshold; import static com.salesforce.apollo.stereotomy.identifier.QualifiedBase64Identifier.identifier; @@ -21,9 +21,9 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.salesfoce.apollo.stereotomy.event.proto.KeyState_; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KeyState; import com.salesforce.apollo.stereotomy.event.DelegatedInceptionEvent; @@ -51,7 +51,7 @@ public static KeyState initialState(InceptionEvent event, DigestAlgorithm digest } public static KeyState newKeyState(Identifier identifier, - com.salesforce.apollo.crypto.SigningThreshold signingThreshold, + SigningThreshold signingThreshold, List keys, Digest nextKeyConfiguration, int witnessThreshold, List witnesses, Set configurationTraits, KeyEvent event, EstablishmentEvent lastEstablishmentEvent, diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/ProtobufEventFactory.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/ProtobufEventFactory.java index f392beb5a1..352bb76e31 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/ProtobufEventFactory.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/event/protobuf/ProtobufEventFactory.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.stereotomy.event.protobuf; -import static com.salesforce.apollo.crypto.QualifiedBase64.bs; +import static com.salesforce.apollo.cryptography.QualifiedBase64.bs; import static com.salesforce.apollo.stereotomy.event.KeyEvent.DELEGATED_INCEPTION_TYPE; import static com.salesforce.apollo.stereotomy.event.KeyEvent.DELEGATED_ROTATION_TYPE; import static com.salesforce.apollo.stereotomy.event.KeyEvent.INCEPTION_TYPE; @@ -28,10 +28,10 @@ import com.salesfoce.apollo.stereotomy.event.proto.RotationSpec; import com.salesfoce.apollo.stereotomy.event.proto.Version; import com.salesfoce.apollo.stereotomy.event.proto.Weights; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.SigningThreshold.Weighted.Weight; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.SigningThreshold.Weighted.Weight; import com.salesforce.apollo.stereotomy.KERL.EventWithAttachments; import com.salesforce.apollo.stereotomy.event.AttachmentEvent; import com.salesforce.apollo.stereotomy.event.AttachmentEvent.Attachment; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/BasicIdentifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/BasicIdentifier.java index 813858cd27..f4c0bd6330 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/BasicIdentifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/BasicIdentifier.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.stereotomy.identifier; -import static com.salesforce.apollo.crypto.QualifiedBase64.bs; -import static com.salesforce.apollo.crypto.QualifiedBase64.publicKey; -import static com.salesforce.apollo.crypto.QualifiedBase64.shortQb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.bs; +import static com.salesforce.apollo.cryptography.QualifiedBase64.publicKey; +import static com.salesforce.apollo.cryptography.QualifiedBase64.shortQb64; import java.io.InputStream; import java.security.PublicKey; @@ -16,9 +16,9 @@ import com.salesfoce.apollo.stereotomy.event.proto.Ident; import com.salesfoce.apollo.cryptography.proto.PubKey; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.Verifier; /** * @author hal.hildebrand diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/Identifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/Identifier.java index 585d1c36bc..6567c1d707 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/Identifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/Identifier.java @@ -6,17 +6,17 @@ */ package com.salesforce.apollo.stereotomy.identifier; -import static com.salesforce.apollo.crypto.QualifiedBase64.digest; -import static com.salesforce.apollo.crypto.QualifiedBase64.signature; +import static com.salesforce.apollo.cryptography.QualifiedBase64.digest; +import static com.salesforce.apollo.cryptography.QualifiedBase64.signature; import java.nio.ByteBuffer; import java.security.PublicKey; import com.google.protobuf.ByteString; import com.salesfoce.apollo.stereotomy.event.proto.Ident; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Signer; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Signer; import com.salesforce.apollo.stereotomy.identifier.spec.IdentifierSpecification; /** diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/QualifiedBase64Identifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/QualifiedBase64Identifier.java index 6501dd6d4f..223b5c475c 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/QualifiedBase64Identifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/QualifiedBase64Identifier.java @@ -7,18 +7,18 @@ package com.salesforce.apollo.stereotomy.identifier; import com.salesfoce.apollo.stereotomy.event.proto.Ident; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.QualifiedBase64; -import com.salesforce.apollo.crypto.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.QualifiedBase64; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KeyCoordinates; import org.joou.ULong; import java.math.BigInteger; -import static com.salesforce.apollo.crypto.DigestAlgorithm.*; -import static com.salesforce.apollo.crypto.SignatureAlgorithm.*; +import static com.salesforce.apollo.cryptography.DigestAlgorithm.*; +import static com.salesforce.apollo.cryptography.SignatureAlgorithm.*; /** * QB64 DSL for identifier conversion diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/SelfAddressingIdentifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/SelfAddressingIdentifier.java index 75993d4ea3..999a39cfd0 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/SelfAddressingIdentifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/SelfAddressingIdentifier.java @@ -9,8 +9,8 @@ import java.util.Objects; import com.salesfoce.apollo.stereotomy.event.proto.Ident; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; /** * @author hal.hildebrand diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/SelfSigningIdentifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/SelfSigningIdentifier.java index 2cb06010e2..a0a345946a 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/SelfSigningIdentifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/SelfSigningIdentifier.java @@ -9,7 +9,7 @@ import java.util.Objects; import com.salesfoce.apollo.stereotomy.event.proto.Ident; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; /** * @author hal.hildebrand diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/IdentifierSpecification.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/IdentifierSpecification.java index 8510446f0a..a5f4828f6f 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/IdentifierSpecification.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/IdentifierSpecification.java @@ -18,11 +18,11 @@ import java.util.stream.Stream; import com.salesfoce.apollo.stereotomy.event.proto.IdentifierSpec; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.stereotomy.Stereotomy; import com.salesforce.apollo.stereotomy.event.InceptionEvent.ConfigurationTrait; import com.salesforce.apollo.stereotomy.event.Version; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/InteractionSpecification.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/InteractionSpecification.java index 1a1a72a6f1..ff7271b636 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/InteractionSpecification.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/InteractionSpecification.java @@ -13,8 +13,8 @@ import org.joou.ULong; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.Signer; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.Signer; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.Stereotomy; import com.salesforce.apollo.stereotomy.event.Seal; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/KeyConfigurationDigester.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/KeyConfigurationDigester.java index ea2b108b73..f91179a63f 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/KeyConfigurationDigester.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/KeyConfigurationDigester.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.stereotomy.identifier.spec; -import static com.salesforce.apollo.crypto.QualifiedBase64.bs; +import static com.salesforce.apollo.cryptography.QualifiedBase64.bs; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; @@ -15,10 +15,10 @@ import java.util.List; import java.util.stream.Stream; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.SigningThreshold.Weighted.Weight; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.SigningThreshold.Weighted.Weight; import com.salesforce.apollo.utils.Hex; /** diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/RotationSpecification.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/RotationSpecification.java index 377fecc110..1cc1da4453 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/RotationSpecification.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/identifier/spec/RotationSpecification.java @@ -17,11 +17,11 @@ import org.joou.ULong; import com.salesfoce.apollo.stereotomy.event.proto.RotationSpec; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.Stereotomy; import com.salesforce.apollo.stereotomy.event.Seal; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/jks/JksKeyStore.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/jks/JksKeyStore.java index 59dddb9b3d..de662e958f 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/jks/JksKeyStore.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/jks/JksKeyStore.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.stereotomy.jks; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; import static com.salesforce.apollo.stereotomy.identifier.QualifiedBase64Identifier.qb64; import java.math.BigInteger; @@ -29,9 +29,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.salesforce.apollo.crypto.cert.BcX500NameDnImpl; -import com.salesforce.apollo.crypto.cert.CertExtension; -import com.salesforce.apollo.crypto.cert.Certificates; +import com.salesforce.apollo.cryptography.cert.BcX500NameDnImpl; +import com.salesforce.apollo.cryptography.cert.CertExtension; +import com.salesforce.apollo.cryptography.cert.Certificates; import com.salesforce.apollo.stereotomy.KeyCoordinates; import com.salesforce.apollo.stereotomy.StereotomyKeyStore; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/mem/MemKERL.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/mem/MemKERL.java index 2fa403357d..fc0ff114d6 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/mem/MemKERL.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/mem/MemKERL.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.stereotomy.mem; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KERL; import com.salesforce.apollo.stereotomy.KeyState; @@ -23,7 +23,7 @@ import java.util.*; import java.util.concurrent.ConcurrentHashMap; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64; import static com.salesforce.apollo.stereotomy.identifier.QualifiedBase64Identifier.qb64; /** diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/processing/KeyEventVerifier.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/processing/KeyEventVerifier.java index 65d7e7d155..64df9db1b9 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/processing/KeyEventVerifier.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/processing/KeyEventVerifier.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.stereotomy.processing; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.Verifier.DefaultVerifier; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Verifier.DefaultVerifier; import com.salesforce.apollo.stereotomy.KEL; import com.salesforce.apollo.stereotomy.KeyState; import com.salesforce.apollo.stereotomy.event.EstablishmentEvent; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/processing/Validator.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/processing/Validator.java index 87902419cc..dfcfbc35da 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/processing/Validator.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/processing/Validator.java @@ -6,10 +6,10 @@ */ package com.salesforce.apollo.stereotomy.processing; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.Verifier.DefaultVerifier; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.Verifier.DefaultVerifier; import com.salesforce.apollo.stereotomy.KEL; import com.salesforce.apollo.stereotomy.KeyState; import com.salesforce.apollo.stereotomy.event.*; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/services/Binder.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/services/Binder.java index 6cb911d644..d16d4e75f5 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/services/Binder.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/services/Binder.java @@ -8,7 +8,7 @@ import java.util.concurrent.TimeoutException; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.event.InceptionEvent; import com.salesforce.apollo.stereotomy.event.protobuf.InceptionEventImpl; import com.salesforce.apollo.stereotomy.identifier.Identifier; diff --git a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/services/proto/ProtoKERLAdapter.java b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/services/proto/ProtoKERLAdapter.java index b97540ef0e..2ceda5870d 100644 --- a/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/services/proto/ProtoKERLAdapter.java +++ b/stereotomy/src/main/java/com/salesforce/apollo/stereotomy/services/proto/ProtoKERLAdapter.java @@ -8,8 +8,8 @@ import com.google.protobuf.Empty; import com.salesfoce.apollo.stereotomy.event.proto.*; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KEL; import com.salesforce.apollo.stereotomy.KERL; diff --git a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/StereotomyTests.java b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/StereotomyTests.java index 65a5b0a344..9ec86f468e 100644 --- a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/StereotomyTests.java +++ b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/StereotomyTests.java @@ -6,11 +6,11 @@ */ package com.salesforce.apollo.stereotomy; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.SigningThreshold.Unweighted; -import com.salesforce.apollo.crypto.Verifier; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.SigningThreshold.Unweighted; +import com.salesforce.apollo.cryptography.Verifier; import com.salesforce.apollo.stereotomy.event.EstablishmentEvent; import com.salesforce.apollo.stereotomy.event.KeyEvent; import com.salesforce.apollo.stereotomy.event.Seal.CoordinatesSeal; diff --git a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/StereotomyUniKelTest.java b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/StereotomyUniKelTest.java index 465eb7bc8f..e72ac9aea4 100644 --- a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/StereotomyUniKelTest.java +++ b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/StereotomyUniKelTest.java @@ -11,7 +11,7 @@ import org.h2.jdbc.JdbcConnection; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.stereotomy.db.UniKERLDirect; import liquibase.Liquibase; diff --git a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/VerifierTest.java b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/VerifierTest.java index 9a82d54486..566e172675 100644 --- a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/VerifierTest.java +++ b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/VerifierTest.java @@ -1,6 +1,6 @@ package com.salesforce.apollo.stereotomy; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.stereotomy.mem.MemKERL; import com.salesforce.apollo.stereotomy.mem.MemKeyStore; import org.junit.jupiter.api.Test; diff --git a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/db/TestUniKERL.java b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/db/TestUniKERL.java index 66bf5946a3..7661075e33 100644 --- a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/db/TestUniKERL.java +++ b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/db/TestUniKERL.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.stereotomy.db; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Signer.SignerImpl; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Signer.SignerImpl; import com.salesforce.apollo.stereotomy.event.EstablishmentEvent; import com.salesforce.apollo.stereotomy.event.InceptionEvent; import com.salesforce.apollo.stereotomy.event.KeyEvent; @@ -36,7 +36,7 @@ import java.util.List; import java.util.Properties; -import static com.salesforce.apollo.crypto.SigningThreshold.unweighted; +import static com.salesforce.apollo.cryptography.SigningThreshold.unweighted; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/IdentifierSpecificationTests.java b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/IdentifierSpecificationTests.java index 7aa2c5c659..cdc67f9714 100644 --- a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/IdentifierSpecificationTests.java +++ b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/IdentifierSpecificationTests.java @@ -1,9 +1,9 @@ package com.salesforce.apollo.stereotomy.specification; -import com.salesforce.apollo.crypto.SignatureAlgorithm; -import com.salesforce.apollo.crypto.Signer; -import com.salesforce.apollo.crypto.Signer.SignerImpl; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.Signer; +import com.salesforce.apollo.cryptography.Signer.SignerImpl; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.stereotomy.identifier.spec.IdentifierSpecification; import org.joou.ULong; import org.junit.jupiter.api.BeforeEach; diff --git a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/KeyConfigurationDigesterTest.java b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/KeyConfigurationDigesterTest.java index 184425e52e..9dd666e29a 100644 --- a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/KeyConfigurationDigesterTest.java +++ b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/KeyConfigurationDigesterTest.java @@ -1,8 +1,8 @@ package com.salesforce.apollo.stereotomy.specification; -import static com.salesforce.apollo.crypto.SigningThreshold.group; -import static com.salesforce.apollo.crypto.SigningThreshold.unweighted; -import static com.salesforce.apollo.crypto.SigningThreshold.weighted; +import static com.salesforce.apollo.cryptography.SigningThreshold.group; +import static com.salesforce.apollo.cryptography.SigningThreshold.unweighted; +import static com.salesforce.apollo.cryptography.SigningThreshold.weighted; import static com.salesforce.apollo.stereotomy.identifier.spec.KeyConfigurationDigester.signingThresholdRepresentation; import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.jupiter.api.Assertions.assertArrayEquals; diff --git a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/QualifiedBase64Tests.java b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/QualifiedBase64Tests.java index 9d983f6298..a8417187ee 100644 --- a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/QualifiedBase64Tests.java +++ b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/QualifiedBase64Tests.java @@ -1,6 +1,6 @@ package com.salesforce.apollo.stereotomy.specification; -import static com.salesforce.apollo.crypto.QualifiedBase64.qb64Length; +import static com.salesforce.apollo.cryptography.QualifiedBase64.qb64Length; import static com.salesforce.apollo.stereotomy.identifier.QualifiedBase64Identifier.basicIdentifierPlaceholder; import static com.salesforce.apollo.stereotomy.identifier.QualifiedBase64Identifier.selfSigningIdentifierPlaceholder; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -8,8 +8,8 @@ import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SignatureAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SignatureAlgorithm; import com.salesforce.apollo.stereotomy.identifier.QualifiedBase64Identifier; public class QualifiedBase64Tests { diff --git a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/SigningThresholdsTests.java b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/SigningThresholdsTests.java index 2dde67453c..0dd0be68ea 100644 --- a/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/SigningThresholdsTests.java +++ b/stereotomy/src/test/java/com/salesforce/apollo/stereotomy/specification/SigningThresholdsTests.java @@ -1,10 +1,10 @@ package com.salesforce.apollo.stereotomy.specification; -import static com.salesforce.apollo.crypto.SigningThreshold.group; -import static com.salesforce.apollo.crypto.SigningThreshold.thresholdMet; -import static com.salesforce.apollo.crypto.SigningThreshold.unweighted; -import static com.salesforce.apollo.crypto.SigningThreshold.weight; -import static com.salesforce.apollo.crypto.SigningThreshold.weighted; +import static com.salesforce.apollo.cryptography.SigningThreshold.group; +import static com.salesforce.apollo.cryptography.SigningThreshold.thresholdMet; +import static com.salesforce.apollo.cryptography.SigningThreshold.unweighted; +import static com.salesforce.apollo.cryptography.SigningThreshold.weight; +import static com.salesforce.apollo.cryptography.SigningThreshold.weighted; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -12,8 +12,8 @@ import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.SigningThreshold.Weighted.Weight; -import com.salesforce.apollo.crypto.SigningThreshold.Weighted.Weight.WeightImpl; +import com.salesforce.apollo.cryptography.SigningThreshold.Weighted.Weight; +import com.salesforce.apollo.cryptography.SigningThreshold.Weighted.Weight.WeightImpl; public class SigningThresholdsTests { diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/Ani.java b/thoth/src/main/java/com/salesforce/apollo/thoth/Ani.java index 63689d31ab..d4655e5c2c 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/Ani.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/Ani.java @@ -7,9 +7,9 @@ package com.salesforce.apollo.thoth; -import com.salesforce.apollo.crypto.*; -import com.salesforce.apollo.crypto.Verifier.Filtered; -import com.salesforce.apollo.crypto.ssl.CertificateValidator; +import com.salesforce.apollo.cryptography.*; +import com.salesforce.apollo.cryptography.Verifier.Filtered; +import com.salesforce.apollo.cryptography.ssl.CertificateValidator; import com.salesforce.apollo.stereotomy.*; import com.salesforce.apollo.stereotomy.KEL.KeyStateWithAttachments; import com.salesforce.apollo.stereotomy.event.EstablishmentEvent; diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/CombinedIntervals.java b/thoth/src/main/java/com/salesforce/apollo/thoth/CombinedIntervals.java index 686f2eef2b..a0dfb448dc 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/CombinedIntervals.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/CombinedIntervals.java @@ -17,7 +17,7 @@ import java.util.stream.Stream; import com.salesfoce.apollo.thoth.proto.Interval; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/KerlDHT.java b/thoth/src/main/java/com/salesforce/apollo/thoth/KerlDHT.java index 58f09ba557..6091ff44f7 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/KerlDHT.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/KerlDHT.java @@ -19,8 +19,8 @@ import com.salesfoce.apollo.thoth.proto.Updating; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.Ring; diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/KerlSpace.java b/thoth/src/main/java/com/salesforce/apollo/thoth/KerlSpace.java index 6acf009316..0065c7ddc5 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/KerlSpace.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/KerlSpace.java @@ -13,9 +13,9 @@ import com.salesfoce.apollo.thoth.proto.Update; import com.salesfoce.apollo.cryptography.proto.Biff; import com.salesfoce.apollo.cryptography.proto.Digeste; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.stereotomy.DigestKERL; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KERL; diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/KeyInterval.java b/thoth/src/main/java/com/salesforce/apollo/thoth/KeyInterval.java index 68a4222c24..8d2147e27c 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/KeyInterval.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/KeyInterval.java @@ -10,7 +10,7 @@ import java.util.function.Predicate; import com.salesfoce.apollo.thoth.proto.Interval; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/Maat.java b/thoth/src/main/java/com/salesforce/apollo/thoth/Maat.java index 0e331b3c50..7ba584517b 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/Maat.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/Maat.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.thoth; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.JohnHancock; -import com.salesforce.apollo.crypto.Verifier.DefaultVerifier; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.JohnHancock; +import com.salesforce.apollo.cryptography.Verifier.DefaultVerifier; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.stereotomy.DelegatedKERL; diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/Publisher.java b/thoth/src/main/java/com/salesforce/apollo/thoth/Publisher.java index 8f32432eec..90ad3266c6 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/Publisher.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/Publisher.java @@ -13,7 +13,7 @@ import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.Router.ServiceRouting; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.SigningMember; import com.salesforce.apollo.stereotomy.services.grpc.observer.EventObserver; import com.salesforce.apollo.stereotomy.services.grpc.observer.EventObserverClient; diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/delegation/Delegation.java b/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/delegation/Delegation.java index b500f35737..32305fbf16 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/delegation/Delegation.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/delegation/Delegation.java @@ -8,7 +8,7 @@ import java.util.concurrent.CompletableFuture; -import com.salesforce.apollo.crypto.SigningThreshold; +import com.salesforce.apollo.cryptography.SigningThreshold; import com.salesforce.apollo.stereotomy.event.DelegatedInceptionEvent; import com.salesforce.apollo.stereotomy.event.DelegatedRotationEvent; import com.salesforce.apollo.stereotomy.identifier.SelfAddressingIdentifier; diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/Reconciliation.java b/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/Reconciliation.java index 27ef590398..728e0f19a3 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/Reconciliation.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/Reconciliation.java @@ -10,7 +10,7 @@ import com.salesfoce.apollo.thoth.proto.Intervals; import com.salesfoce.apollo.thoth.proto.Update; import com.salesfoce.apollo.thoth.proto.Updating; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; /** * @author hal.hildebrand diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/ReconciliationClient.java b/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/ReconciliationClient.java index afb5ad0642..2d84b4c315 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/ReconciliationClient.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/ReconciliationClient.java @@ -9,18 +9,15 @@ import java.io.IOException; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.SettableFuture; import com.google.protobuf.Empty; import com.salesfoce.apollo.thoth.proto.Intervals; import com.salesfoce.apollo.thoth.proto.ReconciliationGrpc; -import com.salesfoce.apollo.thoth.proto.ReconciliationGrpc.ReconciliationFutureStub; import com.salesfoce.apollo.thoth.proto.Update; import com.salesfoce.apollo.thoth.proto.Updating; import com.salesfoce.apollo.cryptography.proto.Digeste; import com.salesforce.apollo.archipelago.ManagedServerChannel; import com.salesforce.apollo.archipelago.ServerConnectionCache.CreateClientCommunications; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; import com.salesforce.apollo.stereotomy.services.grpc.StereotomyMetrics; diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/ReconciliationServer.java b/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/ReconciliationServer.java index d3ffc7105e..47f2337bac 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/ReconciliationServer.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/grpc/reconciliation/ReconciliationServer.java @@ -13,7 +13,7 @@ import com.salesfoce.apollo.thoth.proto.Update; import com.salesfoce.apollo.thoth.proto.Updating; import com.salesforce.apollo.archipelago.RoutableService; -import com.salesforce.apollo.crypto.Digest; +import com.salesforce.apollo.cryptography.Digest; import com.salesforce.apollo.protocols.ClientIdentity; import com.salesforce.apollo.stereotomy.services.grpc.StereotomyMetrics; diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/AbstractDhtTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/AbstractDhtTest.java index 48f225197d..ad83f13169 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/AbstractDhtTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/AbstractDhtTest.java @@ -9,9 +9,9 @@ import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.Router; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.Signer.SignerImpl; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Signer.SignerImpl; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; @@ -47,7 +47,7 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import static com.salesforce.apollo.crypto.SigningThreshold.unweighted; +import static com.salesforce.apollo.cryptography.SigningThreshold.unweighted; /** * @author hal.hildebrand diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/BootstrappingTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/BootstrappingTest.java index 9b848f30fe..5700dd1224 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/BootstrappingTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/BootstrappingTest.java @@ -11,7 +11,7 @@ import com.salesfoce.apollo.stereotomy.event.proto.Validations; import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.gorgoneion.Gorgoneion; import com.salesforce.apollo.gorgoneion.Parameters; import com.salesforce.apollo.gorgoneion.client.GorgoneionClient; diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/CombinedIntervalsTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/CombinedIntervalsTest.java index 2016b96f6a..26c3d6bee6 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/CombinedIntervalsTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/CombinedIntervalsTest.java @@ -14,8 +14,8 @@ import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.Digest; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.Digest; +import com.salesforce.apollo.cryptography.DigestAlgorithm; /** * @author hal.hildebrand diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/DhtRebalanceTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/DhtRebalanceTest.java index f3e16e494e..ea656a0123 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/DhtRebalanceTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/DhtRebalanceTest.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.thoth; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.KERL; import com.salesforce.apollo.stereotomy.Stereotomy; diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/KerlSpaceTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/KerlSpaceTest.java index 94e52e56de..0736076cb7 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/KerlSpaceTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/KerlSpaceTest.java @@ -8,7 +8,7 @@ import com.salesfoce.apollo.thoth.proto.Interval; import com.salesfoce.apollo.thoth.proto.Intervals; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.stereotomy.StereotomyImpl; import com.salesforce.apollo.stereotomy.db.UniKERLDirectPooled; import com.salesforce.apollo.stereotomy.mem.MemKeyStore; diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/KerlTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/KerlTest.java index 5bdb0b016e..6d25a52c8f 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/KerlTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/KerlTest.java @@ -6,9 +6,9 @@ */ package com.salesforce.apollo.thoth; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.SigningThreshold; -import com.salesforce.apollo.crypto.SigningThreshold.Unweighted; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.SigningThreshold; +import com.salesforce.apollo.cryptography.SigningThreshold.Unweighted; import com.salesforce.apollo.stereotomy.*; import com.salesforce.apollo.stereotomy.event.EstablishmentEvent; import com.salesforce.apollo.stereotomy.event.KeyEvent; diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/MaatTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/MaatTest.java index 9702b9fb64..09e3e9fa21 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/MaatTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/MaatTest.java @@ -14,8 +14,8 @@ import org.junit.jupiter.api.Test; -import com.salesforce.apollo.crypto.DigestAlgorithm; -import com.salesforce.apollo.crypto.JohnHancock; +import com.salesforce.apollo.cryptography.DigestAlgorithm; +import com.salesforce.apollo.cryptography.JohnHancock; import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.EventCoordinates; diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/PublisherTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/PublisherTest.java index f7c9ff3275..a6b44f6073 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/PublisherTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/PublisherTest.java @@ -10,7 +10,7 @@ import com.salesforce.apollo.archipelago.LocalServer; import com.salesforce.apollo.archipelago.RouterImpl.CommonCommunications; import com.salesforce.apollo.archipelago.ServerConnectionCache; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.membership.stereotomy.ControlledIdentifierMember; import com.salesforce.apollo.stereotomy.StereotomyImpl; import com.salesforce.apollo.stereotomy.mem.MemKERL; diff --git a/thoth/src/test/java/com/salesforce/apollo/thoth/ThothTest.java b/thoth/src/test/java/com/salesforce/apollo/thoth/ThothTest.java index 46b68a2cae..a31f5a4cc1 100644 --- a/thoth/src/test/java/com/salesforce/apollo/thoth/ThothTest.java +++ b/thoth/src/test/java/com/salesforce/apollo/thoth/ThothTest.java @@ -6,7 +6,7 @@ */ package com.salesforce.apollo.thoth; -import com.salesforce.apollo.crypto.DigestAlgorithm; +import com.salesforce.apollo.cryptography.DigestAlgorithm; import com.salesforce.apollo.stereotomy.ControlledIdentifier; import com.salesforce.apollo.stereotomy.EventCoordinates; import com.salesforce.apollo.stereotomy.Stereotomy; From 4a10f0ec43d991bbb2466bd67524cf549b723d40 Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Sun, 26 Nov 2023 17:22:15 -0800 Subject: [PATCH 2/4] consistent naming --- grpc/src/main/proto/crypto.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grpc/src/main/proto/crypto.proto b/grpc/src/main/proto/crypto.proto index 50011ec05c..316b7e7d00 100644 --- a/grpc/src/main/proto/crypto.proto +++ b/grpc/src/main/proto/crypto.proto @@ -2,8 +2,8 @@ syntax = "proto3"; option java_multiple_files = true; option java_package = "com.salesfoce.apollo.cryptography.proto"; -option java_outer_classname = "ApolloUtilsProto"; -option objc_class_prefix = "Au"; +option java_outer_classname = "ApolloCryptoProto"; +option objc_class_prefix = "Acr"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; From 8569ef57ce56c1eb3d1ceaf8eaca53651d27110a Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Sun, 26 Nov 2023 17:47:20 -0800 Subject: [PATCH 3/4] Digest.toLong() --- .../com/salesforce/apollo/cryptography/Digest.java | 4 ++++ .../apollo/cryptography/DigestAlgorithm.java | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/cryptography/src/main/java/com/salesforce/apollo/cryptography/Digest.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/Digest.java index dad1c34b2a..3bc5c7a378 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/cryptography/Digest.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/Digest.java @@ -285,6 +285,10 @@ public Digeste toDigeste() { return builder.build(); } + public long toLong() { + return algorithm.toLong(hash); + } + @Override public String toString() { String hexString = Hex.hex(getBytes()); diff --git a/cryptography/src/main/java/com/salesforce/apollo/cryptography/DigestAlgorithm.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/DigestAlgorithm.java index bfece121af..e06fa97d73 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/cryptography/DigestAlgorithm.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/DigestAlgorithm.java @@ -440,11 +440,20 @@ public Digest random(Random random) { return new Digest(digestCode(), hash); } + public long toLong(long[] hash) { + assert hash != null; + long l = 0; + for (var h : hash) { + l ^= h; + } + return l; + } + public UUID toUUID(long[] hash) { assert hash != null; return switch (hash.length) { - case 4 -> new UUID(hash[0] ^ hash[2], hash[1] ^ hash[3]); - case 8 -> toUUID(new long[] { hash[0] ^ hash[2], hash[1] ^ hash[3], hash[4] ^ hash[6], hash[5] ^ hash[7] }); + case 4 -> new UUID(hash[0] ^ hash[1], hash[2] ^ hash[3]); + case 8 -> toUUID(new long[] { hash[0] ^ hash[1], hash[2] ^ hash[3], hash[4] ^ hash[5], hash[6] ^ hash[7] }); default -> throw new IllegalArgumentException("invalid hash array size: " + hash.length); }; } From d6804d2c53f04e8cfb2f56432904306e258478ab Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Sun, 26 Nov 2023 17:58:37 -0800 Subject: [PATCH 4/4] reduce test iteratios --- .../apollo/membership/messaging/{ => rbc}/RbcTest.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) rename memberships/src/test/java/com/salesforce/apollo/membership/messaging/{ => rbc}/RbcTest.java (96%) diff --git a/memberships/src/test/java/com/salesforce/apollo/membership/messaging/RbcTest.java b/memberships/src/test/java/com/salesforce/apollo/membership/messaging/rbc/RbcTest.java similarity index 96% rename from memberships/src/test/java/com/salesforce/apollo/membership/messaging/RbcTest.java rename to memberships/src/test/java/com/salesforce/apollo/membership/messaging/rbc/RbcTest.java index 6f0b37ac8a..a88155c451 100644 --- a/memberships/src/test/java/com/salesforce/apollo/membership/messaging/RbcTest.java +++ b/memberships/src/test/java/com/salesforce/apollo/membership/messaging/rbc/RbcTest.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -package com.salesforce.apollo.membership.messaging; +package com.salesforce.apollo.membership.messaging.rbc; import com.codahale.metrics.ConsoleReporter; import com.codahale.metrics.MetricRegistry; @@ -20,9 +20,6 @@ import com.salesforce.apollo.membership.Context; import com.salesforce.apollo.membership.Member; import com.salesforce.apollo.membership.SigningMember; -import com.salesforce.apollo.membership.messaging.rbc.RbcMetrics; -import com.salesforce.apollo.membership.messaging.rbc.RbcMetricsImpl; -import com.salesforce.apollo.membership.messaging.rbc.ReliableBroadcaster; import com.salesforce.apollo.membership.messaging.rbc.ReliableBroadcaster.MessageHandler; import com.salesforce.apollo.membership.messaging.rbc.ReliableBroadcaster.Msg; import com.salesforce.apollo.membership.messaging.rbc.ReliableBroadcaster.Parameters; @@ -115,7 +112,7 @@ public void broadcast() throws Exception { view.registerHandler(receiver); receivers.put(view.getMember(), receiver); } - int rounds = LARGE_TESTS ? 100 : 50; + int rounds = LARGE_TESTS ? 100 : 5; for (int r = 0; r < rounds; r++) { CountDownLatch latch = new CountDownLatch(messengers.size()); round.set(latch);