Package org.jmrtd.lds

Class 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 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
    • Method Detail

      • getObjectIdentifier

        public String getObjectIdentifier()
        Description copied from class: SecurityInfo
        Returns the protocol object identifier of this SecurityInfo.
        Specified by:
        getObjectIdentifier in class SecurityInfo
        Returns:
        this protocol object identifier
      • getProtocolOIDString

        public String getProtocolOIDString()
        Returns the protocol object identifier as a human readable string.
        Specified by:
        getProtocolOIDString in class SecurityInfo
        Returns:
        a string
      • getParameterId

        public BigInteger getParameterId()
        Returns the parameter id, or null 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 this SecurityInfo data (DER sequence).
        Specified by:
        getDERObject in class SecurityInfo
        Returns:
        a DER object with this SecurityInfo data
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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 restricted
        Gets 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 restricted
        Gets the EC parameter spec form the BC algorithm identifier object.
        Parameters:
        domainParameter - the BC algorithm identifier object
        Returns:
        an EC parameter spec