public abstract class AbstractECPrivateKey extends iaik.pkcs.pkcs8.PrivateKeyInfo implements ECPrivateKey, ECKey
ECPrivateKey interface. It is derived from
 PrivateKeyInfo, which makes it suitable for use with PKCS#8.
 PKCS#8 [1] defines a syntax for encapsulating private key information:
 PrivateKeyInfo ::= SEQUENCE {
   version Version,
   privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
   privateKey PrivateKey
   attributes [0] IMPLICIT Attributes OPTIONAL }
 
 This class implements some common methods and defines interfaces for all EC
 private keys.
 References:
[1] An RSA Laboratories Technical Note. 1993. PKCS #8: Private-Key Information Syntax Standard v2.1
AbstractECPublicKey, 
Serialized Form| Modifier and Type | Field and Description | 
|---|---|
| protected iaik.asn1.ASN1 | encodedPrivateKey_ASN.1 encoding of the private key. | 
| protected ECParameterSpec | params_ | 
| protected BigInteger | s_ | 
| protected ECPoint | w_ | 
serialVersionUID| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractECPrivateKey()Creates a new instance; only for internal use | 
|   | AbstractECPrivateKey(byte[] encoded)Constructs a new private key from an encoded ASN.1 structure. | 
|   | AbstractECPrivateKey(ECParameterSpec params,
                    BigInteger s)Constructs a new private key from a set of curve parameters and a secret
 integer  s. | 
|   | AbstractECPrivateKey(ECParameterSpec params,
                    BigInteger s,
                    ECPoint publicKey)Creates a new private key with the specified parameters. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract void | createEncodedPrivateKey()Creates the ASN.1 private key structure. | 
| protected byte[] | encode() | 
| boolean | equals(Object obj) | 
| protected void | finalize() | 
| ECParameterSpec | getParams()Returns the domain parameters of the associated elliptic curve. | 
| abstract AbstractECPublicKey | getPublicKey()Returns the corresponding  AbstractECPublicKey. | 
| BigInteger | getS() | 
| int | hashCode() | 
clone, createPrivateKeyInfo, decode, decode, getAlgorithm, getAlgorithmID, getAttributes, getEncoded, getFormat, getPrivateKey, getPrivateKey, getPrivateKey, getPrivateKey, getPrivateKey, getPrivateKey, getPubKey, setAttributes, setPubKey, toASN1Object, toString, writeTogetAlgorithm, getEncoded, getFormatdestroy, isDestroyedgetKeyLengthprotected transient iaik.asn1.ASN1 encodedPrivateKey_
protected transient BigInteger s_
protected transient ECParameterSpec params_
protected transient ECPoint w_
public AbstractECPrivateKey(byte[] encoded)
                     throws InvalidKeyException
encoded - the byte[] holding the ASN.1 structureInvalidKeyException - thrown if the given encoded key could not be decodedpublic AbstractECPrivateKey(ECParameterSpec params, BigInteger s)
s.params - the curve parameterss - the private keypublic AbstractECPrivateKey(ECParameterSpec params, BigInteger s, ECPoint publicKey)
params - the domain parameterss - the private keypublicKey - the corresponding public key (may be null)protected AbstractECPrivateKey()
protected void finalize()
                 throws Throwable
protected byte[] encode()
encode in class iaik.pkcs.pkcs8.PrivateKeyInfoprotected abstract void createEncodedPrivateKey()
public ECParameterSpec getParams()
ECKeypublic BigInteger getS()
getS in interface ECPrivateKeypublic int hashCode()
hashCode in class iaik.pkcs.pkcs8.PrivateKeyInfopublic boolean equals(Object obj)
equals in class iaik.pkcs.pkcs8.PrivateKeyInfopublic abstract AbstractECPublicKey getPublicKey()
AbstractECPublicKey.AbstractECPublicKeyCopyright © 2011–2022 Stiftung SIC. All rights reserved.