public class PublicKeyEC extends CVCPublicKey implements ECPublicKey
| Modifier and Type | Field and Description |
|---|---|
static byte |
UNCOMPRESSED_POINT_TAG
Byte value indicating the start of an uncompressed Point data array
|
CVC_VERSION, NEWLINE| Constructor and Description |
|---|
PublicKeyEC(GenericPublicKeyField genericKey)
Creates an instance from a GenericPublicKeyField
|
PublicKeyEC(OIDField oid,
ECPublicKey pubKeyEC,
AuthorizationRole authRole)
Creates an instance from an OIDField and a java.security.interfaces.ECPublicKey
|
PublicKeyEC(OIDField oid,
ECPublicKey pubKeyEC,
AuthorizationRoleEnum authRole)
Creates an instance from an OIDField and a java.security.interfaces.ECPublicKey.
|
| Modifier and Type | Method and Description |
|---|---|
static ECPoint |
decodePoint(byte[] data)
Decodes an uncompressed ECPoint.
|
static byte[] |
encodePoint(ECPoint ecPoint,
EllipticCurve curve)
Uncompressed encoding of a ECPoint according to BSI-TR-03111 chapter 3.1.1:
0x04 || enc(X) || enc(Y)
|
String |
getAlgorithm() |
protected CVCTagEnum[] |
getAllowedFields()
Returns tags for all allowed subfields, in the same order as they
appear when DER-encoded
|
protected List<CVCObject> |
getEncodableFields()
Overridden method that enables us to control exactly which fields that are
included when DER-encoding.
|
String |
getFormat() |
ECParameterSpec |
getParams() |
ECPoint |
getW() |
getEncoded, getObjectIdentifierencode, getAsText, getAsText, getDEREncoded, getSubfieldsdecodeLength, encodeLength, getAsText, getAsText, getParent, getTag, setParent, toByteArray, toByteArray, trimByteArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEncodedpublic static final byte UNCOMPRESSED_POINT_TAG
public PublicKeyEC(GenericPublicKeyField genericKey) throws ConstructionException, NoSuchFieldException
genericKey - NoSuchFieldExceptionConstructionExceptionpublic PublicKeyEC(OIDField oid, ECPublicKey pubKeyEC, AuthorizationRole authRole) throws ConstructionException
oid - pubKeyEC - authRole - role of certificate holder. If null or 'CVCA' all subfields are added,
otherwise only the required ones.ConstructionExceptionpublic PublicKeyEC(OIDField oid, ECPublicKey pubKeyEC, AuthorizationRoleEnum authRole) throws ConstructionException
ConstructionExceptionprotected CVCTagEnum[] getAllowedFields()
AbstractSequencegetAllowedFields in class AbstractSequenceprotected List<CVCObject> getEncodableFields()
getEncodableFields in class AbstractSequencepublic String getAlgorithm()
getAlgorithm in interface Keypublic ECParameterSpec getParams()
public ECPoint getW()
getW in interface ECPublicKeypublic static byte[] encodePoint(ECPoint ecPoint, EllipticCurve curve)
ecPoint - the point to encodecurve - the curve used to get the field size, or null. If curve is given we can accurately decide the field size.
If null is given we take the field size to be the largest of affineX.length and affineY.length, which will work in the majority of cases but might randomly produce the wrong result (a chance of 1 over 2^16).public static ECPoint decodePoint(byte[] data)
data - Copyright © 2017. All rights reserved.