APIdia Launch Partner
Top Inners Fields Constructors Methods
com.sun.org.apache.xml.internal.security.algorithms.implementations

public final Class ECDSAUtils

extends Object
Class Inheritance
Imports
java.io.IOException, java.math.BigInteger, java.security.interfaces.ECPublicKey, java.security.spec.ECField, .ECFieldF2m, .ECFieldFp, .ECParameterSpec, .ECPoint, .EllipticCurve, java.util.ArrayList, .List

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private static final List<ECDSAUtils.ECCurveDefinition>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static byte[]

Returns:

the decoded bytes
convertASN1toXMLDSIG
(byte[]
the ASN.1 encoded bytes
asn1Bytes
,
int
the intended length of decoded bytes for an integer. If -1, choose one automatically.
rawLen
)

Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value.

public static byte[]

Returns:

the encoded ASN.1 bytes
convertXMLDSIGtoASN1
(byte[] xmldsigBytes)

Converts a XML Signature ECDSA Value to an ASN.1 DSA value.

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

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

public static ECDSAUtils.ECCurveDefinition
public static String
public static byte[]
stripLeadingZeros(byte[] bytes)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ecCurveDefinitionsback to summary
private static final List<ECDSAUtils.ECCurveDefinition> ecCurveDefinitions

Constructor Detail

ECDSAUtilsback to summary
private ECDSAUtils()

Method Detail

convertASN1toXMLDSIGback to summary
public static byte[] convertASN1toXMLDSIG(byte[] asn1Bytes, int rawLen) 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:byte[]

the ASN.1 encoded bytes

rawLen:int

the intended length of decoded bytes for an integer. If -1, choose one automatically.

Returns:byte[]

the decoded bytes

See Also
6.4.1 DSA, 3.3. ECDSA Signatures
convertXMLDSIGtoASN1back to summary
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.
Returns:byte[]

the encoded ASN.1 bytes

See Also
6.4.1 DSA, 3.3. ECDSA Signatures
decodePointback to summary
public static ECPoint decodePoint(byte[] encodedBytes, EllipticCurve elliptiCcurve)
encodePointback to summary
public static byte[] encodePoint(ECPoint ecPoint, EllipticCurve ellipticCurve)
getECCurveDefinitionback to summary
public static ECDSAUtils.ECCurveDefinition getECCurveDefinition(String oid)
getOIDFromPublicKeyback to summary
public static String getOIDFromPublicKey(ECPublicKey ecPublicKey)
stripLeadingZerosback to summary
public static byte[] stripLeadingZeros(byte[] bytes)
com.sun.org.apache.xml.internal.security.algorithms.implementations back to summary

public Class ECDSAUtils.ECCurveDefinition

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xml.internal.security.algorithms.implementations.ECDSAUtils.ECCurveDefinition

Field Summary

Modifier and TypeField and Description
private final String
a

private final String
b

private final String
private final int
h

private final String
n

private final String
private final String
private final String
x

private final String
y

Constructor Summary

AccessConstructor and Description
public
ECCurveDefinition(String name, String oid, String field, String a, String b, String x, String y, String n, int h)

Method Summary

Modifier and TypeMethod and Description
public String
equals(BigInteger field, BigInteger a, BigInteger b, BigInteger x, BigInteger y, BigInteger n, int h)

returns the ec oid if parameter are equal to this definition

public String
getA()

public String
getB()

public String
public int
getH()

public String
getN()

public String
public String
public String
getX()

public String
getY()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aback to summary
private final String a
bback to summary
private final String b
fieldback to summary
private final String field
hback to summary
private final int h
nback to summary
private final String n
nameback to summary
private final String name
oidback to summary
private final String oid
xback to summary
private final String x
yback to summary
private final String y

Constructor Detail

ECCurveDefinitionback to summary
public ECCurveDefinition(String name, String oid, String field, String a, String b, String x, String y, String n, int h)

Method Detail

equalsback to summary
public String equals(BigInteger field, BigInteger a, BigInteger b, BigInteger x, BigInteger y, BigInteger n, int h)

returns the ec oid if parameter are equal to this definition

getAback to summary
public String getA()
getBback to summary
public String getB()
getFieldback to summary
public String getField()
getHback to summary
public int getH()
getNback to summary
public String getN()
getNameback to summary
public String getName()
getOidback to summary
public String getOid()
getXback to summary
public String getX()
getYback to summary
public String getY()