Interface EcDsaSignature

All Known Implementing Classes:
ImmutableEcDsaSignature

@Immutable public interface EcDsaSignature
  • Method Details

    • builder

    • fromDer

      static EcDsaSignature fromDer(byte[] bytes)
      Create an EcDsaSignature from a DER encoded byte array signature.
      Parameters:
      bytes - A DER encoded byte array containing a signature.
      Returns:
      An EcDsaSignature.
    • r

      The r component of this EcDsaSignature.
      Returns:
      A BigInteger denoting the r component of this signature.
    • s

      The s component of this EcDsaSignature.
      Returns:
      A BigInteger denoting the r component of this signature.
    • der

      @Derived default UnsignedByteArray der()
      Encode this EcDsaSignature to the ASN.1 DER format.
      Returns:
      An UnsignedByteArray containing the bytes of the encoded signature.
    • isStrictlyCanonical

      @Check default void isStrictlyCanonical()
      Make sure signature is canonical to protect against signature morphing attacks.

      Signature should be: <30> <len> [ <02> <lenR> <R> ] [ <02> <lenS> <S> ] where 6 <= len <= 70 1 <= lenR <= 33 1 <= lenS <= 33