anon.crypto
Class MyECPrivateKey
java.lang.Object
anon.crypto.AbstractPrivateKey
anon.crypto.MyECPrivateKey
- All Implemented Interfaces:
- IMyPrivateKey, IXMLEncodable, java.io.Serializable, java.security.Key, java.security.PrivateKey
public final class MyECPrivateKey
- extends AbstractPrivateKey
- implements IMyPrivateKey
- See Also:
- Serialized Form
Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
Constructor Summary |
MyECPrivateKey(org.bouncycastle.crypto.params.ECPrivateKeyParameters params,
org.bouncycastle.asn1.DERObjectIdentifier curveId)
|
MyECPrivateKey(org.w3c.dom.Element a_xmlElement)
|
MyECPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privKeyInfo)
Use ECPrivateKeyStructure defined in "SEC 1: Elliptic Curve Cryptography"
to be compatible with OpenSSL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.security.Key |
getEncoded |
m_D
private java.math.BigInteger m_D
m_params
private MyECParams m_params
MyECPrivateKey
public MyECPrivateKey(org.bouncycastle.crypto.params.ECPrivateKeyParameters params,
org.bouncycastle.asn1.DERObjectIdentifier curveId)
MyECPrivateKey
public MyECPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privKeyInfo)
throws java.security.InvalidKeyException
- Use ECPrivateKeyStructure defined in "SEC 1: Elliptic Curve Cryptography"
to be compatible with OpenSSL
- Parameters:
privKeyInfo
-
- Throws:
java.security.InvalidKeyException
- See Also:
http://www.secg.org/
MyECPrivateKey
public MyECPrivateKey(org.w3c.dom.Element a_xmlElement)
throws java.security.InvalidKeyException,
XMLParseException
- Throws:
java.security.InvalidKeyException
XMLParseException
- See Also:
4050
createPublicKey
public IMyPublicKey createPublicKey()
- Description copied from interface:
IMyPrivateKey
- Creates the corresponding public key to this private key.
- Specified by:
createPublicKey
in interface IMyPrivateKey
- Returns:
- the corresponding public key to this private key
- See Also:
ECKeyPairGenerator
getAsPrivateKeyInfo
public org.bouncycastle.asn1.pkcs.PrivateKeyInfo getAsPrivateKeyInfo()
- Use ECPrivateKeyStructure defined in "SEC 1: Elliptic Curve Cryptography" section
to be compatible with OpenSSL
- Specified by:
getAsPrivateKeyInfo
in interface IMyPrivateKey
- Returns:
- See Also:
http://www.secg.org/
getSignatureAlgorithm
public ISignatureCreationAlgorithm getSignatureAlgorithm()
- Gets a signature algorithm object for this key.
- Specified by:
getSignatureAlgorithm
in interface IMyPrivateKey
- Returns:
- a signature algorithm object for this key
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithm
in interface java.security.Key
getFormat
public java.lang.String getFormat()
- Specified by:
getFormat
in interface java.security.Key
toXmlElement
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
- Description copied from interface:
IXMLEncodable
- Return an element that can be appended to the document. This
Method must not change the document in any way!
- Specified by:
toXmlElement
in interface IXMLEncodable
- Parameters:
a_doc
- a document
- Returns:
- the interface as xml element
getPrivateParams
public org.bouncycastle.crypto.params.ECPrivateKeyParameters getPrivateParams()