Class C509SignatureAlgorithm
java.lang.Object
org.bouncycastle.cbor.c509.C509SignatureAlgorithm
The C509 Signature Algorithms Registry, Section 8.14 of
draft-ietf-cose-cbor-encoded-cert-20. Each registered CBOR int value stands for a
complete X.509 AlgorithmIdentifier, including its parameters, so conversion in
either direction is an exact table lookup.
Note the draft's Figure 18 prints the DER for values 23-25 with an inconsistent SEQUENCE length octet (0x0B against 13 content octets); the entries here are built from the OID object model and encode with the correct 0x0D, matching real certificates and the value -256 row.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intRFC 6955 proof-of-possession with SHA-256 and HMAC-SHA256 (1.3.6.1.5.5.7.6.26).static final intRFC 6955 proof-of-possession with SHA-384 and HMAC-SHA384 (1.3.6.1.5.5.7.6.27).static final intRFC 6955 proof-of-possession with SHA-512 and HMAC-SHA512 (1.3.6.1.5.5.7.6.28).static final intECDSA with SHA-1 (1.2.840.10045.4.1).static final intECDSA with SHA-256 (1.2.840.10045.4.3.2).static final intECDSA with SHA-384 (1.2.840.10045.4.3.3).static final intECDSA with SHA-512 (1.2.840.10045.4.3.4).static final intECDSA with SHAKE128 (1.3.6.1.5.5.7.6.32).static final intECDSA with SHAKE256 (1.3.6.1.5.5.7.6.33).static final intEd25519 (1.3.101.112).static final intEd448 (1.3.101.113).static final intRSASSA-PKCS1-v1_5 with SHA-1 (1.2.840.113549.1.1.5).static final intRSASSA-PKCS1-v1_5 with SHA-256 (1.2.840.113549.1.1.11).static final intRSASSA-PKCS1-v1_5 with SHA-384 (1.2.840.113549.1.1.12).static final intRSASSA-PKCS1-v1_5 with SHA-512 (1.2.840.113549.1.1.13).static final intRSASSA-PSS with SHA-256, MGF-1 with SHA-256 and a 32 octet salt (1.2.840.113549.1.1.10).static final intRSASSA-PSS with SHA-384, MGF-1 with SHA-384 and a 48 octet salt (1.2.840.113549.1.1.10).static final intRSASSA-PSS with SHA-512, MGF-1 with SHA-512 and a 64 octet salt (1.2.840.113549.1.1.10).static final intRSASSA-PSS with SHAKE128 (1.3.6.1.5.5.7.6.30).static final intRSASSA-PSS with SHAKE256 (1.3.6.1.5.5.7.6.31).static final intSM2 with SM3 (1.2.156.10197.1.501).static final intUnsigned (1.3.6.1.5.5.7.6.36). -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bouncycastle.asn1.x509.AlgorithmIdentifiergetAlgorithmIdentifier(int value) Return the AlgorithmIdentifier a registered value stands for, or null if the value is not registered.static IntegergetValue(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm) Return the registered value for an AlgorithmIdentifier, matching its complete encoding including parameters, or null if it is not registered.static booleanisEcdsaFormat(int value) Return true if the value identifies an algorithm whose signature value is an ECDSA style pair of integers, encoded in C509 as a fixed width r || s byte string in the manner of Section 2.1 of RFC 9053 (see Section 3.2.2 of the draft).
-
Field Details
-
RSASSA_PKCS1_V15_WITH_SHA1
public static final int RSASSA_PKCS1_V15_WITH_SHA1RSASSA-PKCS1-v1_5 with SHA-1 (1.2.840.113549.1.1.5).- See Also:
-
ECDSA_WITH_SHA1
public static final int ECDSA_WITH_SHA1ECDSA with SHA-1 (1.2.840.10045.4.1).- See Also:
-
ECDSA_WITH_SHA256
public static final int ECDSA_WITH_SHA256ECDSA with SHA-256 (1.2.840.10045.4.3.2).- See Also:
-
ECDSA_WITH_SHA384
public static final int ECDSA_WITH_SHA384ECDSA with SHA-384 (1.2.840.10045.4.3.3).- See Also:
-
ECDSA_WITH_SHA512
public static final int ECDSA_WITH_SHA512ECDSA with SHA-512 (1.2.840.10045.4.3.4).- See Also:
-
ECDSA_WITH_SHAKE128
public static final int ECDSA_WITH_SHAKE128ECDSA with SHAKE128 (1.3.6.1.5.5.7.6.32).- See Also:
-
ECDSA_WITH_SHAKE256
public static final int ECDSA_WITH_SHAKE256ECDSA with SHAKE256 (1.3.6.1.5.5.7.6.33).- See Also:
-
UNSIGNED
public static final int UNSIGNEDUnsigned (1.3.6.1.5.5.7.6.36).- See Also:
-
SM2_WITH_SM3
public static final int SM2_WITH_SM3SM2 with SM3 (1.2.156.10197.1.501).- See Also:
-
ED25519
public static final int ED25519Ed25519 (1.3.101.112).- See Also:
-
ED448
public static final int ED448Ed448 (1.3.101.113).- See Also:
-
ECDH_POP_SHA256_HMAC_SHA256
public static final int ECDH_POP_SHA256_HMAC_SHA256RFC 6955 proof-of-possession with SHA-256 and HMAC-SHA256 (1.3.6.1.5.5.7.6.26).- See Also:
-
ECDH_POP_SHA384_HMAC_SHA384
public static final int ECDH_POP_SHA384_HMAC_SHA384RFC 6955 proof-of-possession with SHA-384 and HMAC-SHA384 (1.3.6.1.5.5.7.6.27).- See Also:
-
ECDH_POP_SHA512_HMAC_SHA512
public static final int ECDH_POP_SHA512_HMAC_SHA512RFC 6955 proof-of-possession with SHA-512 and HMAC-SHA512 (1.3.6.1.5.5.7.6.28).- See Also:
-
RSASSA_PKCS1_V15_WITH_SHA256
public static final int RSASSA_PKCS1_V15_WITH_SHA256RSASSA-PKCS1-v1_5 with SHA-256 (1.2.840.113549.1.1.11).- See Also:
-
RSASSA_PKCS1_V15_WITH_SHA384
public static final int RSASSA_PKCS1_V15_WITH_SHA384RSASSA-PKCS1-v1_5 with SHA-384 (1.2.840.113549.1.1.12).- See Also:
-
RSASSA_PKCS1_V15_WITH_SHA512
public static final int RSASSA_PKCS1_V15_WITH_SHA512RSASSA-PKCS1-v1_5 with SHA-512 (1.2.840.113549.1.1.13).- See Also:
-
RSASSA_PSS_WITH_SHA256
public static final int RSASSA_PSS_WITH_SHA256RSASSA-PSS with SHA-256, MGF-1 with SHA-256 and a 32 octet salt (1.2.840.113549.1.1.10).- See Also:
-
RSASSA_PSS_WITH_SHA384
public static final int RSASSA_PSS_WITH_SHA384RSASSA-PSS with SHA-384, MGF-1 with SHA-384 and a 48 octet salt (1.2.840.113549.1.1.10).- See Also:
-
RSASSA_PSS_WITH_SHA512
public static final int RSASSA_PSS_WITH_SHA512RSASSA-PSS with SHA-512, MGF-1 with SHA-512 and a 64 octet salt (1.2.840.113549.1.1.10).- See Also:
-
RSASSA_PSS_WITH_SHAKE128
public static final int RSASSA_PSS_WITH_SHAKE128RSASSA-PSS with SHAKE128 (1.3.6.1.5.5.7.6.30).- See Also:
-
RSASSA_PSS_WITH_SHAKE256
public static final int RSASSA_PSS_WITH_SHAKE256RSASSA-PSS with SHAKE256 (1.3.6.1.5.5.7.6.31).- See Also:
-
-
Method Details
-
getAlgorithmIdentifier
public static org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier(int value) Return the AlgorithmIdentifier a registered value stands for, or null if the value is not registered. -
getValue
Return the registered value for an AlgorithmIdentifier, matching its complete encoding including parameters, or null if it is not registered. -
isEcdsaFormat
public static boolean isEcdsaFormat(int value) Return true if the value identifies an algorithm whose signature value is an ECDSA style pair of integers, encoded in C509 as a fixed width r || s byte string in the manner of Section 2.1 of RFC 9053 (see Section 3.2.2 of the draft). This covers the ECDSA values and SM2 with SM3.
-