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.ASN1Encodable, .ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DERBitString, .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(int
the bitLength of the order of the curve.
orderBitLength
,
BigInteger
the private key value.
key
)

Base constructor.

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

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

Method Summary

Modifier and TypeMethod and Description
public static ECPrivateKey
public BigInteger
private ASN1Primitive
getObjectInTag(int tagNo)

public ASN1Primitive
public DERBitString
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:
equalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

seqback to summary
private ASN1Sequence seq

Constructor Detail

ECPrivateKeyback to summary
private ECPrivateKey(ASN1Sequence seq)
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(int orderBitLength, BigInteger key, ASN1Encodable parameters)
ECPrivateKeyback to summary
public ECPrivateKey(int orderBitLength, BigInteger key, DERBitString publicKey, ASN1Encodable parameters)

Method Detail

getInstanceback to summary
public static ECPrivateKey getInstance(Object obj)
getKeyback to summary
public BigInteger getKey()
getObjectInTagback to summary
private ASN1Primitive getObjectInTag(int tagNo)
getParametersback to summary
public ASN1Primitive getParameters()
getPublicKeyback to summary
public DERBitString 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.