SignatureScheme
Keywords: net.corda.core.crypto.SignatureScheme class
Date: 2023-09-18

net.corda.core.crypto

## Class SignatureScheme

- net.corda.core.crypto.SignatureScheme

-     public class SignatureScheme

  This class is used to define a digital signature scheme.

- - ### Constructor Detail

    - #### SignatureScheme

          public SignatureScheme(int schemeNumberID,
                                 @NotNull
                                 java.lang.String schemeCodeName,
                                 @NotNull
                                 org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureOID,
                                 @NotNull
                                 java.util.List<? extends org.bouncycastle.asn1.x509.AlgorithmIdentifier> alternativeOIDs,
                                 @NotNull
                                 java.lang.String providerName,
                                 @NotNull
                                 java.lang.String algorithmName,
                                 @NotNull
                                 java.lang.String signatureName,
                                 @Nullable
                                 java.security.spec.AlgorithmParameterSpec algSpec,
                                 @Nullable
                                 java.lang.Integer keySize,
                                 @NotNull
                                 java.lang.String desc)

      This class is used to define a digital signature scheme.

      Parameters:
        `schemeNumberID` - unique number ID for better efficiency on-wire serialisation.
        `schemeCodeName` - unique code name for this signature scheme (e.g. RSA_SHA256, ECDSA_SECP256K1_SHA256, ECDSA_SECP256R1_SHA256,EDDSA_ED25519_SHA512, SPHINCS-256_SHA512).
        `signatureOID` - ASN.1 algorithm identifier of the signature algorithm (e.g 1.3.101.112 for EdDSA)
        `alternativeOIDs` - ASN.1 algorithm identifiers for keys of the signature, where we want to map multiple keys tothe same signature scheme.
        `providerName` - the provider's name (e.g. "BC").
        `algorithmName` - which signature algorithm is used (e.g. RSA, ECDSA. EdDSA, SPHINCS-256).
        `signatureName` - a signature-scheme name as required to create Signature objects (e.g. "SHA256withECDSA")
        `algSpec` - parameter specs for the underlying algorithm. Note that RSA is defined by the key size rather than algSpec.eg. ECGenParameterSpec("secp256k1").
        `keySize` - the private key size (currently used for RSA only).
        `desc` - a human-readable description for this scheme.

  - ### Method Detail

    - #### getSchemeNumberID

          public int getSchemeNumberID()

      unique number ID for better efficiency on-wire serialisation.

    - #### getSchemeCodeName

          @NotNull
          public java.lang.String getSchemeCodeName()

      unique code name for this signature scheme

      (e.g. RSA_SHA256, ECDSA_SECP256K1_SHA256, ECDSA_SECP256R1_SHA256,EDDSA_ED25519_SHA512, SPHINCS-256_SHA512).

    - #### getSignatureOID

          @NotNull
          public org.bouncycastle.asn1.x509.AlgorithmIdentifier getSignatureOID()

      ASN.1 algorithm identifier of the signature algorithm

      (e.g 1.3.101.112 for EdDSA)

    - #### getAlternativeOIDs

          @NotNull
          public java.util.List<org.bouncycastle.asn1.x509.AlgorithmIdentifier> getAlternativeOIDs()

      ASN.1 algorithm identifiers for keys of the signature,

      where we want to map multiple keys tothe same signature scheme.

    - #### getProviderName

          @NotNull
          public java.lang.String getProviderName()

      the provider

      's name (e.g. "BC").

    - #### getAlgorithmName

          @NotNull
          public java.lang.String getAlgorithmName()

      which signature algorithm is used

      (e.g. RSA, ECDSA. EdDSA, SPHINCS-256).

    - #### getSignatureName

          @NotNull
          public java.lang.String getSignatureName()

      a signature-scheme name as required to create

      Signature objects (e.g. "SHA256withECDSA")

      See Also:
        Signature

    - #### getAlgSpec

          @Nullable
          public java.security.spec.AlgorithmParameterSpec getAlgSpec()

      parameter specs for the underlying algorithm.

      Note that RSA is defined by the key size rather than algSpec.eg. ECGenParameterSpec("secp256k1").

    - #### getKeySize

          @Nullable
          public java.lang.Integer getKeySize()

      the private key size

      (currently used for RSA only).

    - #### getDesc

          @NotNull
          public java.lang.String getDesc()

      a human-readable description for this scheme.

    - #### component1

          public int component1()

      unique number ID for better efficiency on-wire serialisation.

    - #### component2

          @NotNull
          public java.lang.String component2()

      unique code name for this signature scheme

      (e.g. RSA_SHA256, ECDSA_SECP256K1_SHA256, ECDSA_SECP256R1_SHA256,EDDSA_ED25519_SHA512, SPHINCS-256_SHA512).

    - #### component3

          @NotNull
          public org.bouncycastle.asn1.x509.AlgorithmIdentifier component3()

      ASN.1 algorithm identifier of the signature algorithm

      (e.g 1.3.101.112 for EdDSA)

    - #### component4

          @NotNull
          public java.util.List<org.bouncycastle.asn1.x509.AlgorithmIdentifier> component4()

      ASN.1 algorithm identifiers for keys of the signature,

      where we want to map multiple keys tothe same signature scheme.

    - #### component5

          @NotNull
          public java.lang.String component5()

      the provider

      's name (e.g. "BC").

    - #### component6

          @NotNull
          public java.lang.String component6()

      which signature algorithm is used

      (e.g. RSA, ECDSA. EdDSA, SPHINCS-256).

    - #### component7

          @NotNull
          public java.lang.String component7()

      a signature-scheme name as required to create

      Signature objects (e.g. "SHA256withECDSA")

      See Also:
        Signature

    - #### component8

          @Nullable
          public java.security.spec.AlgorithmParameterSpec component8()

      parameter specs for the underlying algorithm.

      Note that RSA is defined by the key size rather than algSpec.eg. ECGenParameterSpec("secp256k1").

    - #### component9

          @Nullable
          public java.lang.Integer component9()

      the private key size

      (currently used for RSA only).

    - #### component10

          @NotNull
          public java.lang.String component10()

      a human-readable description for this scheme.

    - #### copy

          @NotNull
          public SignatureScheme copy(int schemeNumberID,
                                               @NotNull
                                               java.lang.String schemeCodeName,
                                               @NotNull
                                               org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureOID,
                                               @NotNull
                                               java.util.List<? extends org.bouncycastle.asn1.x509.AlgorithmIdentifier> alternativeOIDs,
                                               @NotNull
                                               java.lang.String providerName,
                                               @NotNull
                                               java.lang.String algorithmName,
                                               @NotNull
                                               java.lang.String signatureName,
                                               @Nullable
                                               java.security.spec.AlgorithmParameterSpec algSpec,
                                               @Nullable
                                               java.lang.Integer keySize,
                                               @NotNull
                                               java.lang.String desc)

      This class is used to define a digital signature scheme.

      Parameters:
        `schemeNumberID` - unique number ID for better efficiency on-wire serialisation.
        `schemeCodeName` - unique code name for this signature scheme (e.g. RSA_SHA256, ECDSA_SECP256K1_SHA256, ECDSA_SECP256R1_SHA256, EDDSA_ED25519_SHA512, SPHINCS-256_SHA512).
        `signatureOID` - ASN.1 algorithm identifier of the signature algorithm (e.g 1.3.101.112 for EdDSA)
        `alternativeOIDs` - ASN.1 algorithm identifiers for keys of the signature, where we want to map multiple keys to the same signature scheme.
        `providerName` - the provider's name (e.g. "BC").
        `algorithmName` - which signature algorithm is used (e.g. RSA, ECDSA. EdDSA, SPHINCS-256).
        `signatureName` - a signature-scheme name as required to create Signature objects (e.g. "SHA256withECDSA")
        `algSpec` - parameter specs for the underlying algorithm. Note that RSA is defined by the key size rather than algSpec. eg. ECGenParameterSpec("secp256k1").
        `keySize` - the private key size (currently used for RSA only).
        `desc` - a human-readable description for this scheme.

    - #### toString

          @NotNull
          public java.lang.String toString()

      This class is used to define a digital signature scheme.

    - #### hashCode

          public int hashCode()

      This class is used to define a digital signature scheme.

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      This class is used to define a digital signature scheme.