Class ECSignature


  • public class ECSignature
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ECSignature()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] rewrapSignature​(byte[] signature)
      Rewrap a signature that contains redundant 00 bytes in the encoded integer
      static byte[] unwrapSignature​(byte[] signature, int size)  
      static byte[] wrapSignature​(byte[] signature)
      Wrap an ECDSA signature in the format r || s into a TLV encoding as defined by RFC 3279
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ECSignature

        public ECSignature()
    • Method Detail

      • wrapSignature

        public static byte[] wrapSignature​(byte[] signature)
        Wrap an ECDSA signature in the format r || s into a TLV encoding as defined by RFC 3279
        Parameters:
        signature - containing the concatenation of r and s as unsigned integer values
        Returns:
        ASN.1 SEQUENCE objects containing two signed integer r and s
        Throws:
        TLVEncodingException
      • unwrapSignature

        public static byte[] unwrapSignature​(byte[] signature,
                                             int size)
      • rewrapSignature

        public static byte[] rewrapSignature​(byte[] signature)
        Rewrap a signature that contains redundant 00 bytes in the encoded integer
        Parameters:
        signature - the TLV encoded signature
        Returns:
        the rewrapped signature