Class C509SignatureAlgorithm

java.lang.Object
org.bouncycastle.cbor.c509.C509SignatureAlgorithm

public final class C509SignatureAlgorithm extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    RFC 6955 proof-of-possession with SHA-256 and HMAC-SHA256 (1.3.6.1.5.5.7.6.26).
    static final int
    RFC 6955 proof-of-possession with SHA-384 and HMAC-SHA384 (1.3.6.1.5.5.7.6.27).
    static final int
    RFC 6955 proof-of-possession with SHA-512 and HMAC-SHA512 (1.3.6.1.5.5.7.6.28).
    static final int
    ECDSA with SHA-1 (1.2.840.10045.4.1).
    static final int
    ECDSA with SHA-256 (1.2.840.10045.4.3.2).
    static final int
    ECDSA with SHA-384 (1.2.840.10045.4.3.3).
    static final int
    ECDSA with SHA-512 (1.2.840.10045.4.3.4).
    static final int
    ECDSA with SHAKE128 (1.3.6.1.5.5.7.6.32).
    static final int
    ECDSA with SHAKE256 (1.3.6.1.5.5.7.6.33).
    static final int
    Ed25519 (1.3.101.112).
    static final int
    Ed448 (1.3.101.113).
    static final int
    RSASSA-PKCS1-v1_5 with SHA-1 (1.2.840.113549.1.1.5).
    static final int
    RSASSA-PKCS1-v1_5 with SHA-256 (1.2.840.113549.1.1.11).
    static final int
    RSASSA-PKCS1-v1_5 with SHA-384 (1.2.840.113549.1.1.12).
    static final int
    RSASSA-PKCS1-v1_5 with SHA-512 (1.2.840.113549.1.1.13).
    static final int
    RSASSA-PSS with SHA-256, MGF-1 with SHA-256 and a 32 octet salt (1.2.840.113549.1.1.10).
    static final int
    RSASSA-PSS with SHA-384, MGF-1 with SHA-384 and a 48 octet salt (1.2.840.113549.1.1.10).
    static final int
    RSASSA-PSS with SHA-512, MGF-1 with SHA-512 and a 64 octet salt (1.2.840.113549.1.1.10).
    static final int
    RSASSA-PSS with SHAKE128 (1.3.6.1.5.5.7.6.30).
    static final int
    RSASSA-PSS with SHAKE256 (1.3.6.1.5.5.7.6.31).
    static final int
    SM2 with SM3 (1.2.156.10197.1.501).
    static final int
    Unsigned (1.3.6.1.5.5.7.6.36).
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bouncycastle.asn1.x509.AlgorithmIdentifier
    Return the AlgorithmIdentifier a registered value stands for, or null if the value is not registered.
    static Integer
    getValue(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 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).

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RSASSA_PKCS1_V15_WITH_SHA1

      public static final int RSASSA_PKCS1_V15_WITH_SHA1
      RSASSA-PKCS1-v1_5 with SHA-1 (1.2.840.113549.1.1.5).
      See Also:
    • ECDSA_WITH_SHA1

      public static final int ECDSA_WITH_SHA1
      ECDSA with SHA-1 (1.2.840.10045.4.1).
      See Also:
    • ECDSA_WITH_SHA256

      public static final int ECDSA_WITH_SHA256
      ECDSA with SHA-256 (1.2.840.10045.4.3.2).
      See Also:
    • ECDSA_WITH_SHA384

      public static final int ECDSA_WITH_SHA384
      ECDSA with SHA-384 (1.2.840.10045.4.3.3).
      See Also:
    • ECDSA_WITH_SHA512

      public static final int ECDSA_WITH_SHA512
      ECDSA with SHA-512 (1.2.840.10045.4.3.4).
      See Also:
    • ECDSA_WITH_SHAKE128

      public static final int ECDSA_WITH_SHAKE128
      ECDSA with SHAKE128 (1.3.6.1.5.5.7.6.32).
      See Also:
    • ECDSA_WITH_SHAKE256

      public static final int ECDSA_WITH_SHAKE256
      ECDSA with SHAKE256 (1.3.6.1.5.5.7.6.33).
      See Also:
    • UNSIGNED

      public static final int UNSIGNED
      Unsigned (1.3.6.1.5.5.7.6.36).
      See Also:
    • SM2_WITH_SM3

      public static final int SM2_WITH_SM3
      SM2 with SM3 (1.2.156.10197.1.501).
      See Also:
    • ED25519

      public static final int ED25519
      Ed25519 (1.3.101.112).
      See Also:
    • ED448

      public static final int ED448
      Ed448 (1.3.101.113).
      See Also:
    • ECDH_POP_SHA256_HMAC_SHA256

      public static final int ECDH_POP_SHA256_HMAC_SHA256
      RFC 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_SHA384
      RFC 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_SHA512
      RFC 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_SHA256
      RSASSA-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_SHA384
      RSASSA-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_SHA512
      RSASSA-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_SHA256
      RSASSA-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_SHA384
      RSASSA-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_SHA512
      RSASSA-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_SHAKE128
      RSASSA-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_SHAKE256
      RSASSA-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

      public static Integer getValue(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.
    • 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.