|
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.pkcs.pkcs8.PrivateKeyInfo iaik.security.ecc.ecdsa.ECPrivateKey
Representation of a private key for the ECDSA algorithm and implementation of the PrivateKey Interface
Field Summary | |
protected static java.lang.String |
ALGORITHM
the name of the algorithm |
static iaik.asn1.INTEGER |
EC_PRIVATE_KEY_VERSION
the version field in the ASN.1 encoding |
static iaik.asn1.ObjectID |
OID
object identifier for the ASN.1 structure |
Fields inherited from class iaik.pkcs.pkcs8.PrivateKeyInfo |
private_key_algorithm |
Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
Constructor Summary | |
ECPrivateKey(byte[] key)
Creates a private key from an DER encoded PKCS8 key. |
|
ECPrivateKey(ECDSAParameter p,
java.math.BigInteger s,
ECPoint w)
Creates a new private key with the specified parameters. |
|
ECPrivateKey(ECDSAPrivateKeySpec spec)
Create a new private key from the key spec. |
|
ECPrivateKey(java.io.InputStream is)
Reads an DER encoded PKCS#8 private key from an input stream. |
Method Summary | |
void |
decode(byte[] privateKey)
Decodes the DER encoded private key. |
protected byte[] |
encode()
|
java.lang.String |
getAlgorithm()
Implementation of the interface method. |
ECDSAParams |
getParameter()
|
ECDSAPublicKey |
getPublicKey()
|
java.math.BigInteger |
getS()
|
java.lang.String |
toString()
Overwrites this method to provide detailled Information. |
Methods inherited from class iaik.pkcs.pkcs8.PrivateKeyInfo |
clone, createPrivateKeyInfo, decode, equals, getEncoded, getFormat, getPrivateKey, getPrivateKey, hashCode, 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 |
public static final iaik.asn1.INTEGER EC_PRIVATE_KEY_VERSION
public static final iaik.asn1.ObjectID OID
protected static final java.lang.String ALGORITHM
getAlgorithm()
,
Constant Field ValuesConstructor Detail |
public ECPrivateKey(byte[] key) throws java.security.InvalidKeyException
key
- the DER byte array.
java.security.InvalidKeyException
- if the encoded key is invalid.public ECPrivateKey(ECDSAParameter p, java.math.BigInteger s, ECPoint w)
p
- the domain parameterss
- the private keyw
- the corresponding public key (may be null)public ECPrivateKey(ECDSAPrivateKeySpec spec)
null
!
spec
- the key materialpublic ECPrivateKey(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
Method Detail |
public void decode(byte[] privateKey) throws java.security.InvalidKeyException
privateKey
- the DER byte array.
java.security.InvalidKeyException
- if the provided key data is invalid.public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public ECDSAParams getParameter()
getParameter
in interface ECDSAKey
public ECDSAPublicKey getPublicKey()
null
otherwise)public java.math.BigInteger getS()
getS
in interface ECDSAPrivateKey
public java.lang.String toString()
protected byte[] encode()
|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |