Class OidCatalogue
The methods in this class are membership tests only. They do not provide key sizes, JCA names, or provider registration aliases.
NOTE: this is a local port of org.bouncycastle.crypto.util.OidCatalogue into
org.bouncycastle.operator - the upstream class lives in the (non-FIPS) lightweight
core module, which is not part of this FIPS build. NISTObjectIdentifiers
here resolves to the package-private shim already present in org.bouncycastle.operator,
not org.bouncycastle.asn1.nist.NISTObjectIdentifiers - do not add an explicit
import for it, that would conflict with the local shim.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAEAD(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies an AEAD content-encryption algorithm whose parameters are encoded as GCMParameters or CCMParameters (i.e.static booleanisAuthEnveloped(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a content-encryption algorithm that provides authenticated encryption and so can be used with CMS AuthEnvelopedData (RFC 5083): the GCM and CCM families plus ChaCha20-Poly1305.static booleanisCBC128(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CBC content-encryption algorithm with a 128-bit block size and an IV encoded as an octet string.static booleanisCBC64(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CBC content-encryption algorithm with a 64-bit block size (DES, triple-DES, RC2, CAST5, IDEA).static booleanisCCM(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CCM content-encryption algorithm whose parameters are encoded as CCMParameters.static booleanisChaCha20Poly1305(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies the ChaCha20-Poly1305 AEAD content-encryption algorithm.static booleanisGCM(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a GCM content-encryption algorithm whose parameters are encoded as GCMParameters.
-
Method Details
-
isCCM
public static boolean isCCM(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CCM content-encryption algorithm whose parameters are encoded as CCMParameters.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known CCM content-encryption algorithm.
-
isGCM
public static boolean isGCM(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a GCM content-encryption algorithm whose parameters are encoded as GCMParameters.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known GCM content-encryption algorithm.
-
isCBC128
public static boolean isCBC128(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CBC content-encryption algorithm with a 128-bit block size and an IV encoded as an octet string.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known 128-bit block CBC content-encryption algorithm.
-
isCBC64
public static boolean isCBC64(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CBC content-encryption algorithm with a 64-bit block size (DES, triple-DES, RC2, CAST5, IDEA).This is a block-size predicate only: unlike the GCM/CCM/CBC-128 families, the members do not share a single parameter encoding (RC2 carries RC2CBCParameter, CAST5 carries CAST5CBCParameters, the rest an octet-string IV), so this test is for code that classifies by block size (e.g. PKCS#7 padded output length) rather than by parameter form.
- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known 64-bit block CBC content-encryption algorithm.
-
isChaCha20Poly1305
public static boolean isChaCha20Poly1305(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies the ChaCha20-Poly1305 AEAD content-encryption algorithm.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is ChaCha20-Poly1305.
-
isAEAD
public static boolean isAEAD(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies an AEAD content-encryption algorithm whose parameters are encoded as GCMParameters or CCMParameters (i.e. a GCM or CCM algorithm). ChaCha20-Poly1305, whose parameters differ, is not included here; useisAuthEnveloped(ASN1ObjectIdentifier)for the full set of algorithms usable with CMS AuthEnvelopedData.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known GCM or CCM content-encryption algorithm.
-
isAuthEnveloped
public static boolean isAuthEnveloped(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a content-encryption algorithm that provides authenticated encryption and so can be used with CMS AuthEnvelopedData (RFC 5083): the GCM and CCM families plus ChaCha20-Poly1305.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known AEAD content-encryption algorithm.
-