java.lang.Object
org.apache.xml.security.algorithms.implementations.ECDSAUtils

public final class ECDSAUtils extends Object
  • Method Details

    • convertASN1toXMLDSIG

      public static byte[] convertASN1toXMLDSIG(byte[] asn1Bytes) throws IOException
      Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value.

      The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r, s) value pairs; the XML Signature requires the core BigInteger values.
      Parameters:
      asn1Bytes -
      Returns:
      the decode bytes
      Throws:
      IOException
      See Also:
    • convertXMLDSIGtoASN1

      public static byte[] convertXMLDSIGtoASN1(byte[] xmldsigBytes) throws IOException
      Converts a XML Signature ECDSA Value to an ASN.1 DSA value.

      The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r, s) value pairs; the XML Signature requires the core BigInteger values.
      Parameters:
      xmldsigBytes -
      Returns:
      the encoded ASN.1 bytes
      Throws:
      IOException
      See Also:
    • getOIDFromPublicKey

      public static String getOIDFromPublicKey(ECPublicKey ecPublicKey)
    • getECCurveDefinition

      public static ECDSAUtils.ECCurveDefinition getECCurveDefinition(String oid)
    • encodePoint

      public static byte[] encodePoint(ECPoint ecPoint, EllipticCurve ellipticCurve)
    • decodePoint

      public static ECPoint decodePoint(byte[] encodedBytes, EllipticCurve elliptiCcurve)
    • stripLeadingZeros

      public static byte[] stripLeadingZeros(byte[] bytes)