public class ChipAuthenticationPublicKeyInfo extends SecurityInfo
protocol
SHALL identify the type of the public key
(i.e. DH or ECDH).chipAuthenticationPublicKey
SHALL contain the public key
in encoded form.keyId
MAY be used to indicate the local key identifier.
It MUST be used if the MRTD chip provides multiple public keys for Chip
Authentication.ID_AA, ID_CA_DH_3DES_CBC_CBC, ID_CA_DH_AES_CBC_CMAC_128, ID_CA_DH_AES_CBC_CMAC_192, ID_CA_DH_AES_CBC_CMAC_256, ID_CA_ECDH_3DES_CBC_CBC, ID_CA_ECDH_AES_CBC_CMAC_128, ID_CA_ECDH_AES_CBC_CMAC_192, ID_CA_ECDH_AES_CBC_CMAC_256, ID_EC_PUBLIC_KEY, ID_EC_PUBLIC_KEY_TYPE, ID_PACE, ID_PACE_DH_GM, ID_PACE_DH_GM_3DES_CBC_CBC, ID_PACE_DH_GM_AES_CBC_CMAC_128, ID_PACE_DH_GM_AES_CBC_CMAC_192, ID_PACE_DH_GM_AES_CBC_CMAC_256, ID_PACE_DH_IM, ID_PACE_DH_IM_3DES_CBC_CBC, ID_PACE_DH_IM_AES_CBC_CMAC_128, ID_PACE_DH_IM_AES_CBC_CMAC_192, ID_PACE_DH_IM_AES_CBC_CMAC_256, ID_PACE_ECDH_CAM, ID_PACE_ECDH_CAM_AES_CBC_CMAC_128, ID_PACE_ECDH_CAM_AES_CBC_CMAC_192, ID_PACE_ECDH_CAM_AES_CBC_CMAC_256, ID_PACE_ECDH_GM, ID_PACE_ECDH_GM_3DES_CBC_CBC, ID_PACE_ECDH_GM_AES_CBC_CMAC_128, ID_PACE_ECDH_GM_AES_CBC_CMAC_192, ID_PACE_ECDH_GM_AES_CBC_CMAC_256, ID_PACE_ECDH_IM, ID_PACE_ECDH_IM_3DES_CBC_CBC, ID_PACE_ECDH_IM_AES_CBC_CMAC_128, ID_PACE_ECDH_IM_AES_CBC_CMAC_192, ID_PACE_ECDH_IM_AES_CBC_CMAC_256, ID_PK_DH, ID_PK_ECDH, ID_TA, ID_TA_ECDSA, ID_TA_ECDSA_SHA_1, ID_TA_ECDSA_SHA_224, ID_TA_ECDSA_SHA_256, ID_TA_RSA, ID_TA_RSA_PSS_SHA_1, ID_TA_RSA_PSS_SHA_256, ID_TA_RSA_V1_5_SHA_1, ID_TA_RSA_V1_5_SHA_256
Constructor and Description |
---|
ChipAuthenticationPublicKeyInfo(PublicKey publicKey)
Creates a public key info structure with implicit key identifier.
|
ChipAuthenticationPublicKeyInfo(PublicKey publicKey,
BigInteger keyId)
Creates a public key info structure.
|
ChipAuthenticationPublicKeyInfo(String oid,
PublicKey publicKey)
Creates a public key info structure with implicit key identifier.
|
ChipAuthenticationPublicKeyInfo(String oid,
PublicKey publicKey,
BigInteger keyId)
Creates a public key info structure.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkFields()
Checks the correctness of the data for this instance of
SecurityInfo . |
static boolean |
checkRequiredIdentifier(String oid)
Checks whether the given object identifier identifies a
ChipAuthenticationPublicKeyInfo structure.
|
boolean |
equals(Object other) |
ASN1Primitive |
getDERObject()
Deprecated.
Remove this method from visible interface (because of dependency on BC API)
|
BigInteger |
getKeyId()
Returns a key identifier stored in this ChipAuthenticationPublicKeyInfo
structure,
null if not present. |
String |
getObjectIdentifier()
Returns the protocol object identifier of this SecurityInfo.
|
String |
getProtocolOIDString()
Returns the protocol object identifier as a human readable string.
|
PublicKey |
getSubjectPublicKey()
Returns a SubjectPublicKeyInfo contained in this
ChipAuthenticationPublicKeyInfo structure.
|
int |
hashCode() |
static String |
toKeyAgreementAlgorithm(String oid)
Returns the key agreement algorithm (
"DH" or "ECDH"
for the given Chip Authentication Public Key info object identifier. |
String |
toString() |
getInstance, writeObject
getEncoded
public ChipAuthenticationPublicKeyInfo(PublicKey publicKey)
publicKey
- Either a DH public key or an EC public keypublic ChipAuthenticationPublicKeyInfo(PublicKey publicKey, BigInteger keyId)
publicKey
- Either a DH public key or an EC public keykeyId
- key identifierpublic ChipAuthenticationPublicKeyInfo(String oid, PublicKey publicKey)
oid
- a proper public key identifierpublicKey
- appropriate public keypublic ChipAuthenticationPublicKeyInfo(String oid, PublicKey publicKey, BigInteger keyId)
oid
- a proper public key identifierpublicKey
- appropriate public keykeyId
- the key identifier or null
if not present@Deprecated public ASN1Primitive getDERObject()
getDERObject
in class SecurityInfo
public String getObjectIdentifier()
SecurityInfo
getObjectIdentifier
in class SecurityInfo
public String getProtocolOIDString()
getProtocolOIDString
in class SecurityInfo
public BigInteger getKeyId()
null
if not present.public PublicKey getSubjectPublicKey()
protected void checkFields()
SecurityInfo
.public static boolean checkRequiredIdentifier(String oid)
oid
- object identifierpublic static String toKeyAgreementAlgorithm(String oid)
"DH"
or "ECDH"
for the given Chip Authentication Public Key info object identifier.
This may throw an unchecked exception if the given object identifier not
a known Chip Authentication Public Key info object identifier.oid
- a EAC-CA public key info object identifierCopyright © 2021. All rights reserved.