Deprecated API
Contents
-
Deprecated Packages
-
Deprecated InterfacesInterfaceDescriptionNow believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.No longer usedobsolete pre-1.4 cause-chaining shim; use the org.bouncycastle.jcajce.provider.util.SecurityExceptions factories (certPathValidatorException / certPathBuilderException / certificateEncodingException) or the standard java.security.cert exceptions directly.just use DHPublicKey.use MQVParameterSpec for passing the ephemeral key.use MQVParameterSpec for passing the ephemeral key.use
LMSKeyinstead.useLMSPrivateKeyinstead.it's better to avoid this and use extractKeyShard methods where possible.use X509CertificateHolder class in the PKIX package.
-
Deprecated ClassesClassDescriptionWill be removeduse RSAPrivateKeyuse ECPrivateKeyuse ASN1Dump.use PrivateKeyPossessionStatementuse org.bouncycastle.asn1.pkcs.RSAPublicKeyuse TBSCertificateuse org.bouncycastle.asn1.x509.Certificateuse Extensionuse
ExtensionandExtensionsuse org.bouncycastle.asn1.x509.ExtensionsGeneratoruse org.bouncycastle.asn1.x500.X500Name.use X500NameTokenizeruse DomainParametersuse ValidationParamsuse Ascon Hash 256 DigestNow superseded - please use AsconXof128unfortunately this class is has a few side channel issues. In an environment where encryption/decryption may be closely observed it should not be used.Now superseded. Please refer toAsconAEAD128(the SP 800-232 version) for future implementations.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.use ECIESKEMGenerator, ECIESKEMExtractoruse RSAKEMGenerator, RSAKEMExtractoruse org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher instead.use AEADParametersNow believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Dual_EC_DRBG was withdrawn from SP 800-90A in Revision 1 (2015); seeDualECSP800DRBG.Dual_EC_DRBG was withdrawn from SP 800-90A in Revision 1 (2015) and is not an approved DRBG; useHashSP800DRBG,HMacSP800DRBGorCTRSP800DRBG. It will be removed in a future release.UseECGOST3410Signerinstead.use org.bouncycastle.util.packThis class does not support configuration on creation, use BCFKSLoadStoreParameter for best results.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.Now believed unsafe to use - will be removed in a future release.use org.bouncycastle.jcajce.PKCS12StoreParameterclass appears to be no longer in use, maybe getting imported by others though.Now believed unsafe to use - will be removed in a future release.creation of new legacy generic composite (id_alg_composite) signatures is no longer supported byorg.bouncycastle.operator.jcajce.JcaContentSignerBuilder- use a modern fixed-algorithm Composite ML-DSA key/signature algorithm instead.use KTSParameterSpecuse classes in org.bouncycastle.pkcs.Replaced byorg.bouncycastle.pkcs.util.PKCS12Util; this class does not understand RFC 9579 PBMAC1-protected PKCS#12 files (it throws UnsupportedOperationException for them) and will be removed in a future release.use org.bouncycastle.jcajce.config.PKCS12StoreParameterDo not use this class directly - either use org.bouncycastle.cert (bcpkix) or CertificateFactory.use CertificateFactory or the PEMParser in the openssl package (pkix jar).Do not use this class directly - either use org.bouncycastle.cert (bcpkix) or CertificateFactory.use org.bouncycastle.jcajce.spec.GOST28147ParameterSpecuse super class org.bouncycastle.jcajce.spec.RepeatedSecretKeySpecuse the X500Name class.useLMSinstead.useBCLMSPrivateKeyinstead.useBCLMSPublicKeyinstead.useLMSKeyFactorySpiinstead.useLMSKeyPairGeneratorSpiinstead.useLMSSignatureSpiinstead.use org.bouncycastle.jcajce.util.SpecUtiluseXMSSinstead.useBCXMSSMTPrivateKeyinstead.useBCXMSSMTPublicKeyinstead.useBCXMSSPrivateKeyinstead.useBCXMSSPublicKeyinstead.useXMSSKeyFactorySpiinstead.useXMSSKeyPairGeneratorSpiinstead.useXMSSMTKeyFactorySpiinstead.useXMSSMTKeyPairGeneratorSpiinstead.useXMSSMTSignatureSpiinstead.useXMSSSignatureSpiinstead.useLMSHSSKeyGenParameterSpecinstead.use LMSKeyGenParameterSpecuseLMSKeyGenParameterSpecinstead.use LMSKeyGenParameterSpecuseXMSSMTParameterSpecinstead.useXMSSParameterSpecinstead.moved toGF16; this type now delegates there and will be removed in a future release.use org.bouncycastle.cert.AttributeCertificateHolderuse org.bouncycastle.cert.AttributeCertificateIssueruse PKIXExtendedBuilderParametersuse PKIXExtendedParametersuse JcaX509ExtensionUtils and AuthorityKeyIdentifier.getInstance()use org.bouncycastle.cert.jcajce.JcaX509ExtensionUtilsuse org.bouncycastle.pkix.jcajce.PKIXCertPathReviewer in the bcpkix packagesee X509CertificateHolder class in the PKIX package.use org.bouncycastle.cert.X509AttributeCertificateSelector and org.bouncycastle.cert.X509AttributeCertificateSelectorBuilder.use the classes under org.bouncycastle.cert.selectoruse CollectionStore - this class will be removed.use org.bouncycastle.cert.X509v1CertificateBuilder.use org.bouncycastle.cert.X509AttributeCertificateHolderuse org.bouncycastle.cert.X509v2CRLBuilder.use org.bouncycastle.cert.X509v3CertificateBuilder.
-
Deprecated Enum ClassesEnum ClassDescriptionno longer selects anything. Mode.Table indexed log/exp tables with the secret being split and with the share bytes, so which cache line it touched revealed them; both values now use the same constant-time arithmetic. Use
ShamirSecretSplitter.getInstance(Algorithm, int, SecureRandom), which takes no mode.
-
Deprecated Exception ClassesException ClassDescriptionuse org.bouncycastle.crypto.ExhaustedPrivateKeyException instead. This class now extends it, so a catch of the replacement catches this one as well.
-
Deprecated FieldsFieldDescriptiondraft-ietf-lamps-certdiscovery-04 removed the intent field from RelatedCertificateDescriptor and with it the id-rcd arc; nothing in BC uses these values and they will be removed.removed with the intent field in draft-ietf-lamps-certdiscovery-04, see
BCObjectIdentifiers.id_rcd.removed with the intent field in draft-ietf-lamps-certdiscovery-04, seeBCObjectIdentifiers.id_rcd.removed with the intent field in draft-ietf-lamps-certdiscovery-04, seeBCObjectIdentifiers.id_rcd.removed with the intent field in draft-ietf-lamps-certdiscovery-04, seeBCObjectIdentifiers.id_rcd.removed with the intent field in draft-ietf-lamps-certdiscovery-04, seeBCObjectIdentifiers.id_rcd.use id_MLKEM1024_ECDH_brainpoolP384r1_SHA3_256 insteaduse id_MLKEM768_ECDH_brainpoolP256r1_SHA3_256 insteaduse id_aa_ets_commitmentType insteaduse id_aa_ets_otherSigCert insteaduse id_aa_ets_signerLocation insteaduse id_aa_ets_sigPolicyId insteaduse smime_alg insteaduse id_spq_oid insteaduse pbeWithSHAAnd40BitRC2_CBCuse x509Certificate insteaduse SERIALNUMBER or SURNAMEuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse lower case versionuse statementOfPossessionuse id_at_roleuse X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use X509Extension value.use a X500NameStyleuse a X500NameStyleuse a X500NameStyleuse a X500NameStyleuse DefaultSymbolsuse a X500NameStyleuse DefaultLookUpuse a X500NameStyleUse CRMFObjectIdentifiers.passwordBasedMac insteaduse NOT_STRICT_LENGTH_ENABLED_PROPERTYuse kem_P384_SHA384use ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse ISOTrailersuse xmss_mt_SHA256phuse xmss_mt_SHA512phuse xmss_mt_SHAKE128phuse xmss_mt_SHAKE256phuse xmss_SHA256phuse xmss_SHA512phuse xmss_SHAKE128phuse xmss_SHAKE256phobsolete to be removed
-
Deprecated MethodsMethodDescriptionWill be removedWill be removedNo longer used; will be removedNo longer used; will be removeduse getHash(), the internal encoding is now an OCTET STRINGuse getKeySizeUse
CrlID.getCrlUrlIA5()instead.UseAuthorityKeyIdentifier.getKeyIdentifierOctets()instead.Use getValidityObject instead.Use DeltaCertificateTool#trimDeltaCertificateDescriptor instead.Use addExtensions instead.UseBiometricData.getSourceDataUriIA5()instead.use getAlgorithm()use parsePublicKeyuse X500Name methoduse X500Name methoduse method taking Extensionsuse the method taking Extensionsuse X500Name methoduse method taking Extensionsuse X500Name methoduse X500Name methodWill be removedx is a private ephemeral value, and this method has no q to randomise the exponent with, so it falls back to a multiple of p-1 - always sound, but it grows the exponent from the size of q to the size of p. UseJPAKEUtil.calculateGx(BigInteger, BigInteger, BigInteger, BigInteger, SecureRandom)instead.Use version including the modulus instead.Will be removedWill be removedas a direct replacement useBCrypt.generate(byte[], byte[], int, boolean)so the terminator choice is explicit at the call site — passtrueto have the spec-required 0x00 terminator appended (equivalent to feedingpwInputthroughBCrypt.passwordToByteArray(char[])),falsewhen the supplied bytes already include it. For general password hashing preferOpenBSDBCrypt, which handles termination, salt formatting and the modular crypt output line; this raw primitive remains available for test-vector validation and interop with implementations that emit the 24-byte hash directly (issue #1741).H2 is used only in signing and verification, whichSM9Signernow does without this method, hashing the message as it is given rather than taking M || w in one array.use ECIESKEMExtractoruse ECIESKEMExtractoruse ECIESKEMGeneratoruse ECIESKEMGeneratoruse overload that doesn't take a public keyuse overload that doesn't take a public keyuseLMSPrivateKeyParameters.getEncoded()instead. A seed handed out alone is a second copy of the key with no index attached - the state duplication SP 800-208 rules out - whereas the encoding carries the index, usage limit and tree cache with it.UseMLDSAPrivateKeyParameters.withPreferredFormat(int)instead.UseMLDSAPrivateKeyParameters.getEncoded()instead.UseMLKEMPrivateKeyParameters.withPreferredFormat(int)instead.use getEncoded() - this method will become private.use getEncoded() - this method will become private.use getEncoded() - this method will become private.use getEncoded() - this method will become private.useLMSPublicKeyParameters.generateLMSContext(byte[])instead.Use 'getValidityDate' instead (which can return null).replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with "#engineSetParameter(java.security.spec.AlgorithmParameterSpec)"replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with engineGetParameters()replaced with "#engineSetParameter(java.security.spec.AlgorithmParameterSpec)"replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)org.bouncycastle.jcajce.provider.asymmetric.xmss.XMSSSignatureSpi.engineSetParameter(String, Object) replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)use getSBox()Use createMessageDigest insteadUse createMessageDigest insteaduse AlgorithmParametersUtils.extractParameters(AlgorithmParameters params)use MessageDigestUtils,getDigestName()use AlgorithmParametersUtils.loadParameters(AlgorithmParameters params, ASN1Encodable sParams)Use createMessageDigest insteadUse createMessageDigest insteadNothing in the library calls this method. UseNat256.isZero(int[])instead: an element is 0 exactly when its Montgomery form is.Nothing in the library calls this method. UseSM9P256V1Field.square(int[], int[])n times instead.Nothing in the library calls this method. UseSM9P256V1Field.add(int[], int[], int[])with x as both operands instead.UseX25519Field.decode255(byte[], int[])instead.UseX25519Field.decode255(byte[], int, int[], int)instead.UseX25519Field.decode255(byte[], int, int[], int)instead.UseX25519Field.decode255(int[], int, int[], int)instead.UseX448Field.decode448(byte[], int[])instead.UseX448Field.decode448(byte[], int, int[], int)instead.UseX448Field.decode448(byte[], int, int[], int)instead.UseX448Field.decode448(int[], int, int[], int)instead.replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with engineSetParameter(AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced withSignatureSpi.engineGetParameters().replaced withSignatureSpi.engineSetParameter(AlgorithmParameterSpec).replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)UseDilithiumPrivateKeyParameters.getEncoded()instead.UseSPHINCSPlusParameters.getID()insteaduse the SHAKE based version.useGF16.inv(byte).useGF16.mul(byte, byte).useGF16.mul(int, int).UseNat.xorTo64(int, long[], int, long[], int)instead.use addStore().use org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils.parseExtensionValue()use org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils.getIssuerAlternativeNames()use org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils.getSubjectAlternativeNames()use generate(key, "BC")use generate()use generate()use generate(key, random, "BC")use generate(key, "BC")use generate()use generate()use generate(key, random, "BC")use generate(key, "BC")use generate()use generate()use generate(key, random, "BC")
-
Deprecated ConstructorsConstructorDescriptionUse
DERExternal.fromVector(ASN1EncodableVector)instead.UseDERExternal.fromSequence(ASN1Sequence)instead.UseDLExternal.fromVector(ASN1EncodableVector)instead.UseDLExternal.fromSequence(ASN1Sequence)instead.use method taking Extensionsuse method taking ASN1GeneralizedTime and Extensionsuse method taking Extensionsuse getInstance()use X500Name method.use the getInstance() method that takes a style.create the extension using org.bouncycastle.cert.X509ExtensionUtilscreate the extension using org.bouncycastle.cert.X509ExtensionUtilsuse KeyPurposeId[] constructor.use X500Name constructor.use CertPolicyId constructors.use PolicyQualifierInfo.getInstance()use SubjectPublicKeyInfo.getInstance()use Extensionsuse Extensionsuse X500Name, X500NameBuilderuse X500Name, X500NameBuilderuse X500Name, X500NameBuilderuse X500Name, X500NameBuilderuse X500Name, X500NameBuilderuse an ordered constructor! The hashtable ordering is rarely correctuse X500Name, X500NameBuilderuse X500Name, X500NameBuilderuse X500Name, X500NameBuilderuse X500Name.getInstance()use AsymmetricKeyParameteruse the constructor on DefaultBufferedBlockCipher.use AESEngine.newInstance()use CBCBlockCipherMacuse CBCBlockCipherMacuses incorrect pad for SHA-512 and SHA-384 use HMac.use the CBCBlockCipher.newInstance() static method.use the CCMBlockCipher.newInstance() static method.use the equivalent CFBBlockCipher.newInstance() static method.use the GCMBlockCipher.newInstance() static method.use the CBCBlockCipher.newInstance() static method.use newInstance() method.The parameter sets are the static fields of this class, looked up byLMOtsParameters.getParametersForType(int); this class is not intended to be subclassed and this constructor will be made private.The parameter sets are the static fields of this class, looked up byLMSigParameters.getParametersForType(int); this class is not intended to be subclassed and this constructor will be made private.UseLMSParameters.create(LMSigParameters, LMOtsParameters); this class is not intended to be subclassed and this constructor will be made private.This class is not intended to be subclassed; the constructor will be removed.the mode is ignored - seeShamirSecretSplitter.Mode. UseShamirSecretSplitter.getInstance(Algorithm, int, SecureRandom).the mode is ignored - seeShamirSecretSplitter.Mode. UseShamirSplitSecret.getInstance(ShamirSecretSplitter.Algorithm, ShamirSplitSecretShare[]).use constructor taking order/cofactoruse constructor taking order/cofactoruse constructor taking order/cofactoruse getInstance()use getInstance()use getInstance()use the SHAKE only version.use constructor that takes Extension