public class DESedeSecureMessagingWrapper extends SecureMessagingWrapper implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static IvParameterSpec |
ZERO_IV_PARAM_SPEC
Initialization vector consisting of 8 zero bytes.
|
| Constructor and Description |
|---|
DESedeSecureMessagingWrapper(SecretKey ksEnc,
SecretKey ksMac)
Constructs a secure messaging wrapper based on the secure messaging
session keys.
|
DESedeSecureMessagingWrapper(SecretKey ksEnc,
SecretKey ksMac,
boolean doCheckMAC)
Constructs a secure messaging wrapper based on the secure messaging
session keys.
|
DESedeSecureMessagingWrapper(SecretKey ksEnc,
SecretKey ksMac,
boolean doCheckMAC,
long ssc)
Constructs a secure messaging wrapper based on the secure messaging
session keys and the initial value of the send sequence counter.
|
DESedeSecureMessagingWrapper(SecretKey ksEnc,
SecretKey ksMac,
long ssc)
Constructs a secure messaging wrapper based on the secure messaging
session keys and the initial value of the send sequence counter.
|
| Modifier and Type | Method and Description |
|---|---|
SecretKey |
getEncryptionKey()
Gets the shared key for encrypting APDU payloads.
|
SecretKey |
getMACKey()
Get the shared key for computing message authentication codes over APDU payloads.
|
long |
getSendSequenceCounter()
Gets the current value of the send sequence counter.
|
String |
toString() |
net.sf.scuba.smartcards.ResponseAPDU |
unwrap(net.sf.scuba.smartcards.ResponseAPDU responseAPDU)
Unwraps the apdu buffer
rapdu of a response apdu. |
net.sf.scuba.smartcards.CommandAPDU |
wrap(net.sf.scuba.smartcards.CommandAPDU commandAPDU)
Wraps the APDU buffer
capdu of a command APDU. |
public static final IvParameterSpec ZERO_IV_PARAM_SPEC
public DESedeSecureMessagingWrapper(SecretKey ksEnc, SecretKey ksMac) throws GeneralSecurityException
0L.ksEnc - the session key for encryptionksMac - the session key for macsGeneralSecurityException - when the available JCE providers cannot provide the necessary
cryptographic primitives
("DESede/CBC/Nopadding" Cipher, "ISO9797Alg3Mac" Mac).public DESedeSecureMessagingWrapper(SecretKey ksEnc, SecretKey ksMac, boolean doCheckMAC) throws GeneralSecurityException
0L.ksEnc - the session key for encryptionksMac - the session key for macsdoCheckMAC - whether to check the MAC when unwrapping response APDUsGeneralSecurityException - when the available JCE providers cannot provide the necessary
cryptographic primitives
("DESede/CBC/Nopadding" Cipher, "ISO9797Alg3Mac" Mac).public DESedeSecureMessagingWrapper(SecretKey ksEnc, SecretKey ksMac, long ssc) throws NoSuchAlgorithmException, NoSuchPaddingException
ksEnc - the session key for encryptionksMac - the session key for macsssc - the initial value of the send sequence counterNoSuchPaddingException - when the available JCE providers cannot provide the necessary cryptographic primitivesNoSuchAlgorithmException - when the available JCE providers cannot provide the necessary cryptographic primitivespublic DESedeSecureMessagingWrapper(SecretKey ksEnc, SecretKey ksMac, boolean doCheckMAC, long ssc) throws NoSuchAlgorithmException, NoSuchPaddingException
ksEnc - the session key for encryptionksMac - the session key for macsdoCheckMAC - whether to check the MAC when unwrapping response APDUsssc - the initial value of the send sequence counterNoSuchPaddingException - when the available JCE providers cannot provide the necessary cryptographic primitivesNoSuchAlgorithmException - when the available JCE providers cannot provide the necessary cryptographic primitivespublic net.sf.scuba.smartcards.CommandAPDU wrap(net.sf.scuba.smartcards.CommandAPDU commandAPDU)
capdu of a command APDU.
As a side effect, this method increments the internal send
sequence counter maintained by this wrapper.wrap in interface net.sf.scuba.smartcards.APDUWrappercommandAPDU - buffer containing the command APDUpublic net.sf.scuba.smartcards.ResponseAPDU unwrap(net.sf.scuba.smartcards.ResponseAPDU responseAPDU)
rapdu of a response apdu.unwrap in interface net.sf.scuba.smartcards.APDUWrapperresponseAPDU - the response APDUpublic SecretKey getEncryptionKey()
SecureMessagingWrappergetEncryptionKey in class SecureMessagingWrapperpublic SecretKey getMACKey()
SecureMessagingWrappergetMACKey in class SecureMessagingWrapperpublic long getSendSequenceCounter()
getSendSequenceCounter in class SecureMessagingWrapperCopyright © 2016. All rights reserved.