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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
sendGetChallenge()
Sends aGET CHALLENGE
command to the passport.byte[]
sendMutualAuth(byte[] rndIFD, byte[] rndICC, byte[] kIFD, SecretKey kEnc, SecretKey kMac)
Sends anEXTERNAL AUTHENTICATE
command to the passport.
-
-
-
Method Detail
-
sendGetChallenge
byte[] sendGetChallenge() throws net.sf.scuba.smartcards.CardServiceException
Sends aGET 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 anEXTERNAL AUTHENTICATE
command to the passport. This is part of BAC. The resulting byte array has length 32 and containsrndICC
(first 8 bytes),rndIFD
(next 8 bytes), their key materialkICC
(last 16 bytes).- Parameters:
rndIFD
- our challengerndICC
- their challengekIFD
- our key materialkEnc
- the static encryption keykMac
- 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 (usingkMac
) - Throws:
net.sf.scuba.smartcards.CardServiceException
- on tranceive error
-
-