public class BACAPDUSender extends Object implements APDULevelBACCapable
Constructor and Description |
---|
BACAPDUSender(net.sf.scuba.smartcards.CardService service)
Creates an APDU sender for tranceiving BAC protocol APDUs.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
sendGetChallenge()
Sends a
GET CHALLENGE command to the passport. |
byte[] |
sendGetChallenge(net.sf.scuba.smartcards.APDUWrapper wrapper)
Sends a
GET CHALLENGE command to the passport. |
byte[] |
sendMutualAuth(byte[] rndIFD,
byte[] rndICC,
byte[] kIFD,
SecretKey kEnc,
SecretKey kMac)
Sends an
EXTERNAL AUTHENTICATE command to the passport. |
public BACAPDUSender(net.sf.scuba.smartcards.CardService service)
service
- the card service for tranceiving APDUspublic byte[] sendGetChallenge() throws net.sf.scuba.smartcards.CardServiceException
GET CHALLENGE
command to the passport.sendGetChallenge
in interface APDULevelBACCapable
net.sf.scuba.smartcards.CardServiceException
- on tranceive errorpublic byte[] sendGetChallenge(net.sf.scuba.smartcards.APDUWrapper wrapper) throws net.sf.scuba.smartcards.CardServiceException
GET CHALLENGE
command to the passport.wrapper
- secure messaging wrappernet.sf.scuba.smartcards.CardServiceException
- on tranceive errorpublic byte[] sendMutualAuth(byte[] rndIFD, byte[] rndICC, byte[] kIFD, SecretKey kEnc, SecretKey kMac) throws net.sf.scuba.smartcards.CardServiceException
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).sendMutualAuth
in interface APDULevelBACCapable
rndIFD
- our challengerndICC
- their challengekIFD
- our key materialkEnc
- the static encryption keykMac
- the static mac keykEnc
) and verified
(using kMac
)net.sf.scuba.smartcards.CardServiceException
- on tranceive errorCopyright © 2021. All rights reserved.