ASN.1 syntax for EC private keys from SEC 1 v1.5 (draft):
EXPLICIT TAGS
ECPrivateKey ::= SEQUENCE {
version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
privateKey OCTET STRING,
parameters [0] ECDomainParameters {{ SECGCurveNames }} OPTIONAL,
publicKey [1] BIT STRING OPTIONAL
}
We currently ignore the optional parameters and publicKey fields. We
require that the parameters are encoded as part of the AlgorithmIdentifier,
not in the private key structure.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private byte[] | |
| private ECParameterSpec | |
| private BigInteger | |
| private final byte | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public PublicKey | calculatePublicKey()
Overrides default sun. Calculates a matching public key. |
| public String | getAlgorithm()
Overrides sun. Implements java. Returns the standard algorithm name for this key. |
| public byte[] | |
| public ECParameterSpec | getParams()
Overrides default java. Returns the parameters associated with this key. |
| public BigInteger | |
| private void | |
| private void | |
| public static BitArray | |
| private void | readObject(ObjectInputStream
the stream)ObjectInputStream from which data is readHides sun. Restores the state of this object from the stream. |
| arrayS | back to summary |
|---|---|
| private byte[] arrayS | |
| domainParams | back to summary |
|---|---|
| private byte[] domainParams | |
| params | back to summary |
|---|---|
private ECParameterSpec params
| |
| s | back to summary |
|---|---|
| private BigInteger s | |
| SEC1v2 | back to summary |
|---|---|
| private final byte SEC1v2 | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides sun. | |
| ECPrivateKeyImpl | back to summary |
|---|---|
| pack-priv ECPrivateKeyImpl(byte[] encoded) throws InvalidKeyException Construct a key from its encoding. Called by the ECKeyFactory. | |
| ECPrivateKeyImpl | back to summary |
|---|---|
| pack-priv ECPrivateKeyImpl(BigInteger s, ECParameterSpec params) throws InvalidKeyException Construct a key from its components. Used by the KeyFactory. | |
| ECPrivateKeyImpl | back to summary |
|---|---|
| pack-priv ECPrivateKeyImpl(byte[] s, ECParameterSpec params) throws InvalidKeyException | |
| calculatePublicKey | back to summary |
|---|---|
| public PublicKey calculatePublicKey() Overrides default sun. Doc from sun. Calculates a matching public key. | |
| getAlgorithm | back to summary |
|---|---|
| public String getAlgorithm() Overrides sun. Implements java. Doc from java. Returns the standard algorithm name for this key. For example, "RSA" would indicate that this key is an RSA key. See the Key Algorithms section in the Java Security Standard Algorithm Names Specification for information about standard key algorithm names. | |
| getArrayS | back to summary |
|---|---|
| public byte[] getArrayS() | |
| getParams | back to summary |
|---|---|
| public ECParameterSpec getParams() Overrides default java. Doc from java. Returns the parameters associated with this key. The parameters are optional and may be either explicitly specified or implicitly created during key pair generation. | |
| getS | back to summary |
|---|---|
| public BigInteger getS() Implements java. Doc from java. Returns the private value S. | |
| makeEncoding | back to summary |
|---|---|
| private void makeEncoding(byte[] privBytes) throws InvalidKeyException | |
| parseKeyBits | back to summary |
|---|---|
| private void parseKeyBits() throws InvalidKeyException Parse the ASN.1 of the privateKey Octet | |
| parsePublicBits | back to summary |
|---|---|
| public static BitArray parsePublicBits(byte[] privateBytes) | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException Hides sun. Restores the state of this object from the stream. Deserialization of this object is not supported.
| |