Package org.jmrtd

Interface APDULevelBACCapable

  • All Known Implementing Classes:
    BACAPDUSender

    public interface APDULevelBACCapable
    The low-level capability of sending APDUs for the BAC protocol.
    Version:
    $Revision: 1781 $
    Author:
    The JMRTD team ([email protected])
    • Method Detail

      • sendGetChallenge

        byte[] sendGetChallenge()
                         throws net.sf.scuba.smartcards.CardServiceException
        Sends a GET CHALLENGE command to the passport.
        Returns:
        a byte array of length 8 containing the challenge
        Throws:
        net.sf.scuba.smartcards.CardServiceException - on tranceive error
      • sendMutualAuth

        byte[] sendMutualAuth​(byte[] rndIFD,
                              byte[] rndICC,
                              byte[] kIFD,
                              SecretKey kEnc,
                              SecretKey kMac)
                       throws net.sf.scuba.smartcards.CardServiceException
        Sends an EXTERNAL AUTHENTICATE command to the passport. This is part of BAC. The resulting byte array has length 32 and contains rndICC (first 8 bytes), rndIFD (next 8 bytes), their key material kICC (last 16 bytes).
        Parameters:
        rndIFD - our challenge
        rndICC - their challenge
        kIFD - our key material
        kEnc - the static encryption key
        kMac - the static mac key
        Returns:
        a byte array of length 32 containing the response that was sent by the passport, decrypted (using kEnc) and verified (using kMac)
        Throws:
        net.sf.scuba.smartcards.CardServiceException - on tranceive error