|
1 | 1 | package org.bouncycastle.openpgp.test;
|
2 | 2 |
|
3 |
| -import org.bouncycastle.bcpg.*; |
| 3 | +import org.bouncycastle.bcpg.Ed25519PublicBCPGKey; |
| 4 | +import org.bouncycastle.bcpg.Ed25519SecretBCPGKey; |
| 5 | +import org.bouncycastle.bcpg.HashAlgorithmTags; |
| 6 | +import org.bouncycastle.bcpg.PublicKeyAlgorithmTags; |
| 7 | +import org.bouncycastle.bcpg.PublicKeyPacket; |
4 | 8 | import org.bouncycastle.crypto.AsymmetricCipherKeyPair;
|
5 | 9 | import org.bouncycastle.crypto.generators.Ed25519KeyPairGenerator;
|
6 | 10 | import org.bouncycastle.crypto.params.AsymmetricKeyParameter;
|
7 | 11 | import org.bouncycastle.crypto.params.Ed25519KeyGenerationParameters;
|
8 | 12 | import org.bouncycastle.jcajce.spec.EdDSAParameterSpec;
|
9 | 13 | import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
10 |
| -import org.bouncycastle.openpgp.*; |
| 14 | +import org.bouncycastle.openpgp.PGPException; |
| 15 | +import org.bouncycastle.openpgp.PGPKeyPair; |
| 16 | +import org.bouncycastle.openpgp.PGPPublicKey; |
| 17 | +import org.bouncycastle.openpgp.PGPSignature; |
| 18 | +import org.bouncycastle.openpgp.PGPSignatureGenerator; |
11 | 19 | import org.bouncycastle.openpgp.operator.PGPContentSignerBuilder;
|
12 | 20 | import org.bouncycastle.openpgp.operator.PGPContentVerifierBuilderProvider;
|
13 |
| -import org.bouncycastle.openpgp.operator.bc.*; |
| 21 | +import org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator; |
| 22 | +import org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder; |
| 23 | +import org.bouncycastle.openpgp.operator.bc.BcPGPContentVerifierBuilderProvider; |
| 24 | +import org.bouncycastle.openpgp.operator.bc.BcPGPKeyConverter; |
| 25 | +import org.bouncycastle.openpgp.operator.bc.BcPGPKeyPair; |
14 | 26 | import org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentSignerBuilder;
|
15 | 27 | import org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentVerifierBuilderProvider;
|
16 | 28 | import org.bouncycastle.openpgp.operator.jcajce.JcaPGPKeyConverter;
|
|
20 | 32 |
|
21 | 33 | import java.io.IOException;
|
22 | 34 | import java.nio.charset.StandardCharsets;
|
23 |
| -import java.security.*; |
| 35 | +import java.security.InvalidAlgorithmParameterException; |
| 36 | +import java.security.KeyPair; |
| 37 | +import java.security.KeyPairGenerator; |
| 38 | +import java.security.NoSuchAlgorithmException; |
| 39 | +import java.security.PublicKey; |
| 40 | +import java.security.SecureRandom; |
24 | 41 | import java.util.Date;
|
25 | 42 |
|
26 | 43 | public class DedicatedEd25519KeyPairTest
|
@@ -184,7 +201,9 @@ private void testConversionOfBcKeyPair()
|
184 | 201 | date.getTime(), j2.getPublicKey().getCreationTime().getTime());
|
185 | 202 | }
|
186 | 203 |
|
187 |
| - private void testConversionOfTestVectorKey() throws PGPException, IOException { |
| 204 | + private void testConversionOfTestVectorKey() |
| 205 | + throws PGPException, IOException |
| 206 | + { |
188 | 207 | JcaPGPKeyConverter jc = new JcaPGPKeyConverter().setProvider(new BouncyCastleProvider());
|
189 | 208 | BcPGPKeyConverter bc = new BcPGPKeyConverter();
|
190 | 209 | // ed25519 public key from https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-hashed-data-stream-for-sign
|
|
0 commit comments