Top Description Fields Constructors Methods
org.bouncycastle.asn1.sec

public Class ECPrivateKey

extends ASN1Object
Class Inheritance
Imports
java.math.BigInteger, java.util.Enumeration, org.bouncycastle.asn1.ASN1BitString, .ASN1Encodable, .ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .BERTags, .DEROctetString, .DERSequence, .DERTaggedObject, org.bouncycastle.util.BigIntegers

the elliptic curve private key object from SEC 1

Field Summary

Modifier and TypeField and Description
private ASN1Sequence

Constructor Summary

AccessConstructor and Description
private
public
ECPrivateKey(BigInteger key)

Deprecated use constructor which takes orderBitLength to guarantee correct encoding.
public
ECPrivateKey(int
the bitLength of the order of the curve.
orderBitLength
,
BigInteger
the private key value.
key
)

Base constructor.

public
ECPrivateKey(BigInteger key, ASN1Encodable parameters)

Deprecated use constructor which takes orderBitLength to guarantee correct encoding.
public
ECPrivateKey(BigInteger key, ASN1BitString publicKey, ASN1Encodable parameters)

Deprecated use constructor which takes orderBitLength to guarantee correct encoding.
public
ECPrivateKey(int orderBitLength, BigInteger key, ASN1Encodable parameters)

public
ECPrivateKey(int orderBitLength, BigInteger key, ASN1BitString publicKey, ASN1Encodable parameters)

Method Summary

Modifier and TypeMethod and Description
public static ECPrivateKey
public BigInteger
private ASN1Object
getObjectInTag(int tagNo, int baseTagNo)

public ASN1Primitive
getParameters()

Deprecated Use getParametersObject() instead and getInstance methods or similar to get the object at the desired type.
public ASN1Object
public ASN1BitString
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] Parameters OPTIONAL, publicKey [1] BIT STRING OPTIONAL }
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

seqback to summary
private ASN1Sequence seq

Constructor Detail

ECPrivateKeyback to summary
private ECPrivateKey(ASN1Sequence seq)
ECPrivateKeyback to summary
public ECPrivateKey(BigInteger key)

Deprecated

use constructor which takes orderBitLength to guarantee correct encoding.

ECPrivateKeyback to summary
public ECPrivateKey(int orderBitLength, BigInteger key)

Base constructor.

Parameters
orderBitLength:int

the bitLength of the order of the curve.

key:BigInteger

the private key value.

ECPrivateKeyback to summary
public ECPrivateKey(BigInteger key, ASN1Encodable parameters)

Deprecated

use constructor which takes orderBitLength to guarantee correct encoding.

ECPrivateKeyback to summary
public ECPrivateKey(BigInteger key, ASN1BitString publicKey, ASN1Encodable parameters)

Deprecated

use constructor which takes orderBitLength to guarantee correct encoding.

ECPrivateKeyback to summary
public ECPrivateKey(int orderBitLength, BigInteger key, ASN1Encodable parameters)
ECPrivateKeyback to summary
public ECPrivateKey(int orderBitLength, BigInteger key, ASN1BitString publicKey, ASN1Encodable parameters)

Method Detail

getInstanceback to summary
public static ECPrivateKey getInstance(Object obj)
getKeyback to summary
public BigInteger getKey()
getObjectInTagback to summary
private ASN1Object getObjectInTag(int tagNo, int baseTagNo)
getParametersback to summary
public ASN1Primitive getParameters()

Deprecated

Use getParametersObject() instead and getInstance methods or similar to get the object at the desired type.

getParametersObjectback to summary
public ASN1Object getParametersObject()
getPublicKeyback to summary
public ASN1BitString getPublicKey()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] Parameters OPTIONAL, publicKey [1] BIT STRING OPTIONAL }

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

a primitive representation of this object.