Skip to content

Commit f3f3841

Browse files
committed
further clean up of old algorithm names
1 parent 09c1f52 commit f3f3841

File tree

2 files changed

+1
-219
lines changed

2 files changed

+1
-219
lines changed

prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/compositesignatures/KeyFactorySpi.java

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.bouncycastle.jcajce.provider.asymmetric.compositesignatures;
22

3-
import java.io.ByteArrayInputStream;
43
import java.io.IOException;
54
import java.security.GeneralSecurityException;
65
import java.security.InvalidKeyException;
@@ -19,13 +18,9 @@
1918
import java.util.Map;
2019

2120
import org.bouncycastle.asn1.ASN1BitString;
22-
import org.bouncycastle.asn1.ASN1Encodable;
2321
import org.bouncycastle.asn1.ASN1EncodableVector;
24-
import org.bouncycastle.asn1.ASN1InputStream;
25-
import org.bouncycastle.asn1.ASN1Integer;
2622
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
2723
import org.bouncycastle.asn1.ASN1OctetString;
28-
import org.bouncycastle.asn1.ASN1Primitive;
2924
import org.bouncycastle.asn1.ASN1Sequence;
3025
import org.bouncycastle.asn1.DERBitString;
3126
import org.bouncycastle.asn1.DEROctetString;
@@ -36,8 +31,6 @@
3631
import org.bouncycastle.asn1.pkcs.PrivateKeyInfo;
3732
import org.bouncycastle.asn1.sec.SECObjectIdentifiers;
3833
import org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers;
39-
import org.bouncycastle.asn1.util.ASN1Dump;
40-
import org.bouncycastle.asn1.util.DERDump;
4134
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
4235
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
4336
import org.bouncycastle.asn1.x9.X962Parameters;
@@ -84,29 +77,9 @@ public class KeyFactorySpi
8477
{
8578
pairings.put(MiscObjectIdentifiers.id_MLDSA65_RSA3072_PSS_SHA256, new AlgorithmIdentifier[]{mlDsa65, rsa});
8679
pairings.put(MiscObjectIdentifiers.id_MLDSA65_RSA3072_PKCS15_SHA256, new AlgorithmIdentifier[]{mlDsa65, rsa});
87-
pairings.put(MiscObjectIdentifiers.id_MLDSA65_RSA4096_PSS_SHA384, new AlgorithmIdentifier[]{mlDsa65, rsa});
88-
pairings.put(MiscObjectIdentifiers.id_MLDSA65_RSA4096_PKCS15_SHA384, new AlgorithmIdentifier[]{mlDsa65, rsa});
89-
pairings.put(MiscObjectIdentifiers.id_MLDSA65_ECDSA_P384_SHA384, new AlgorithmIdentifier[]{mlDsa65, ecDsaP384});
9080
pairings.put(MiscObjectIdentifiers.id_MLDSA65_ECDSA_brainpoolP256r1_SHA256, new AlgorithmIdentifier[]{mlDsa65, ecDsaBrainpoolP256r1});
91-
pairings.put(MiscObjectIdentifiers.id_MLDSA87_ECDSA_P384_SHA384, new AlgorithmIdentifier[]{mlDsa87, ecDsaP384});
92-
pairings.put(MiscObjectIdentifiers.id_MLDSA87_ECDSA_brainpoolP384r1_SHA384, new AlgorithmIdentifier[]{mlDsa87, ecDsaBrainpoolP384r1});
9381
pairings.put(MiscObjectIdentifiers.id_MLDSA87_Ed448_SHA512, new AlgorithmIdentifier[]{mlDsa87, ed448});
9482

95-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA44_RSA2048_PSS_SHA256, new AlgorithmIdentifier[]{mlDsa44, rsa});
96-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA44_RSA2048_PKCS15_SHA256, new AlgorithmIdentifier[]{mlDsa44, rsa});
97-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA44_Ed25519_SHA512, new AlgorithmIdentifier[]{mlDsa44, ed25519});
98-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA44_ECDSA_P256_SHA256, new AlgorithmIdentifier[]{mlDsa44, ecDsaP256});
99-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA65_RSA3072_PSS_SHA512, new AlgorithmIdentifier[]{mlDsa65, rsa});
100-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA65_RSA3072_PKCS15_SHA512, new AlgorithmIdentifier[]{mlDsa65, rsa});
101-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA65_RSA4096_PSS_SHA512, new AlgorithmIdentifier[]{mlDsa65, rsa});
102-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA65_RSA4096_PKCS15_SHA512, new AlgorithmIdentifier[]{mlDsa65, rsa});
103-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA65_ECDSA_P384_SHA512, new AlgorithmIdentifier[]{mlDsa65, ecDsaP384});
104-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA65_ECDSA_brainpoolP256r1_SHA512, new AlgorithmIdentifier[]{mlDsa65, ecDsaBrainpoolP256r1});
105-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA65_Ed25519_SHA512, new AlgorithmIdentifier[]{mlDsa65, ed25519});
106-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA87_ECDSA_P384_SHA512, new AlgorithmIdentifier[]{mlDsa87, ecDsaP384});
107-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA87_ECDSA_brainpoolP384r1_SHA512, new AlgorithmIdentifier[]{mlDsa87, ecDsaBrainpoolP384r1});
108-
pairings.put(MiscObjectIdentifiers.id_HashMLDSA87_Ed448_SHA512, new AlgorithmIdentifier[]{mlDsa87, ed448});
109-
11083
pairings.put(MiscObjectIdentifiers.id_MLDSA44_RSA2048_PSS_SHA256, new AlgorithmIdentifier[]{mlDsa44, rsa});
11184
pairings.put(MiscObjectIdentifiers.id_MLDSA44_RSA2048_PKCS15_SHA256, new AlgorithmIdentifier[]{mlDsa44, rsa});
11285
pairings.put(MiscObjectIdentifiers.id_MLDSA44_Ed25519_SHA512, new AlgorithmIdentifier[]{mlDsa44, ed25519});
@@ -128,29 +101,9 @@ public class KeyFactorySpi
128101

129102
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA65_RSA3072_PSS_SHA256, new int[]{1952, 256});
130103
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA65_RSA3072_PKCS15_SHA256, new int[]{1952, 256});
131-
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA65_RSA4096_PSS_SHA384, new int[]{1952, 542});
132-
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA65_RSA4096_PKCS15_SHA384, new int[]{1952, 542});
133-
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA65_ECDSA_P384_SHA384, new int[]{1952, 87});
134104
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA65_ECDSA_brainpoolP256r1_SHA256, new int[]{1952, 76});
135-
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA87_ECDSA_P384_SHA384, new int[]{2592, 87});
136-
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA87_ECDSA_brainpoolP384r1_SHA384, new int[]{2592, 87});
137105
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA87_Ed448_SHA512, new int[]{2592, Ed448.PUBLIC_KEY_SIZE});
138-
139-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA44_RSA2048_PSS_SHA256, new int[]{1328, 268});
140-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA44_RSA2048_PKCS15_SHA256, new int[]{1312, 284});
141-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA44_Ed25519_SHA512, new int[]{1312, Ed25519.PUBLIC_KEY_SIZE});
142-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA44_ECDSA_P256_SHA256, new int[]{1312, 76});
143-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA65_RSA3072_PSS_SHA512, new int[]{1952, 256});
144-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA65_RSA3072_PKCS15_SHA512, new int[]{1952, 256});
145-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA65_RSA4096_PSS_SHA512, new int[]{1952, 542});
146-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA65_RSA4096_PKCS15_SHA512, new int[]{1952, 542});
147-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA65_ECDSA_P384_SHA512, new int[]{1952, 87});
148-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA65_ECDSA_brainpoolP256r1_SHA512, new int[]{1952, 76});
149-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA65_Ed25519_SHA512, new int[]{1952, Ed25519.PUBLIC_KEY_SIZE});
150-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA87_ECDSA_P384_SHA512, new int[]{2592, 87});
151-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA87_ECDSA_brainpoolP384r1_SHA512, new int[]{2592, 87});
152-
componentKeySizes.put(MiscObjectIdentifiers.id_HashMLDSA87_Ed448_SHA512, new int[]{2592, Ed448.PUBLIC_KEY_SIZE});
153-
106+
154107
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA44_RSA2048_PSS_SHA256, new int[]{1312, 268});
155108
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA44_RSA2048_PKCS15_SHA256, new int[]{1312, 284});
156109
componentKeySizes.put(MiscObjectIdentifiers.id_MLDSA44_Ed25519_SHA512, new int[]{1312, Ed25519.PUBLIC_KEY_SIZE});

prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/compositesignatures/KeyPairGeneratorSpi.java

Lines changed: 0 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -121,132 +121,6 @@ private KeyPair getCompositeKeyPair()
121121
return new KeyPair(compositePublicKey, compositePrivateKey);
122122
}
123123

124-
public static final class HashMLDSA44_ECDSA_P256_SHA256
125-
extends KeyPairGeneratorSpi
126-
{
127-
public HashMLDSA44_ECDSA_P256_SHA256()
128-
{
129-
super(MiscObjectIdentifiers.id_HashMLDSA44_ECDSA_P256_SHA256);
130-
}
131-
}
132-
133-
public static final class HashMLDSA44_Ed25519_SHA512
134-
extends KeyPairGeneratorSpi
135-
{
136-
public HashMLDSA44_Ed25519_SHA512()
137-
{
138-
super(MiscObjectIdentifiers.id_HashMLDSA44_Ed25519_SHA512);
139-
}
140-
}
141-
142-
public static final class HashMLDSA44_RSA2048_PKCS15_SHA256
143-
extends KeyPairGeneratorSpi
144-
{
145-
public HashMLDSA44_RSA2048_PKCS15_SHA256()
146-
{
147-
super(MiscObjectIdentifiers.id_HashMLDSA44_RSA2048_PKCS15_SHA256);
148-
}
149-
}
150-
151-
public static final class HashMLDSA44_RSA2048_PSS_SHA256
152-
extends KeyPairGeneratorSpi
153-
{
154-
public HashMLDSA44_RSA2048_PSS_SHA256()
155-
{
156-
super(MiscObjectIdentifiers.id_HashMLDSA44_RSA2048_PSS_SHA256);
157-
}
158-
}
159-
160-
public static final class HashMLDSA65_ECDSA_brainpoolP256r1_SHA512
161-
extends KeyPairGeneratorSpi
162-
{
163-
public HashMLDSA65_ECDSA_brainpoolP256r1_SHA512()
164-
{
165-
super(MiscObjectIdentifiers.id_HashMLDSA65_ECDSA_brainpoolP256r1_SHA512);
166-
}
167-
}
168-
169-
public static final class HashMLDSA65_ECDSA_P384_SHA512
170-
extends KeyPairGeneratorSpi
171-
{
172-
public HashMLDSA65_ECDSA_P384_SHA512()
173-
{
174-
super(MiscObjectIdentifiers.id_HashMLDSA65_ECDSA_P384_SHA512);
175-
}
176-
}
177-
178-
public static final class HashMLDSA65_Ed25519_SHA512
179-
extends KeyPairGeneratorSpi
180-
{
181-
public HashMLDSA65_Ed25519_SHA512()
182-
{
183-
super(MiscObjectIdentifiers.id_HashMLDSA65_Ed25519_SHA512);
184-
}
185-
}
186-
187-
public static final class HashMLDSA65_RSA3072_PKCS15_SHA512
188-
extends KeyPairGeneratorSpi
189-
{
190-
public HashMLDSA65_RSA3072_PKCS15_SHA512()
191-
{
192-
super(MiscObjectIdentifiers.id_HashMLDSA65_RSA3072_PKCS15_SHA512);
193-
}
194-
}
195-
196-
public static final class HashMLDSA65_RSA3072_PSS_SHA512
197-
extends KeyPairGeneratorSpi
198-
{
199-
public HashMLDSA65_RSA3072_PSS_SHA512()
200-
{
201-
super(MiscObjectIdentifiers.id_HashMLDSA65_RSA3072_PSS_SHA512);
202-
}
203-
}
204-
205-
public static final class HashMLDSA65_RSA4096_PKCS15_SHA512
206-
extends KeyPairGeneratorSpi
207-
{
208-
public HashMLDSA65_RSA4096_PKCS15_SHA512()
209-
{
210-
super(MiscObjectIdentifiers.id_HashMLDSA65_RSA4096_PKCS15_SHA512);
211-
}
212-
}
213-
214-
public static final class HashMLDSA65_RSA4096_PSS_SHA512
215-
extends KeyPairGeneratorSpi
216-
{
217-
public HashMLDSA65_RSA4096_PSS_SHA512()
218-
{
219-
super(MiscObjectIdentifiers.id_HashMLDSA65_RSA4096_PSS_SHA512);
220-
}
221-
}
222-
223-
public static final class HashMLDSA87_ECDSA_brainpoolP384r1_SHA512
224-
extends KeyPairGeneratorSpi
225-
{
226-
public HashMLDSA87_ECDSA_brainpoolP384r1_SHA512()
227-
{
228-
super(MiscObjectIdentifiers.id_HashMLDSA87_ECDSA_brainpoolP384r1_SHA512);
229-
}
230-
}
231-
232-
public static final class HashMLDSA87_ECDSA_P384_SHA512
233-
extends KeyPairGeneratorSpi
234-
{
235-
public HashMLDSA87_ECDSA_P384_SHA512()
236-
{
237-
super(MiscObjectIdentifiers.id_HashMLDSA87_ECDSA_P384_SHA512);
238-
}
239-
}
240-
241-
public static final class HashMLDSA87_Ed448_SHA512
242-
extends KeyPairGeneratorSpi
243-
{
244-
public HashMLDSA87_Ed448_SHA512()
245-
{
246-
super(MiscObjectIdentifiers.id_HashMLDSA87_Ed448_SHA512);
247-
}
248-
}
249-
250124
public static final class MLDSA44_ECDSA_P256_SHA256
251125
extends KeyPairGeneratorSpi
252126
{
@@ -292,15 +166,6 @@ public MLDSA65_ECDSA_brainpoolP256r1_SHA256()
292166
}
293167
}
294168

295-
public static final class MLDSA65_ECDSA_P384_SHA384
296-
extends KeyPairGeneratorSpi
297-
{
298-
public MLDSA65_ECDSA_P384_SHA384()
299-
{
300-
super(MiscObjectIdentifiers.id_MLDSA65_ECDSA_P384_SHA384);
301-
}
302-
}
303-
304169
public static final class MLDSA65_Ed25519_SHA512
305170
extends KeyPairGeneratorSpi
306171
{
@@ -328,42 +193,6 @@ public MLDSA65_RSA3072_PSS_SHA256()
328193
}
329194
}
330195

331-
public static final class MLDSA65_RSA4096_PKCS15_SHA384
332-
extends KeyPairGeneratorSpi
333-
{
334-
public MLDSA65_RSA4096_PKCS15_SHA384()
335-
{
336-
super(MiscObjectIdentifiers.id_MLDSA65_RSA4096_PKCS15_SHA384);
337-
}
338-
}
339-
340-
public static final class MLDSA65_RSA4096_PSS_SHA384
341-
extends KeyPairGeneratorSpi
342-
{
343-
public MLDSA65_RSA4096_PSS_SHA384()
344-
{
345-
super(MiscObjectIdentifiers.id_MLDSA65_RSA4096_PSS_SHA384);
346-
}
347-
}
348-
349-
public static final class MLDSA87_ECDSA_brainpoolP384r1_SHA384
350-
extends KeyPairGeneratorSpi
351-
{
352-
public MLDSA87_ECDSA_brainpoolP384r1_SHA384()
353-
{
354-
super(MiscObjectIdentifiers.id_MLDSA87_ECDSA_brainpoolP384r1_SHA384);
355-
}
356-
}
357-
358-
public static final class MLDSA87_ECDSA_P384_SHA384
359-
extends KeyPairGeneratorSpi
360-
{
361-
public MLDSA87_ECDSA_P384_SHA384()
362-
{
363-
super(MiscObjectIdentifiers.id_MLDSA87_ECDSA_P384_SHA384);
364-
}
365-
}
366-
367196
public static final class MLDSA87_Ed448_SHA512
368197
extends KeyPairGeneratorSpi
369198
{

0 commit comments

Comments
 (0)