Class EACCAAPDUSender

  • All Implemented Interfaces:
    APDULevelEACCACapable

    public class EACCAAPDUSender
    extends Object
    implements APDULevelEACCACapable
    A low-level APDU sender to support the EAC-CA protocol (version 1). This provides functionality for the "DESede" case and for the "AES" case.
    Since:
    0.7.0
    Version:
    $Revision: 1805 $
    Author:
    The JMRTD team
    • Constructor Detail

      • EACCAAPDUSender

        public EACCAAPDUSender​(net.sf.scuba.smartcards.CardService service)
        Creates an APDU sender for the EAC-CA protocol.
        Parameters:
        service - the card service for tranceiving APDUs
    • Method Detail

      • sendMSEKAT

        public void sendMSEKAT​(net.sf.scuba.smartcards.APDUWrapper wrapper,
                               byte[] keyData,
                               byte[] idData)
                        throws net.sf.scuba.smartcards.CardServiceException
        The MSE KAT APDU, see EAC 1.11 spec, Section B.1. This command is sent in the "DESede" case.
        Specified by:
        sendMSEKAT in interface APDULevelEACCACapable
        Parameters:
        wrapper - secure messaging wrapper
        keyData - key data object (tag 0x91)
        idData - key id data object (tag 0x84), can be null
        Throws:
        net.sf.scuba.smartcards.CardServiceException - on error
      • sendMSESetATIntAuth

        public void sendMSESetATIntAuth​(net.sf.scuba.smartcards.APDUWrapper wrapper,
                                        String oid,
                                        BigInteger keyId)
                                 throws net.sf.scuba.smartcards.CardServiceException
        The MSE Set AT for Chip Authentication. This command is the first command that is sent in the "AES" case.
        Specified by:
        sendMSESetATIntAuth in interface APDULevelEACCACapable
        Parameters:
        wrapper - secure messaging wrapper
        oid - the OID
        keyId - the keyId or null
        Throws:
        net.sf.scuba.smartcards.CardServiceException - on error
      • sendGeneralAuthenticate

        public byte[] sendGeneralAuthenticate​(net.sf.scuba.smartcards.APDUWrapper wrapper,
                                              byte[] data,
                                              boolean isLast)
                                       throws net.sf.scuba.smartcards.CardServiceException
        Sends a General Authenticate command. This command is the second command that is sent in the "AES" case.
        Specified by:
        sendGeneralAuthenticate in interface APDULevelEACCACapable
        Parameters:
        wrapper - secure messaging wrapper
        data - data to be sent, without the 0x7C prefix (this method will add it)
        isLast - indicates whether this is the last command in the chain
        Returns:
        dynamic authentication data without the 0x7C prefix (this method will remove it)
        Throws:
        net.sf.scuba.smartcards.CardServiceException - on error