Skip to content

Commit 40c928f

Browse files
committed
Remove the deprecated NIST round 3 Classic McEliece under pqc.crypto.cmce and its BCPQC provider support, as was done for FrodoKEM, along with the deprecated getPublicKey/getPrivateKey accessors on the ISO/IEC 18033-2 FrodoKEM and CMCE parameter classes, and carry the useful coverage from the removed tests over to the ISO implementations - the non-AES wrap algorithms, KeyFactory lookup by OID, getKeySpec and key-equality round trips, and the parameter-set locked Cipher and KeyGenerator services.
1 parent b065841 commit 40c928f

67 files changed

Lines changed: 255 additions & 5571 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎core/src/main/java/org/bouncycastle/crypto/kems/CMCEKEMExtractor.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public byte[] extractSecret(byte[] encapsulation)
2929
}
3030

3131
byte[] session_key = new byte[engine.getSessionKeySize()];
32-
engine.kem_dec(session_key, encapsulation, key.getPrivateKey());
32+
engine.kem_dec(session_key, encapsulation, key.getEncoded());
3333
return session_key;
3434
}
3535

‎core/src/main/java/org/bouncycastle/crypto/kems/FrodoKEMExtractor.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public byte[] extractSecret(byte[] encapsulation)
2929
}
3030

3131
byte[] session_key = new byte[engine.getSessionKeySize()];
32-
engine.kem_dec(session_key, encapsulation, key.getPrivateKey());
32+
engine.kem_dec(session_key, encapsulation, key.getEncoded());
3333
return session_key;
3434
}
3535

‎core/src/main/java/org/bouncycastle/crypto/params/CMCEParameters.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
* 6960119 and 8192128): a base set, a semi-systematic key-generation variant ("f"), a
1313
* plaintext-confirmation variant ("pc"), and a combined variant ("pcf"). All sixteen sets use
1414
* GF(2^13) and produce a 256-bit (32-byte) session key. The non-standardised mceliece348864 size is
15-
* not provided here; it remains available (deprecated) under {@code org.bouncycastle.pqc.crypto.cmce}.
15+
* not provided; the deprecated NIST round 3 implementation that carried it, formerly under
16+
* {@code org.bouncycastle.pqc.crypto.cmce}, has been removed.
1617
*/
1718
public class CMCEParameters
1819
implements KEMParameters

‎core/src/main/java/org/bouncycastle/crypto/params/CMCEPrivateKeyParameters.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ public CMCEPrivateKeyParameters(CMCEParameters params, byte[] privateKey)
2525
this.privateKey = Arrays.clone(privateKey);
2626
}
2727

28-
/**
29-
* @deprecated use getEncoded()
30-
*/
31-
public byte[] getPrivateKey()
32-
{
33-
return getEncoded();
34-
}
35-
3628
public byte[] getEncoded()
3729
{
3830
return cloneWithCheck(privateKey);

‎core/src/main/java/org/bouncycastle/crypto/params/CMCEPublicKeyParameters.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ public CMCEPublicKeyParameters(CMCEParameters params, byte[] publicKey)
2020
this.publicKey = Arrays.clone(publicKey);
2121
}
2222

23-
/**
24-
* @deprecated use getEncoded()
25-
*/
26-
public byte[] getPublicKey()
27-
{
28-
return Arrays.clone(publicKey);
29-
}
30-
3123
public byte[] getEncoded()
3224
{
3325
return Arrays.clone(publicKey);

‎core/src/main/java/org/bouncycastle/crypto/params/FrodoKEMPrivateKeyParameters.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ public FrodoKEMPrivateKeyParameters(FrodoKEMParameters params, byte[] privateKey
2525
this.privateKey = Arrays.clone(privateKey);
2626
}
2727

28-
/**
29-
* @deprecated use getEncoded()
30-
*/
31-
public byte[] getPrivateKey()
32-
{
33-
return getEncoded();
34-
}
35-
3628
public byte[] getEncoded()
3729
{
3830
return cloneWithCheck(privateKey);

‎core/src/main/java/org/bouncycastle/crypto/params/FrodoKEMPublicKeyParameters.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ public FrodoKEMPublicKeyParameters(FrodoKEMParameters params, byte[] publicKey)
2020
this.publicKey = Arrays.clone(publicKey);
2121
}
2222

23-
/**
24-
* @deprecated use getEncoded()
25-
*/
26-
public byte[] getPublicKey()
27-
{
28-
return Arrays.clone(publicKey);
29-
}
30-
3123
public byte[] getEncoded()
3224
{
3325
return Arrays.clone(publicKey);

‎core/src/main/java/org/bouncycastle/pqc/asn1/CMCEPrivateKey.java‎

Lines changed: 0 additions & 152 deletions
This file was deleted.

‎core/src/main/java/org/bouncycastle/pqc/asn1/CMCEPublicKey.java‎

Lines changed: 0 additions & 67 deletions
This file was deleted.

‎core/src/main/java/org/bouncycastle/pqc/crypto/cmce/BENES.java‎

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)