|
9 | 9 | import org.bouncycastle.crypto.BasicAgreement; |
10 | 10 | import org.bouncycastle.crypto.CipherParameters; |
11 | 11 | import org.bouncycastle.crypto.CryptoServiceConstraintsException; |
12 | | -import org.bouncycastle.crypto.CryptoServicePurpose; |
13 | 12 | import org.bouncycastle.crypto.CryptoServicesRegistrar; |
14 | 13 | import org.bouncycastle.crypto.DSA; |
15 | 14 | import org.bouncycastle.crypto.RawAgreement; |
|
31 | 30 | import org.bouncycastle.crypto.agreement.XDHUnifiedAgreement; |
32 | 31 | import org.bouncycastle.crypto.constraints.BitsOfSecurityConstraint; |
33 | 32 | import org.bouncycastle.crypto.constraints.LegacyBitsOfSecurityConstraint; |
34 | | -import org.bouncycastle.crypto.digests.DSTU7564Digest; |
35 | 33 | import org.bouncycastle.crypto.digests.SHA1Digest; |
36 | 34 | import org.bouncycastle.crypto.digests.SHA256Digest; |
37 | | -import org.bouncycastle.crypto.engines.*; |
38 | | -import org.bouncycastle.crypto.generators.*; |
| 35 | +import org.bouncycastle.crypto.engines.CramerShoupCoreEngine; |
| 36 | +import org.bouncycastle.crypto.engines.ElGamalEngine; |
| 37 | +import org.bouncycastle.crypto.engines.NaccacheSternEngine; |
| 38 | +import org.bouncycastle.crypto.engines.RSAEngine; |
| 39 | +import org.bouncycastle.crypto.engines.SM2Engine; |
| 40 | +import org.bouncycastle.crypto.generators.CramerShoupKeyPairGenerator; |
| 41 | +import org.bouncycastle.crypto.generators.CramerShoupParametersGenerator; |
| 42 | +import org.bouncycastle.crypto.generators.DHBasicKeyPairGenerator; |
| 43 | +import org.bouncycastle.crypto.generators.DHKeyPairGenerator; |
| 44 | +import org.bouncycastle.crypto.generators.DSAKeyPairGenerator; |
| 45 | +import org.bouncycastle.crypto.generators.ECKeyPairGenerator; |
| 46 | +import org.bouncycastle.crypto.generators.Ed25519KeyPairGenerator; |
| 47 | +import org.bouncycastle.crypto.generators.Ed448KeyPairGenerator; |
| 48 | +import org.bouncycastle.crypto.generators.ElGamalKeyPairGenerator; |
| 49 | +import org.bouncycastle.crypto.generators.GOST3410KeyPairGenerator; |
| 50 | +import org.bouncycastle.crypto.generators.KDF2BytesGenerator; |
| 51 | +import org.bouncycastle.crypto.generators.NaccacheSternKeyPairGenerator; |
| 52 | +import org.bouncycastle.crypto.generators.RSAKeyPairGenerator; |
| 53 | +import org.bouncycastle.crypto.generators.X25519KeyPairGenerator; |
| 54 | +import org.bouncycastle.crypto.generators.X448KeyPairGenerator; |
39 | 55 | import org.bouncycastle.crypto.kems.ECIESKeyEncapsulation; |
40 | 56 | import org.bouncycastle.crypto.kems.RSAKeyEncapsulation; |
41 | | -import org.bouncycastle.crypto.macs.GOST28147Mac; |
42 | | -import org.bouncycastle.crypto.params.*; |
| 57 | +import org.bouncycastle.crypto.params.AsymmetricKeyParameter; |
| 58 | +import org.bouncycastle.crypto.params.CramerShoupKeyGenerationParameters; |
| 59 | +import org.bouncycastle.crypto.params.DHKeyGenerationParameters; |
| 60 | +import org.bouncycastle.crypto.params.DHMQVPrivateParameters; |
| 61 | +import org.bouncycastle.crypto.params.DHMQVPublicParameters; |
| 62 | +import org.bouncycastle.crypto.params.DHPrivateKeyParameters; |
| 63 | +import org.bouncycastle.crypto.params.DHPublicKeyParameters; |
| 64 | +import org.bouncycastle.crypto.params.DHUPrivateParameters; |
| 65 | +import org.bouncycastle.crypto.params.DHUPublicParameters; |
| 66 | +import org.bouncycastle.crypto.params.DSAKeyGenerationParameters; |
| 67 | +import org.bouncycastle.crypto.params.DSAParameters; |
| 68 | +import org.bouncycastle.crypto.params.DSAPrivateKeyParameters; |
| 69 | +import org.bouncycastle.crypto.params.DSAPublicKeyParameters; |
| 70 | +import org.bouncycastle.crypto.params.ECDHUPrivateParameters; |
| 71 | +import org.bouncycastle.crypto.params.ECDHUPublicParameters; |
| 72 | +import org.bouncycastle.crypto.params.ECDomainParameters; |
| 73 | +import org.bouncycastle.crypto.params.ECKeyGenerationParameters; |
| 74 | +import org.bouncycastle.crypto.params.ECPrivateKeyParameters; |
| 75 | +import org.bouncycastle.crypto.params.ECPublicKeyParameters; |
| 76 | +import org.bouncycastle.crypto.params.Ed25519KeyGenerationParameters; |
| 77 | +import org.bouncycastle.crypto.params.Ed448KeyGenerationParameters; |
| 78 | +import org.bouncycastle.crypto.params.ElGamalKeyGenerationParameters; |
| 79 | +import org.bouncycastle.crypto.params.ElGamalParameters; |
| 80 | +import org.bouncycastle.crypto.params.GOST3410KeyGenerationParameters; |
| 81 | +import org.bouncycastle.crypto.params.GOST3410Parameters; |
| 82 | +import org.bouncycastle.crypto.params.KeyParameter; |
| 83 | +import org.bouncycastle.crypto.params.MQVPrivateParameters; |
| 84 | +import org.bouncycastle.crypto.params.MQVPublicParameters; |
| 85 | +import org.bouncycastle.crypto.params.NaccacheSternKeyGenerationParameters; |
| 86 | +import org.bouncycastle.crypto.params.ParametersWithRandom; |
| 87 | +import org.bouncycastle.crypto.params.ParametersWithUKM; |
| 88 | +import org.bouncycastle.crypto.params.RSAKeyGenerationParameters; |
| 89 | +import org.bouncycastle.crypto.params.RSAKeyParameters; |
| 90 | +import org.bouncycastle.crypto.params.X25519KeyGenerationParameters; |
| 91 | +import org.bouncycastle.crypto.params.X448KeyGenerationParameters; |
| 92 | +import org.bouncycastle.crypto.params.XDHUPrivateParameters; |
| 93 | +import org.bouncycastle.crypto.params.XDHUPublicParameters; |
43 | 94 | import org.bouncycastle.crypto.signers.DSASigner; |
44 | 95 | import org.bouncycastle.crypto.signers.DSTU4145Signer; |
45 | 96 | import org.bouncycastle.crypto.signers.ECDSASigner; |
@@ -84,7 +135,7 @@ public void performTest() |
84 | 135 | testECIESKEM(); |
85 | 136 | testSM2Cipher(); |
86 | 137 | testCramerShoup(); |
87 | | -// testNaccacheStern(); |
| 138 | + testNaccacheStern(); |
88 | 139 | } |
89 | 140 |
|
90 | 141 | private void test1024bitDSA() |
@@ -917,7 +968,7 @@ private void testNaccacheStern() |
917 | 968 |
|
918 | 969 | kpGen.init(new NaccacheSternKeyGenerationParameters(random, 1024, 8, 40)); |
919 | 970 |
|
920 | | - CryptoServicesRegistrar.setServicesConstraints(new LegacyBitsOfSecurityConstraint(88, 80)); |
| 971 | + CryptoServicesRegistrar.setServicesConstraints(new LegacyBitsOfSecurityConstraint(128, 80)); |
921 | 972 |
|
922 | 973 | AsymmetricCipherKeyPair kp = kpGen.generateKeyPair(); |
923 | 974 |
|
|
0 commit comments