Package org.jmrtd.lds
Class PACEDomainParameterInfo
- java.lang.Object
-
- org.jmrtd.lds.AbstractLDSInfo
-
- org.jmrtd.lds.SecurityInfo
-
- org.jmrtd.lds.PACEDomainParameterInfo
-
- All Implemented Interfaces:
Serializable
,LDSElement
public class PACEDomainParameterInfo extends SecurityInfo
PACE Domain Parameter Info object as per SAC TR 1.01, November 11, 2010. The object identifier dhpublicnumber or ecPublicKey for DH or ECDH, respectively, SHALL be used to reference explicit domain parameters in an AlgorithmIdentifier (cf. Section 9.1):dhpublicnumber OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) ansi-x942(10046) number-type(2) 1 }
ecPublicKey OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) ansi-x962(10045) keyType(2) 1 }
In the case of elliptic curves, domain parameters MUST be described explicitly in the ECParameters structure, contained as parameters in the AlgorithmIdentifier, i.e. named curves and implicit domain parameters MUST NOT be used.- Since:
- 0.5.0
- Version:
- $Revision: 1775 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ID_DH_PUBLIC_NUMBER
Value for parameter algorithm OID (part of parameters AlgorithmIdentifier).static String
ID_EC_PUBLIC_KEY
Value for parameter algorithm OID (part of parameters AlgorithmIdentifier).static String
ID_PRIME_FIELD
Value for parameter algorithm OID (part of parameters AlgorithmIdentifier).-
Fields inherited from class org.jmrtd.lds.SecurityInfo
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_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 Summary
Constructors Constructor Description PACEDomainParameterInfo(String protocolOID, AlgorithmIdentifier domainParameter)
Constructs a PACE domain parameter info structure.PACEDomainParameterInfo(String protocolOID, AlgorithmIdentifier domainParameter, BigInteger parameterId)
Constructs a PACE domain parameter info structure.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
checkRequiredIdentifier(String oid)
Checks whether the object identifier is an allowed PACE related object identifier.boolean
equals(Object other)
ASN1Primitive
getDERObject()
Deprecated.Remove this method from visible interface (because of dependency on BC API)String
getObjectIdentifier()
Returns the protocol object identifier of this SecurityInfo.BigInteger
getParameterId()
Returns the parameter id, ornull
if this is the only domain parameter info.AlgorithmParameterSpec
getParameters()
Gets the parameters in the form of algorithm identifier with algorithm 1.2.840.10046.2.1 (DH public number) or 1.2.840.10045.2.1 (EC public key).String
getProtocolOIDString()
Returns the protocol object identifier as a human readable string.int
hashCode()
static AlgorithmIdentifier
toAlgorithmIdentifier(ECParameterSpec ecParameterSpec)
Deprecated.Visibility will be restrictedstatic ECParameterSpec
toECParameterSpec(AlgorithmIdentifier domainParameter)
Deprecated.Visibility will be restrictedString
toString()
-
Methods inherited from class org.jmrtd.lds.AbstractLDSInfo
getEncoded
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class org.jmrtd.lds.SecurityInfo
getInstance, writeObject
-
-
-
-
Field Detail
-
ID_PRIME_FIELD
public static final String ID_PRIME_FIELD
Value for parameter algorithm OID (part of parameters AlgorithmIdentifier).- See Also:
- Constant Field Values
-
ID_EC_PUBLIC_KEY
public static final String ID_EC_PUBLIC_KEY
Value for parameter algorithm OID (part of parameters AlgorithmIdentifier).ecPublicKey OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) ansi-x962(10045) keyType(2) 1 }
.- See Also:
- Constant Field Values
-
ID_DH_PUBLIC_NUMBER
public static final String ID_DH_PUBLIC_NUMBER
Value for parameter algorithm OID (part of parameters AlgorithmIdentifier).dhpublicnumber OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) ansi-x942(10046) number-type(2) 1 }
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PACEDomainParameterInfo
public PACEDomainParameterInfo(String protocolOID, AlgorithmIdentifier domainParameter)
Constructs a PACE domain parameter info structure.- Parameters:
protocolOID
- must beSecurityInfo.ID_PACE_DH_GM
,SecurityInfo.ID_PACE_ECDH_GM
,SecurityInfo.ID_PACE_DH_IM
,SecurityInfo.ID_PACE_ECDH_IM
domainParameter
- parameters in the form of algorithm identifier with algorithm 1.2.840.10046.2.1 (DH public number) or 1.2.840.10045.2.1 (EC public key)
-
PACEDomainParameterInfo
public PACEDomainParameterInfo(String protocolOID, AlgorithmIdentifier domainParameter, BigInteger parameterId)
Constructs a PACE domain parameter info structure.- Parameters:
protocolOID
- must beSecurityInfo.ID_PACE_DH_GM
,SecurityInfo.ID_PACE_ECDH_GM
,SecurityInfo.ID_PACE_DH_IM
,SecurityInfo.ID_PACE_ECDH_IM
domainParameter
- parameters in the form of algorithm identifier with algorithm 1.2.840.10046.2.1 (DH public number) or 1.2.840.10045.2.1 (EC public key)parameterId
- an identifier to identify this info
-
-
Method Detail
-
getObjectIdentifier
public String getObjectIdentifier()
Description copied from class:SecurityInfo
Returns the protocol object identifier of this SecurityInfo.- Specified by:
getObjectIdentifier
in classSecurityInfo
- Returns:
- this protocol object identifier
-
getProtocolOIDString
public String getProtocolOIDString()
Returns the protocol object identifier as a human readable string.- Specified by:
getProtocolOIDString
in classSecurityInfo
- Returns:
- a string
-
getParameterId
public BigInteger getParameterId()
Returns the parameter id, ornull
if this is the only domain parameter info.- Returns:
- the parameter id or
null
-
getParameters
public AlgorithmParameterSpec getParameters()
Gets the parameters in the form of algorithm identifier with algorithm 1.2.840.10046.2.1 (DH public number) or 1.2.840.10045.2.1 (EC public key).- Returns:
- the parameters
-
getDERObject
@Deprecated public ASN1Primitive getDERObject()
Deprecated.Remove this method from visible interface (because of dependency on BC API)Returns a DER object with thisSecurityInfo
data (DER sequence).- Specified by:
getDERObject
in classSecurityInfo
- Returns:
- a DER object with this
SecurityInfo
data
-
checkRequiredIdentifier
public static boolean checkRequiredIdentifier(String oid)
Checks whether the object identifier is an allowed PACE related object identifier.- Parameters:
oid
- a string representing an object identifier- Returns:
- a boolean indicating whether the object identifier is allowed
-
toAlgorithmIdentifier
@Deprecated public static AlgorithmIdentifier toAlgorithmIdentifier(ECParameterSpec ecParameterSpec)
Deprecated.Visibility will be restrictedGets a BC algorithm identifier object from an EC parameter spec.- Parameters:
ecParameterSpec
- the EC parameter spec- Returns:
- the BC algorithm identifier object
-
toECParameterSpec
@Deprecated public static ECParameterSpec toECParameterSpec(AlgorithmIdentifier domainParameter)
Deprecated.Visibility will be restrictedGets the EC parameter spec form the BC algorithm identifier object.- Parameters:
domainParameter
- the BC algorithm identifier object- Returns:
- an EC parameter spec
-
-