|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.x509.PublicKeyInfo iaik.security.ecc.ecdsa.ECPublicKey
Representation of a public key for the ECDSA algorithm and implementation of the PublicKey Interface. It is derived from PublicKeyInfo which makes it suitable for use in X.509 certificates.
Field Summary | |
protected static java.lang.String |
ALGORITHM
the name of the algorithm |
Fields inherited from class iaik.x509.PublicKeyInfo |
public_key_algorithm |
Fields inherited from interface java.security.PublicKey |
serialVersionUID |
Constructor Summary | |
ECPublicKey(iaik.asn1.ASN1Object obj)
Creates a new PublicKeyInfo from an ASN1Object. |
|
ECPublicKey(byte[] arr)
Creates a new PublicKey from an ASN.1 encoded DER byte array. |
|
ECPublicKey(ECDSAParams p,
ECPoint w)
Creates a new public key |
|
ECPublicKey(ECDSAPublicKeySpec spec)
Creates a new public key from a spec. |
|
ECPublicKey(java.io.InputStream is)
Reads the DER or BER encoded public key info from an input stream. |
Method Summary | |
protected void |
decode(byte[] publicKey)
Decodes an DER encoded ECPublic Key |
protected byte[] |
encode()
|
java.lang.String |
getAlgorithm()
Implementation of the interface methods. |
ECDSAParams |
getParameter()
|
ECPoint |
getW()
|
int |
hashCode()
Returns the hash code of this ECPublicKey. |
java.lang.String |
toString()
|
void |
validatePublicKey()
validates the public key |
Methods inherited from class iaik.x509.PublicKeyInfo |
clone, createPublicKeyInfo, decode, equals, getEncoded, getFingerprint, getFormat, getPublicKey, getPublicKey, toASN1Object, writeTo |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Key |
getEncoded, getFormat |
Field Detail |
protected static final java.lang.String ALGORITHM
getAlgorithm()
,
Constant Field ValuesConstructor Detail |
public ECPublicKey(iaik.asn1.ASN1Object obj) throws java.security.InvalidKeyException
public ECPublicKey(byte[] arr) throws java.security.InvalidKeyException
public ECPublicKey(ECDSAParams p, ECPoint w)
p
- the domain parameters of the elliptic curvew
- the point on the elliptic curve, satisfying W = s*G,
where s is the private keypublic ECPublicKey(ECDSAPublicKeySpec spec)
spec
- the key materialpublic ECPublicKey(java.io.InputStream is) throws java.security.InvalidKeyException, java.io.IOException
is
- the input stream providing the data
java.security.InvalidKeyException
- if the provided key data is invalid.
java.io.IOException
- if the I/O error occursMethod Detail |
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public ECDSAParams getParameter()
getParameter
in interface ECDSAKey
PublicKeyInfo.getPublicKey(byte[])
public ECPoint getW()
getW
in interface ECDSAPublicKey
getParameter()
public int hashCode()
public java.lang.String toString()
public void validatePublicKey()
protected void decode(byte[] publicKey) throws java.security.InvalidKeyException
publicKey
- the DER encoded key
java.security.InvalidKeyException
- if the encoded key is invalid or the
encoded parameters are not supported.protected byte[] encode()
|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |