Top Deprecated By Reference
Bouncy Castle Cryptography Library 1.80

Deprecated API


No API in this release is deprecated for removal.

Deprecated Item Summary

SinceDeprecated Item and Description
org.bouncycastle.asn1.BERBitStringParser

Check for 'ASN1BitStringParser' instead

org.bouncycastle.asn1.BEROctetStringParser

Check for 'ASN1OctetStringParser' instead

org.bouncycastle.asn1.BERSequenceParser

Check for 'ASN1SequenceParser' instead

org.bouncycastle.asn1.BERSetParser

Check for 'ASN1SetParser' instead

org.bouncycastle.asn1.DEROctetStringParser

Check for 'ASN1OctetStringParser' instead

org.bouncycastle.asn1.DLBitStringParser

Check for 'ASN1BitStringParser' instead

org.bouncycastle.asn1.DLSequenceParser

Check for 'ASN1SequenceParser' instead

org.bouncycastle.asn1.DLSetParser

Check for 'ASN1SetParser' instead

Returns:

the hash value as a BIT STRING
org.bouncycastle.asn1.bc.ExternalValue.getHashVal
()

use getHash(), the internal encoding is now an OCTET STRING

org.bouncycastle.asn1.cmp.CMPCertificate(AttributeCertificate x509v2AttrCert)

use (type, otherCert) constructor

Returns:

an AttributeCertificate
org.bouncycastle.asn1.cmp.CMPCertificate.getX509v2AttrCert
()

use getOtherCert and getOtherTag to make sure message is really what it should be.

org.bouncycastle.asn1.cmp.CertAnnContent(AttributeCertificate x509v2AttrCert)

use (type, otherCert) constructor

Returns:

the string at index i.
org.bouncycastle.asn1.cmp.PKIFreeText.getStringAt
(int
index of the string of interest
i
)

Use getStringAtUTF8(int) instead.

org.bouncycastle.asn1.cmp.RevDetails(CertTemplate certDetails, X509Extensions crlEntryDetails)

use method taking Extensions

org.bouncycastle.asn1.cms.IssuerAndSerialNumber(X509CertificateStructure certificate)

use constructor taking Certificate

org.bouncycastle.asn1.cms.IssuerAndSerialNumber(X509Name name, BigInteger serialNumber)

use X500Name constructor

org.bouncycastle.asn1.cms.IssuerAndSerialNumber(X509Name name, ASN1Integer serialNumber)

use X500Name constructor

org.bouncycastle.asn1.cms.OriginatorIdentifierOrKey(ASN1OctetString id)

use version taking a SubjectKeyIdentifier

org.bouncycastle.asn1.ocsp.ResponseData(ResponderID responderID, ASN1GeneralizedTime producedAt, ASN1Sequence responses, X509Extensions responseExtensions)

use method taking Extensions

org.bouncycastle.asn1.ocsp.SingleResponse(CertID certID, CertStatus certStatus, ASN1GeneralizedTime thisUpdate, ASN1GeneralizedTime nextUpdate, X509Extensions singleExtensions)

use method taking ASN1GeneralizedTime and Extensions

org.bouncycastle.asn1.ocsp.TBSRequest(GeneralName requestorName, ASN1Sequence requestList, X509Extensions requestExtensions)

use method taking Extensions

org.bouncycastle.asn1.sec.ECPrivateKey(BigInteger key)

use constructor which takes orderBitLength to guarantee correct encoding.

org.bouncycastle.asn1.sec.ECPrivateKey(BigInteger key, ASN1Encodable parameters)

use constructor which takes orderBitLength to guarantee correct encoding.

org.bouncycastle.asn1.sec.ECPrivateKey(BigInteger key, ASN1BitString publicKey, ASN1Encodable parameters)

use constructor which takes orderBitLength to guarantee correct encoding.

org.bouncycastle.asn1.sec.ECPrivateKey.getParameters()

Use getParametersObject() instead and getInstance methods or similar to get the object at the desired type.

org.bouncycastle.asn1.x500.X500Name(X500NameStyle style, X500Name name)

use the getInstance() method that takes a style.

org.bouncycastle.asn1.x509.AuthorityKeyIdentifier(SubjectPublicKeyInfo spki)

create the extension using org.bouncycastle.cert.X509ExtensionUtils

org.bouncycastle.asn1.x509.AuthorityKeyIdentifier(SubjectPublicKeyInfo spki, GeneralNames name, BigInteger serialNumber)

create the extension using org.bouncycastle.cert.X509ExtensionUtils

org.bouncycastle.asn1.x509.DeltaCertificateDescriptor.trimTo(TBSCertificate baseTbsCertificate, Extensions tbsExtensions)

Use DeltaCertificateTool#trimDeltaCertificateDescriptor instead.

org.bouncycastle.asn1.x509.ExtendedKeyUsage(Vector<E> usages)

use KeyPurposeId[] constructor.

org.bouncycastle.asn1.x509.GeneralName(X509Name dirName)

use X500Name constructor.

org.bouncycastle.asn1.x509.PolicyMappings(Hashtable<K, V>
a HashMap value that maps String oids to other String oids.
mappings
)

use CertPolicyId constructors.

org.bouncycastle.asn1.x509.PolicyQualifierInfo(ASN1Sequence
PolicyQualifierInfo X509 structure encoded as an ASN1Sequence.
as
)

use PolicyQualifierInfo.getInstance()

org.bouncycastle.asn1.x509.RSAPublicKeyStructure

use org.bouncycastle.asn1.pkcs.RSAPublicKey

org.bouncycastle.asn1.x509.SubjectPublicKeyInfo(ASN1Sequence seq)

use SubjectPublicKeyInfo.getInstance()

Returns:

the public key as an ASN.1 primitive.
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo.getPublicKey
()

use parsePublicKey

org.bouncycastle.asn1.x509.X509CertificateStructure

use org.bouncycastle.asn1.x509.Certificate

org.bouncycastle.asn1.x509.X509Extensions(Vector<E> ordering, Hashtable<K, V> extensions)

use Extensions

org.bouncycastle.asn1.x509.X509Extensions(Vector<E>
a vector of the object identifiers.
objectIDs
,
Vector<E>
a vector of the extension values.
values
)

use Extensions

org.bouncycastle.asn1.x509.X509ExtensionsGenerator

use org.bouncycastle.asn1.x509.ExtensionsGenerator

org.bouncycastle.asn1.x509.X509Name

use org.bouncycastle.asn1.x500.X500Name.

org.bouncycastle.asn1.x509.X509Name(ASN1Sequence seq)

use X500Name.getInstance()

org.bouncycastle.asn1.x509.X509Name(Hashtable<K, V> attributes)

use an ordered constructor! The hashtable ordering is rarely correct

org.bouncycastle.asn1.x509.X509Name(Vector<E> ordering, Hashtable<K, V> attributes, X509NameEntryConverter converter)

use X500Name, X500NameBuilder

org.bouncycastle.asn1.x509.X509Name(Vector<E> oids, Vector<E> values)

use X500Name, X500NameBuilder

org.bouncycastle.asn1.x509.X509Name(Vector<E> oids, Vector<E> values, X509NameEntryConverter converter)

use X500Name, X500NameBuilder

org.bouncycastle.asn1.x509.X509Name(String dirName)

use X500Name, X500NameBuilder

org.bouncycastle.asn1.x509.X509Name(String dirName, X509NameEntryConverter converter)

use X500Name, X500NameBuilder

org.bouncycastle.asn1.x509.X509Name(boolean reverse, String dirName)

use X500Name, X500NameBuilder

org.bouncycastle.asn1.x509.X509Name(boolean reverse, String dirName, X509NameEntryConverter converter)

use X500Name, X500NameBuilder

org.bouncycastle.asn1.x509.X509Name(boolean
true if we should start scanning from the end (RFC 2553).
reverse
,
Hashtable<K, V>
table of names and their oids.
lookUp
,
String
the X.500 string to be parsed.
dirName
)

use X500Name, X500NameBuilder

org.bouncycastle.asn1.x509.X509ObjectIdentifiers.id_PasswordBasedMac

Use CRMFObjectIdentifiers.passwordBasedMac instead

org.bouncycastle.bcpg.AEADEncDataPacket.getIVLength(byte aeadAlgorithm)

use AEADUtils.getIVLength()

org.bouncycastle.bcpg.ArmoredInputStream.setDetectMissingCRC(boolean
false if ignore missing CRC sums, true for exception
detectMissing
)

use Builder class for configuring this.

org.bouncycastle.bcpg.ArmoredOutputStream.addHeader(String
the name of the header entry.
name
,
String
the value of the header entry.
value
)

use appropriate methods in Builder instead

org.bouncycastle.bcpg.ArmoredOutputStream.setHeader(String
the name of the header entry.
name
,
String
the value of the header entry.
value
)

use appropriate methods in Builder instead.

Returns:

the tag for the next non-marker/padding packet
org.bouncycastle.bcpg.BCPGInputStream.skipMarkerPackets
()

use skipMarkerAndPaddingPackets

org.bouncycastle.bcpg.PublicKeyPacket(int
public key algorithm id
algorithm
,
Date
creation time
time
,
BCPGKey
key object
key
)

use versioned PublicKeyPacket(int, int, Date, BCPGKey) instead

Returns:

v3 key validity period in days since creation.
org.bouncycastle.bcpg.PublicKeyPacket.getValidDays
()

v4 and v6 keys instead signal their expiration time via the org.bouncycastle.bcpg.sig.KeyExpirationTime signature subpacket.

org.bouncycastle.bcpg.SecretKeyPacket.USAGE_CHECKSUM

Use of MalleableCFB is deprecated. For v4 keys, use USAGE_SHA1 instead. For v6 keys use USAGE_AEAD instead.

org.bouncycastle.bcpg.SymmetricKeyEncSessionPacket(int
symmetric encryption algorithm
encAlgorithm
,
S2K
s2k
s2k
,
byte[]
encrypted session key
secKeyData
)

use createVersion4Packet()

org.bouncycastle.cms.CMSConfig.setSigningDigestAlgorithmMapping(String
object identifier to map.
oid
,
String
algorithm name to use.
algorithmName
)

no longer required.

org.bouncycastle.crypto.AsymmetricCipherKeyPair(CipherParameters
a public key parameters object.
publicParam
,
CipherParameters
the corresponding private key parameters.
privateParam
)

use AsymmetricKeyParameter

org.bouncycastle.crypto.BufferedBlockCipher(BlockCipher
the underlying block cipher this buffering object wraps.
cipher
)

use the constructor on DefaultBufferedBlockCipher.

org.bouncycastle.crypto.agreement.jpake.JPAKEUtil.calculateS(char[] password)

Use version including the modulus instead.

org.bouncycastle.crypto.digests.AsconXof

Now superseded - please use AsconXof128

org.bouncycastle.crypto.engines.AESEngine()

use AESEngine.newInstance()

org.bouncycastle.crypto.engines.AESFastEngine

unfortunately this class is has a few side channel issues. In an environment where encryption/decryption may be closely observed it should not be used.

org.bouncycastle.crypto.engines.AsconEngine

Now superseded. Please refer to AsconAEAD128Engine for future implementations.

org.bouncycastle.crypto.engines.ThreefishEngine.bytesToWord(final byte[] bytes, final int off)

Will be removed

org.bouncycastle.crypto.engines.ThreefishEngine.wordToBytes(final long word, final byte[] bytes, final int off)

Will be removed

org.bouncycastle.crypto.kems.ECIESKeyEncapsulation

use ECIESKEMGenerator, ECIESKEMExtractor

Returns:

the session key.
org.bouncycastle.crypto.kems.ECIESKeyEncapsulation.decrypt
(byte[]
the input buffer for the encapsulated key.
in
,
int
the offset for the input buffer.
inOff
,
int
the length of the encapsulated key.
inLen
,
int
the length of the session key.
keyLen
)

use ECIESKEMExtractor

Returns:

the session key.
org.bouncycastle.crypto.kems.ECIESKeyEncapsulation.decrypt
(byte[]
the input buffer for the encapsulated key.
in
,
int
the length of the session key.
keyLen
)

use ECIESKEMExtractor

Returns:

the random session key.
org.bouncycastle.crypto.kems.ECIESKeyEncapsulation.encrypt
(byte[]
the output buffer for the encapsulated key.
out
,
int
the offset for the output buffer.
outOff
,
int
the length of the session key.
keyLen
)

use ECIESKEMGenerator

Returns:

the random session key.
org.bouncycastle.crypto.kems.ECIESKeyEncapsulation.encrypt
(byte[]
the output buffer for the encapsulated key.
out
,
int
the length of the session key.
keyLen
)

use ECIESKEMGenerator

org.bouncycastle.crypto.kems.RSAKeyEncapsulation

use RSAKEMGenerator, RSAKEMExtractor

org.bouncycastle.crypto.macs.BlockCipherMac(BlockCipher
the cipher to be used as the basis of the MAC generation.
cipher
)

use CBCBlockCipherMac

org.bouncycastle.crypto.macs.BlockCipherMac(BlockCipher
the cipher to be used as the basis of the MAC generation.
cipher
,
int
the size of the MAC in bits, must be a multiple of 8.
macSizeInBits
)

use CBCBlockCipherMac

org.bouncycastle.crypto.macs.OldHMac(Digest digest)

uses incorrect pad for SHA-512 and SHA-384 use HMac.

org.bouncycastle.crypto.modes.CBCBlockCipher(BlockCipher
the block cipher to be used as the basis of chaining.
cipher
)

use the CBCBlockCipher.newInstance() static method.

org.bouncycastle.crypto.modes.CCMBlockCipher(BlockCipher
the block cipher to be used.
c
)

use the CCMBlockCipher.newInstance() static method.

org.bouncycastle.crypto.modes.CFBBlockCipher(BlockCipher
the block cipher to be used as the basis of the feedback mode.
cipher
,
int
the block size in bits (note: a multiple of 8)
bitBlockSize
)

use the equivalent CFBBlockCipher.newInstance() static method.

org.bouncycastle.crypto.modes.GCMBlockCipher(BlockCipher
the base cipher.
c
)

use the GCMBlockCipher.newInstance() static method.

org.bouncycastle.crypto.modes.GCMBlockCipher(BlockCipher
the base cipher.
c
,
GCMMultiplier
the GCM multiplier to use.
m
)

use the CBCBlockCipher.newInstance() static method.

org.bouncycastle.crypto.modes.PaddedBlockCipher

use org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher instead.

org.bouncycastle.crypto.modes.SICBlockCipher(BlockCipher
the block cipher to be used.
c
)

use newInstance() method.

org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters.sign(int algorithm, Ed25519PublicKeyParameters publicKey, byte[] ctx, byte[] msg, int msgOff, int msgLen, byte[] sig, int sigOff)

use overload that doesn't take a public key

org.bouncycastle.crypto.params.Ed448PrivateKeyParameters.sign(int algorithm, Ed448PublicKeyParameters publicKey, byte[] ctx, byte[] msg, int msgOff, int msgLen, byte[] sig, int sigOff)

use overload that doesn't take a public key

org.bouncycastle.crypto.util.Pack

use org.bouncycastle.util.pack

org.bouncycastle.jcajce.BCFKSStoreParameter

This class does not support configuration on creation, use BCFKSLoadStoreParameter for best results.

org.bouncycastle.jcajce.PKIXExtendedParameters.getDate()

Use 'getValidityDate' instead (which can return null).

org.bouncycastle.jcajce.provider.asymmetric.dsa.DSASigner.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.jcajce.provider.asymmetric.dstu.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.jcajce.provider.asymmetric.ecgost.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.jcajce.provider.asymmetric.ecgost12.ECGOST2012SignatureSpi256.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with "#engineSetParameter(java.security.spec.AlgorithmParameterSpec)"

org.bouncycastle.jcajce.provider.asymmetric.ecgost12.ECGOST2012SignatureSpi512.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.jcajce.provider.asymmetric.gost.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.jcajce.provider.asymmetric.util.DSABase.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with "#engineSetParameter(java.security.spec.AlgorithmParameterSpec)"

org.bouncycastle.jcajce.provider.config.PKCS12StoreParameter

use org.bouncycastle.jcajce.PKCS12StoreParameter

org.bouncycastle.jcajce.util.JcaJceHelper.createDigest(String algorithm)

Use createMessageDigest instead

Returns:

an ASN.1 object representing the primitives making up the params parameter.
org.bouncycastle.jcajce.util.JcaJceUtils.extractParameters
(AlgorithmParameters
the object to get the encoding used to create the return value.
params
)

use AlgorithmParametersUtils.extractParameters(AlgorithmParameters params)

Returns:

a string representing the standard name - the OID as a string if none available.
org.bouncycastle.jcajce.util.JcaJceUtils.getDigestAlgName
(ASN1ObjectIdentifier
the OID of the digest algorithm of interest.
digestAlgOID
)

use MessageDigestUtils,getDigestName()

org.bouncycastle.jcajce.util.JcaJceUtils.loadParameters(AlgorithmParameters
the AlgorithmParameters object to be initialised.
params
,
ASN1Encodable
the ASN.1 encodable to initialise params with.
sParams
)

use AlgorithmParametersUtils.loadParameters(AlgorithmParameters params, ASN1Encodable sParams)

org.bouncycastle.jcajce.util.NamedJcaJceHelper.createDigest(String algorithm)

Use createMessageDigest instead

org.bouncycastle.jce.PKCS10CertificationRequest

use classes in org.bouncycastle.pkcs.

org.bouncycastle.jce.X509Principal

use the X500Name class.

org.bouncycastle.jce.interfaces.MQVPrivateKey

use MQVParameterSpec for passing the ephemeral key.

org.bouncycastle.jce.interfaces.MQVPublicKey

use MQVParameterSpec for passing the ephemeral key.

org.bouncycastle.jce.provider.JDKPKCS12StoreParameter

use org.bouncycastle.jcajce.config.PKCS12StoreParameter

org.bouncycastle.jce.provider.X509CRLObject

Do not use this class directly - either use org.bouncycastle.cert (bcpkix) or CertificateFactory.

org.bouncycastle.jce.provider.X509CertParser

use CertificateFactory or the PEMParser in the openssl package (pkix jar).

org.bouncycastle.jce.provider.X509CertificateObject

Do not use this class directly - either use org.bouncycastle.cert (bcpkix) or CertificateFactory.

org.bouncycastle.jce.spec.GOST28147ParameterSpec

use org.bouncycastle.jcajce.spec.GOST28147ParameterSpec

org.bouncycastle.jce.spec.RepeatedSecretKeySpec

use super class org.bouncycastle.jcajce.spec.RepeatedSecretKeySpec

org.bouncycastle.math.ec.ECCurve.F2m(int
The exponent m of F2m.
m
,
int
The integer k where xm + xk + 1 represents the reduction polynomial f(z).
k
,
BigInteger
The coefficient a in the Weierstrass equation for non-supersingular elliptic curves over F2m.
a
,
BigInteger
The coefficient b in the Weierstrass equation for non-supersingular elliptic curves over F2m.
b
)

use constructor taking order/cofactor

org.bouncycastle.math.ec.ECCurve.F2m(int
The exponent m of F2m.
m
,
int
The integer k1 where xm + xk3 + xk2 + xk1 + 1 represents the reduction polynomial f(z).
k1
,
int
The integer k2 where xm + xk3 + xk2 + xk1 + 1 represents the reduction polynomial f(z).
k2
,
int
The integer k3 where xm + xk3 + xk2 + xk1 + 1 represents the reduction polynomial f(z).
k3
,
BigInteger
The coefficient a in the Weierstrass equation for non-supersingular elliptic curves over F2m.
a
,
BigInteger
The coefficient b in the Weierstrass equation for non-supersingular elliptic curves over F2m.
b
)

use constructor taking order/cofactor

org.bouncycastle.math.ec.ECCurve.Fp(BigInteger q, BigInteger a, BigInteger b)

use constructor taking order/cofactor

org.bouncycastle.mozilla.SignedPublicKeyAndChallenge.getPublicKey(String provider)

use JcaSignedPublicKeyAndChallenge.getPublicKey()

org.bouncycastle.mozilla.SignedPublicKeyAndChallenge.verify(String provider)

use ContentVerifierProvider method

org.bouncycastle.openpgp.PGPPBEEncryptedData.getDataStream(SessionKeyDataDecryptorFactory dataDecryptorFactory)

will be removed in 1.74, use PGPEncryptedDataList.extractSessionKeyEncryptedData() and then apply the dataDecryptorFactory.

Returns:

number of valid days from creation time - zero means no expiry.
org.bouncycastle.openpgp.PGPPublicKey.getValidDays
()

use getValidSeconds(): greater than version 3 keys may be valid for less than a day.

Returns:

boolean indicating whether this (sub)key has been revoked.
org.bouncycastle.openpgp.PGPPublicKey.isRevoked
()

this method is poorly named, use hasRevocation().

org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.getDataStream(SessionKeyDataDecryptorFactory dataDecryptorFactory)

will be removed in 1.74, use PGPEncryptedDataList.extractSessionKeyEncryptedData() and then apply the dataDecryptorFactory.

Returns:

a secret key object.
org.bouncycastle.openpgp.PGPSecretKey.parseSecretKeyFromSExpr
(InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, PGPPublicKey pubKey)

use org.bouncycastle.gpg.SExprParser - it will also allow you to verify the protection checksum if it is available.

Returns:

a secret key object.
org.bouncycastle.openpgp.PGPSecretKey.parseSecretKeyFromSExpr
(InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, KeyFingerPrintCalculator fingerPrintCalculator)

use org.bouncycastle.gpg.SExprParser - it will also allow you to verify the protection checksum if it is available.

org.bouncycastle.openpgp.PGPSignatureGenerator(PGPContentSignerBuilder
builder to produce PGPContentSigner objects for generating signatures.
contentSignerBuilder
)

use PGPSignatureGenerator(PGPContentSignerBuilder, PGPPublicKey) instead.

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.addRevocationKey(boolean
true if should be treated as critical, false otherwise.
isCritical
,
int
algorithm of the revocation key
keyAlgorithm
,
byte[]
fingerprint of the revocation key (v4 only)
fingerprint
)

the revocation key mechanism is deprecated. Applications MUST NOT generate such a packet.

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.setEmbeddedSignature(boolean
true if should be treated as critical, false otherwise.
isCritical
,
PGPSignature
embedded signature
pgpSignature
)

use addEmbeddedSignature(boolean, PGPSignature) instead.

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.setIntendedRecipientFingerprint(boolean
true if critical, false otherwise.
isCritical
,
PGPPublicKey
the public key the encrypted payload was encrypted against.
publicKey
)

use addIntendedRecipientFingerprint(boolean, PGPPublicKey) instead.

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.setNotationData(boolean
true if should be treated as critical, false otherwise.
isCritical
,
boolean
true if the notation is human-readable.
isHumanReadable
,
String
name of the notation key
notationName
,
String
value of the notation
notationValue
)

use addNotationData(boolean, boolean, String, String) instead.

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.setPreferredAEADAlgorithms(boolean
true if should be treated as critical, false otherwise.
isCritical
,
int[]
array of algorithms in descending preference
algorithms
)

use setPreferredAEADCiphersuites(boolean, PreferredAEADCiphersuites.Combination[]) or setPreferredLibrePgpEncryptionModes(boolean, int[]) instead.

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.setPreferredLibrePgpEncryptionModes(boolean
whether the packet is critical
isCritical
,
int[]
list of algorithms
algorithms
)

the use of this subpacket is deprecated in LibrePGP

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.setRevocationKey(boolean
true if should be treated as critical, false otherwise.
isCritical
,
int
algorithm of the revocation key
keyAlgorithm
,
byte[]
fingerprint of the revocation key (v4 only)
fingerprint
)

the revocation key mechanism is deprecated. Applications MUST NOT generate such a packet.

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.setSignerUserID(boolean
true if should be treated as critical, false otherwise.
isCritical
,
String
signer user-id
userID
)

use addSignerUserID(boolean, String) instead.

org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator.setSignerUserID(boolean
true if should be treated as critical, false otherwise.
isCritical
,
byte[]
signer user-id
rawUserID
)

use addSignerUserID(boolean, byte[]) instead.

Returns:

the name of the default provider.
org.bouncycastle.openpgp.PGPUtil.getDefaultProvider
()

unused

org.bouncycastle.openpgp.PGPUtil.setDefaultProvider(String
the name of the JCA/JCE provider to use by default.
provider
)

unused

Returns:

decrypted session info
org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory.recoverSessionData
(int
public key algorithm
keyAlgorithm
,
byte[][]
encrypted session key data
secKeyData
)

use recoverSessionData(PublicKeyEncSessionPacket, InputStreamPacket) instead.

Returns:

decrypted session info
org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory.recoverSessionData
(int
public key algorithm
keyAlgorithm
,
byte[][]
encrypted session key data
secKeyData
,
int
version of the PKESK packet
pkeskVersion
)

use recoverSessionData(PublicKeyEncSessionPacket, InputStreamPacket) instead.

Returns:

this
org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator.setUseWildcardKeyID
(boolean
boolean
enabled
)

use setUseWildcardRecipient(boolean) instead TODO: Remove in a future release

org.bouncycastle.openpgp.operator.RFC6637KDFCalculator

this class is no longer required and will be removed.

org.bouncycastle.openpgp.operator.bc.BcPGPKeyConverter.getPGPPublicKey(int
asymmetric algorithm type representing the public key.
algorithm
,
PGPAlgorithmParameters algorithmParameters, AsymmetricKeyParameter
actual public key to associate.
pubKey
,
Date
date of creation.
time
)

use versioned getPGPPublicKey(int, int, PGPAlgorithmParameters, AsymmetricKeyParameter, Date) instead

org.bouncycastle.openpgp.operator.jcajce.JcaPGPKeyConverter.getPGPPublicKey(int
asymmetric algorithm type representing the public key.
algorithm
,
PGPAlgorithmParameters
additional parameters to be stored against the public key.
algorithmParameters
,
PublicKey
actual public key to associate.
pubKey
,
Date
date of creation.
time
)

use versioned getPGPPublicKey(int, int, PGPAlgorithmParameters, PublicKey, Date) instead.

org.bouncycastle.openpgp.operator.jcajce.JcaPGPKeyConverter.getPGPPublicKey(int
asymmetric algorithm type representing the public key.
algorithm
,
PublicKey
actual public key to associate.
pubKey
,
Date
date of creation.
time
)

use versioned getPGPPublicKey(int, int, PublicKey, Date) instead.

org.bouncycastle.openpgp.operator.jcajce.JcaPGPKeyPair(int
the PGP algorithm the key is for.
algorithm
,
KeyPair
the public/private key pair to convert.
keyPair
,
Date
the creation date to associate with the key pair.
date
)

use versioned JcaPGPKeyPair(int, int, KeyPair, Date) instead

org.bouncycastle.openpgp.operator.jcajce.JcaPGPKeyPair(int
the PGP algorithm the key is for.
algorithm
,
PGPAlgorithmParameters
additional parameters to be stored against the public key.
parameters
,
KeyPair
the public/private key pair to convert.
keyPair
,
Date
the creation date to associate with the key pair.
date
)

use versioned JcaPGPKeyPair(int, int, PGPAlgorithmParameters, KeyPair, Date) instead

org.bouncycastle.openssl.jcajce.JceOpenSSLPKCS8EncryptorBuilder.setPasssword(char[] password)

Incorrectly spelt - use setPassword()

org.bouncycastle.operator.GenericKey(Object
key data
representation
)

provide an AlgorithmIdentifier.

Returns:

the OID for the parameter set.
org.bouncycastle.pqc.crypto.sphincsplus.SPHINCSPlusParameters.getID
(SPHINCSPlusParameters
the parameters of interest.
params
)

Use getID() instead

org.bouncycastle.pqc.crypto.xmss.XMSSMTPrivateKeyParameters.toByteArray()

use getEncoded() - this method will become private.

org.bouncycastle.pqc.crypto.xmss.XMSSMTPublicKeyParameters.toByteArray()

use getEncoded() - this method will become private.

org.bouncycastle.pqc.crypto.xmss.XMSSPrivateKeyParameters.toByteArray()

use getEncoded() - this method will become private.

org.bouncycastle.pqc.crypto.xmss.XMSSPublicKeyParameters.toByteArray()

use getEncoded() - this method will become private.

org.bouncycastle.pqc.crypto.xmss.XMSSSignature.toByteArray()

use getEncoded() this method will become private.

org.bouncycastle.pqc.jcajce.interfaces.StateAwareSignature

it's better to avoid this and use extractKeyShard methods where possible.

org.bouncycastle.pqc.jcajce.provider.dilithium.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.jcajce.provider.falcon.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.jcajce.provider.lms.LMSSignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.jcajce.provider.picnic.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.jcajce.provider.rainbow.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.jcajce.provider.sphincs.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.jcajce.provider.sphincsplus.SignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.jcajce.provider.xmss.XMSSMTSignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.jcajce.provider.xmss.XMSSSignatureSpi.engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)

org.bouncycastle.pqc.legacy.crypto.qtesla.IntSlicer

Remove when Post-Quantum Standardization project has finished and standard is published.

Returns:

log_2(x)
org.bouncycastle.pqc.legacy.math.linearalgebra.IntegerFunctions.log
(double
any double value
x
)

use MathFunctions.log(double) instead

Returns:

log_2(x)
org.bouncycastle.pqc.legacy.math.linearalgebra.IntegerFunctions.log
(long
any long value >=1
x
)

use MathFunctions.log(long) instead

Returns:

log_2(arg)
org.bouncycastle.pqc.legacy.math.linearalgebra.IntegerFunctions.logBKM
(double
a double value with 1<= arg<= 4.768462058
arg
)

use MathFunctions.logBKM(double) instead

org.bouncycastle.tls.AbstractTlsServer.checkServerExtensions()

Use 'serverExtensions' directly, it is now never null

Returns:

a Certificate object.
org.bouncycastle.tls.Certificate.parse
(TlsContext
the TlsContext of the current connection.
context
,
InputStream
the InputStream to parse from.
messageInput
,
OutputStream
the OutputStream to write the "end point hash" (or null).
endPointHashOutput
)

Use version taking a ParseOptions argument instead.

org.bouncycastle.tls.DTLSProtocol.evaluateMaxFragmentLengthExtension(boolean resumedSession, Hashtable<K, V> clientExtensions, Hashtable<K, V> serverExtensions, short alertDescription)

Will be removed.

org.bouncycastle.tls.NamedGroup.OQS_mlkem1024

Experimental API (unstable): unofficial value from Open Quantum Safe project.

org.bouncycastle.tls.NamedGroup.OQS_mlkem512

Experimental API (unstable): unofficial value from Open Quantum Safe project.

org.bouncycastle.tls.NamedGroup.OQS_mlkem768

Experimental API (unstable): unofficial value from Open Quantum Safe project.

org.bouncycastle.tls.SecurityParameters.getCompressionAlgorithm()

Will be removed. Use constant CompressionMethod._null instead.

org.bouncycastle.tls.TlsExtensionsUtils.getClientCertificateTypeExtensionServer(Hashtable<K, V> extensions, short defaultValue)

Use version without defaultValue instead

org.bouncycastle.tls.TlsExtensionsUtils.getServerCertificateTypeExtensionServer(Hashtable<K, V> extensions, short defaultValue)

Use version without defaultValue instead

Returns:

true if the 'signatureAlgorithm' of received certificates should be checked, or false to skip those checks.
org.bouncycastle.tls.TlsPeer.shouldCheckSigAlgOfPeerCerts
()

No longer called by the protocol classes. Can call TlsUtils#checkPeerSigAlgs(TlsContext, TlsCertificate[]) once a complete CertPath has been determined (i.e. as part of chain validation).

org.bouncycastle.tls.TlsProtocol.processMaxFragmentLengthExtension(Hashtable<K, V> clientExtensions, Hashtable<K, V> serverExtensions, short alertDescription)

Will be removed.

org.bouncycastle.tls.TlsUtils.readDERObject(byte[] encoding)

Will be removed. Use readASN1Object in combination with requireDEREncoding instead

org.bouncycastle.tls.crypto.impl.TlsAEADCipher(TlsCryptoParameters cryptoParams, TlsAEADCipherImpl encryptCipher, TlsAEADCipherImpl decryptCipher, int keySize, int macSize, int aeadType)

Use version with extra 'nonceGeneratorFactory' parameter

org.bouncycastle.tls.crypto.impl.bc.BcTlsRSASigner(BcTlsCrypto crypto, RSAKeyParameters privateKey, RSAKeyParameters publicKey)

Use constructor without 'publicKey' parameter.

org.bouncycastle.tls.crypto.impl.jcajce.JcaTlsRSASigner(JcaTlsCrypto crypto, PrivateKey privateKey, PublicKey publicKey)

Use constructor without 'publicKey' parameter.

org.bouncycastle.tsp.TimeStampRequestGenerator.addExtension(String OID, boolean critical, ASN1Encodable value)

use method taking ASN1ObjectIdentifier

org.bouncycastle.tsp.TimeStampRequestGenerator.addExtension(String OID, boolean critical, byte[] value)

use method taking ASN1ObjectIdentifier

org.bouncycastle.tsp.TimeStampRequestGenerator.generate(String digestAlgorithm, byte[] digest)

use method taking ANS1ObjectIdentifier or AlgorithmIdentifier

org.bouncycastle.tsp.TimeStampRequestGenerator.generate(String digestAlgorithmOID, byte[] digest, BigInteger nonce)

use method taking ANS1ObjectIdentifier or AlgorithmIdentifier

org.bouncycastle.tsp.TimeStampRequestGenerator.setReqPolicy(String reqPolicy)

use method taking ASN1ObjectIdentifier

org.bouncycastle.tsp.TimeStampTokenGenerator.R_MICROSECONDS

use R_HUNDREDTHS_OF_SECONDS - this field will be deleted!!

org.bouncycastle.util.Fingerprint(byte[]
original data to calculate the fingerprint from.
source
,
boolean
use the old SHA512/160 calculation.
useSHA512t
)

use the SHAKE only version.

Returns:

a byte array containing a 20 byte fingerprint.
org.bouncycastle.util.Fingerprint.calculateFingerprintSHA512_160
(byte[]
data to base the fingerprint on.
input
)

use the SHAKE based version.

org.bouncycastle.util.Pack.longToBigEndian(long
The number
value
,
byte[]
The target.
bs
,
int
Position in target to start.
off
,
int
number of bytes to write.
bytes
)

Will be removed

org.bouncycastle.x509.AttributeCertificateHolder

use org.bouncycastle.cert.AttributeCertificateHolder

org.bouncycastle.x509.AttributeCertificateIssuer

use org.bouncycastle.cert.AttributeCertificateIssuer

org.bouncycastle.x509.ExtendedPKIXBuilderParameters

use PKIXExtendedBuilderParameters

org.bouncycastle.x509.PKIXCertPathReviewer

use org.bouncycastle.pkix.jcajce.PKIXCertPathReviewer in the bcpkix package

org.bouncycastle.x509.X509Attribute

see X509CertificateHolder class in the PKIX package.

org.bouncycastle.x509.X509AttributeCertStoreSelector

use org.bouncycastle.cert.X509AttributeCertificateSelector and org.bouncycastle.cert.X509AttributeCertificateSelectorBuilder.

org.bouncycastle.x509.X509AttributeCertificate

use X509CertificateHolder class in the PKIX package.

org.bouncycastle.x509.X509CertStoreSelector

use the classes under org.bouncycastle.cert.selector

org.bouncycastle.x509.X509Store

use CollectionStore - this class will be removed.

org.bouncycastle.x509.X509V1CertificateGenerator

use org.bouncycastle.cert.X509v1CertificateBuilder.

org.bouncycastle.x509.X509V2AttributeCertificate

use org.bouncycastle.cert.X509AttributeCertificateHolder

org.bouncycastle.x509.X509V2CRLGenerator

use org.bouncycastle.cert.X509v2CRLBuilder.

org.bouncycastle.x509.X509V3CertificateGenerator

use org.bouncycastle.cert.X509v3CertificateBuilder.

org.bouncycastle.x509.extension.AuthorityKeyIdentifierStructure

use JcaX509ExtensionUtils and AuthorityKeyIdentifier.getInstance()

org.bouncycastle.x509.extension.AuthorityKeyIdentifierStructure(X509Extension
a X509Extension object containing an AuthorityKeyIdentifier.
extension
)

use constructor that takes Extension

org.bouncycastle.x509.extension.X509ExtensionUtil

use org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils

org.bouncycastle.x509.extension.X509ExtensionUtil.fromExtensionValue(byte[] encodedValue)

use org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils.parseExtensionValue()

org.bouncycastle.x509.extension.X509ExtensionUtil.getIssuerAlternativeNames(X509Certificate cert)

use org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils.getIssuerAlternativeNames()

org.bouncycastle.x509.extension.X509ExtensionUtil.getSubjectAlternativeNames(X509Certificate cert)

use org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils.getSubjectAlternativeNames()