public abstract class AbstractECPublicKey extends iaik.x509.PublicKeyInfo implements ECPublicKey, ECKey
ECPublicKey
interface. It is derived from
PublicKeyInfo
which makes it suitable for use in X.509 certificates.
References:
[1] ANSI X9.62-2005, "American National Standard for Financial Services - The Elliptic Curve Digital Signature Algorithm (ECDSA)" , ASC X9, November 2005.
AbstractECPrivateKey
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected iaik.asn1.OCTET_STRING |
encodedPublicKey_
The ASN.1 representation of the public key
|
protected ECParameterSpec |
params_
Domain parameters of the elliptic curve
|
protected ECPoint |
w_
The public key (point on the elliptic curve) satisfying
W = s*G , where s is the private key |
serialVersionUID
Modifier | Constructor and Description |
---|---|
protected |
AbstractECPublicKey()
Creates a new instance; only for internal use
|
|
AbstractECPublicKey(iaik.asn1.ASN1Object keyObj)
Creates a new public key from an ASN.1 Object.
|
|
AbstractECPublicKey(byte[] encoded)
Creates a new PublicKey from an ASN.1 encoded DER byte array.
|
|
AbstractECPublicKey(ECParameterSpec params,
ECPoint w)
Creates a new public key object.
|
protected |
AbstractECPublicKey(ECParameterSpec params,
ECPoint w,
boolean check)
Creates a new public key object.
|
|
AbstractECPublicKey(InputStream is)
Reads the DER or BER encoded public key info from an input stream.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
createEncodedPublicKey()
Creates the ASN.1 public key structure.
|
protected byte[] |
encode() |
boolean |
equals(Object obj) |
ECParameterSpec |
getParams()
Returns the domain parameters of the associated elliptic curve.
|
ECPoint |
getW() |
int |
hashCode() |
abstract boolean |
isValid()
Determines whether this public key is valid according to its specification.
|
clone, createPublicKeyInfo, decode, decode, getAlgorithm, getAlgorithmID, getEncoded, getFingerprint, getFormat, getPublicKey, getPublicKey, getPublicKey, getPublicKey, getPublicKey, getPublicKey, toASN1Object, toString, writeTo
finalize, getClass, notify, notifyAll, wait, wait, wait
getAlgorithm, getEncoded, getFormat
getKeyLength
protected transient iaik.asn1.OCTET_STRING encodedPublicKey_
protected transient ECPoint w_
W = s*G
, where s
is the private keyprotected transient ECParameterSpec params_
public AbstractECPublicKey(iaik.asn1.ASN1Object keyObj) throws InvalidKeyException
keyObj
- the ASN.1 object holding the public key informationInvalidKeyException
- if the given ASN1Object
does not hold a valid EC public
keypublic AbstractECPublicKey(byte[] encoded) throws InvalidKeyException
encoded
- the byte arrayInvalidKeyException
- thrown if the given encoded key could not be decodedprotected AbstractECPublicKey(ECParameterSpec params, ECPoint w, boolean check)
params
- the domain parameters of the elliptic curvew
- the point on the elliptic curve, satisfying W = s*G
check
- check if w is a valid pointpublic AbstractECPublicKey(ECParameterSpec params, ECPoint w)
params
- the domain parameters of the elliptic curvew
- the point on the elliptic curve, satisfying W = s*G
public AbstractECPublicKey(InputStream is) throws IOException, InvalidKeyException
is
- the input stream providing the dataInvalidKeyException
- if the provided key data is invalidIOException
- if the I/O error occursprotected AbstractECPublicKey()
protected abstract void createEncodedPublicKey()
public ECParameterSpec getParams()
ECKey
public ECPoint getW()
getW
in interface ECPublicKey
protected byte[] encode()
encode
in class iaik.x509.PublicKeyInfo
public abstract boolean isValid()
public int hashCode()
hashCode
in class iaik.x509.PublicKeyInfo
public boolean equals(Object obj)
equals
in class iaik.x509.PublicKeyInfo
Copyright © 2011–2022 Stiftung SIC. All rights reserved.