Deprecated API
Contents
-
Deprecated PackagesPackageDescriptionthis implementation has been promoted to org.bouncycastle.crypto - the key parameter classes to org.bouncycastle.crypto.params, the key pair generators to org.bouncycastle.crypto.generators, LMSSigner / HSSSigner and the LMSContextBased* interfaces to org.bouncycastle.crypto.signers, and LMSContext with the engine to org.bouncycastle.crypto.signers.lms. This package is scheduled for removal in the next release.
-
Deprecated InterfacesInterfaceDescriptionNo 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
LMSContextBasedSignerinstead.useLMSContextBasedVerifierinstead.use Encodableit'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 toAsconAEAD128Enginefor future implementations.use ECIESKEMGenerator, ECIESKEMExtractoruse RSAKEMGenerator, RSAKEMExtractoruse org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher instead.use AEADParametersUseECGOST3410Signerinstead.use org.bouncycastle.util.packThis class does not support configuration on creation, use BCFKSLoadStoreParameter for best results.use org.bouncycastle.jcajce.PKCS12StoreParameterclass appears to be no longer in use, maybe getting imported by others though.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.the promoted implementation in org.bouncycastle.crypto.signers.lms keeps its encoding helpers internal; scheduled for removal with the rest of this package.useHSSKeyGenerationParametersinstead.useHSSKeyPairGeneratorinstead.useHSSPrivateKeyParametersinstead.useHSSPublicKeyParametersinstead.useHSSSignerinstead.useLMOtsParametersinstead.useinstead.invalid reference
org.bouncycastle.crypto.signers.LMSContextuseLMSigParametersinstead.useLMSKeyGenerationParametersinstead.useLMSKeyPairGeneratorinstead.useLMSKeyParametersinstead.useLMSParametersinstead.useLMSPrivateKeyParametersinstead.useLMSPublicKeyParametersinstead.useLMSSignerinstead.use org.bouncycastle.jcajce.util.SpecUtiluse LMSKeyGenParameterSpecuse LMSKeyGenParameterSpecmoved 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 FieldsFieldDescriptionuse 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).use ECIESKEMExtractoruse ECIESKEMExtractoruse ECIESKEMGeneratoruse ECIESKEMGeneratoruse overload that doesn't take a public keyuse overload that doesn't take a public keyUseMLDSAPrivateKeyParameters.getEncoded()instead.UseMLKEMPrivateKeyParameters.withPreferredFormat(int)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 engineGetParameters()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 insteadUseX25519Field.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.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.use getEncoded() this method will become private.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)use getLMOtsParameters().use getLMSigParameters().use getLMOtsParameters().use getLMSigParameters().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 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 constructor taking the org.bouncycastle.crypto.params types.use the constructor taking the org.bouncycastle.crypto.params types.use the SHAKE only version.use constructor that takes Extension