Migrate the removed Bouncy Castle BCPQC parameter spec classes used with camel-pqc

Apache 2.0

Camel 4.22.2 and 4.23.0 moved to Bouncy Castle 1.86, which removed the legacy org.bouncycastle.pqc.jcajce.spec parameter spec classes. Changes them to the org.bouncycastle.jcajce.spec classes of the BC provider: CMCEParameterSpec, FrodoParameterSpec to FrodoKEMParameterSpec, KyberParameterSpec to MLKEMParameterSpec, DilithiumParameterSpec to MLDSAParameterSpec and SPHINCSPlusParameterSpec to SLHDSAParameterSpec. The static parameter-set fields of the new classes carry the standardized names (for example MLKEMParameterSpec.ml_kem_768 instead of KyberParameterSpec.kyber768), so field references still need a manual fix-up. PicnicParameterSpec, PQCSignatureAlgorithms.PICNIC and PQCDefaultPicnicMaterial have no replacement.

org.apache.camel.upgrade.camel422_2.migratePqcParameterSpecs
mod run . --recipe=org.apache.camel.upgrade.camel422_2.migratePqcParameterSpecs

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change type org.bouncycastle.pqc.jcajce.spec.CMCEParameterSpec to org.bouncycastle.jcajce.spec.CMCEParameterSpec
  2. Change type FrodoParameterSpec to FrodoKEMParameterSpec
  3. Change type KyberParameterSpec to MLKEMParameterSpec
  4. Change type DilithiumParameterSpec to MLDSAParameterSpec
  5. Change type SPHINCSPlusParameterSpec to SLHDSAParameterSpec