JMRTD 0.4.6

org.jmrtd.lds
Class ChipAuthenticationPublicKeyInfo

java.lang.Object
  extended by org.jmrtd.lds.SecurityInfo
      extended by org.jmrtd.lds.ChipAuthenticationPublicKeyInfo

public class ChipAuthenticationPublicKeyInfo
extends SecurityInfo

A concrete SecurityInfo structure that stores chip authentication public key info, see EAC 1.11 specification. This data structure provides a Chip Authentication Public Key of the MRTD chip.

Author:
Wojciech Mostowski (woj@cs.ru.nl) FIXME: interface dependency on BC classes? FIXME: maybe clean up some of these constructors...

Constructor Summary
ChipAuthenticationPublicKeyInfo(PublicKey publicKey)
           
ChipAuthenticationPublicKeyInfo(PublicKey publicKey, int keyId)
          Creates a public key info structure.
 
Method Summary
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.
 DERObject getDERObject()
          Returns a DER object with this SecurityInfo data (DER sequence)
 int getKeyId()
          Returns a key identifier stored in this ChipAuthenticationPublicKeyInfo structure, null if not present
 String getObjectIdentifier()
          Returns the object identifier of this SecurityInfo
 PublicKey getSubjectPublicKey()
          Returns a SubjectPublicKeyInfo contained in this ChipAuthenticationPublicKeyInfo structure.
 String toString()
           
 
Methods inherited from class org.jmrtd.lds.SecurityInfo
lookupMnemonicByOID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChipAuthenticationPublicKeyInfo

public ChipAuthenticationPublicKeyInfo(PublicKey publicKey,
                                       int keyId)
Creates a public key info structure.

Parameters:
publicKey - Either a DH public key or an EC public key
keyId -

ChipAuthenticationPublicKeyInfo

public ChipAuthenticationPublicKeyInfo(PublicKey publicKey)
Method Detail

getDERObject

public DERObject getDERObject()
Description copied from class: SecurityInfo
Returns a DER object with this SecurityInfo data (DER sequence)

Returns:
a DER object with this SecurityInfo data

getObjectIdentifier

public String getObjectIdentifier()
Description copied from class: SecurityInfo
Returns the object identifier of this SecurityInfo

Specified by:
getObjectIdentifier in class SecurityInfo
Returns:
this SecurityInfo object identifier

getKeyId

public int getKeyId()
Returns a key identifier stored in this ChipAuthenticationPublicKeyInfo structure, null if not present

Returns:
key identifier stored in this ChipAuthenticationPublicKeyInfo structure

getSubjectPublicKey

public PublicKey getSubjectPublicKey()
Returns a SubjectPublicKeyInfo contained in this ChipAuthenticationPublicKeyInfo structure.

Returns:
SubjectPublicKeyInfo contained in this ChipAuthenticationPublicKeyInfo structure

checkFields

protected void checkFields()
Checks the correctness of the data for this instance of SecurityInfo


checkRequiredIdentifier

public static boolean checkRequiredIdentifier(String oid)
Checks whether the given object identifier identifies a ChipAuthenticationPublicKeyInfo structure.

Parameters:
oid - object identifier
Returns:
true if the match is positive

toString

public String toString()
Overrides:
toString in class Object

JMRTD 0.4.6