Package org.jmrtd.protocol
Class EACCAAPDUSender
- java.lang.Object
-
- org.jmrtd.protocol.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 Summary
Constructors Constructor Description EACCAAPDUSender(net.sf.scuba.smartcards.CardService service)
Creates an APDU sender for the EAC-CA protocol.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
sendGeneralAuthenticate(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] data, boolean isLast)
Sends a General Authenticate command.void
sendMSEKAT(net.sf.scuba.smartcards.APDUWrapper wrapper, byte[] keyData, byte[] idData)
The MSE KAT APDU, see EAC 1.11 spec, Section B.1.void
sendMSESetATIntAuth(net.sf.scuba.smartcards.APDUWrapper wrapper, String oid, BigInteger keyId)
The MSE Set AT for Chip Authentication.
-
-
-
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 interfaceAPDULevelEACCACapable
- Parameters:
wrapper
- secure messaging wrapperkeyData
- 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 interfaceAPDULevelEACCACapable
- Parameters:
wrapper
- secure messaging wrapperoid
- the OIDkeyId
- the keyId ornull
- 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 interfaceAPDULevelEACCACapable
- Parameters:
wrapper
- secure messaging wrapperdata
- data to be sent, without the0x7C
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
-
-