15 #include <QSharedPointer>
35 const QSharedPointer<CardConnectionWorker> mCardConnectionWorker;
36 QByteArray mEncryptionKey;
38 QByteArray mCarCurr, mCarPrev;
61 virtual QByteArray getUncompressedTerminalPublicKey() = 0;
80 KeyAgreement(
const QSharedPointer<const PACEInfo>& pPaceInfo,
const QSharedPointer<CardConnectionWorker>& pCardConnectionWorker);
124 static QSharedPointer<KeyAgreement>
create(
const QSharedPointer<const PACEInfo>& pPaceInfo,
125 QSharedPointer<CardConnectionWorker> pCardConnectionWorker);
CardOperationResult< QByteArray > transmitGAMappingData(const QByteArray &pMappingData)
Transmit the General Authenticate (Mapping Data) command to the card.
Definition: KeyAgreement.cpp:196
Definition: KeyAgreement.h:32
QSharedPointer< GAMutualAuthenticationResponse > transmitGAMutualAuthentication(const QByteArray &pMutualAuthenticationData)
Transmit the General Authenticate (Mutual Authentication) command to the card.
Definition: KeyAgreement.cpp:208
KeyAgreement(const QSharedPointer< const PACEInfo > &pPaceInfo, const QSharedPointer< CardConnectionWorker > &pCardConnectionWorker)
Definition: KeyAgreement.cpp:68
virtual QByteArray getCompressedCardPublicKey()=0
Returns the compressed card's ephemeral public key calculated during key agreement.
const QSharedPointer< const PACEInfo > mPaceInfo
Definition: KeyAgreement.h:77
CardOperationResult< QByteArray > transmitGAEphemeralPublicKey(const QByteArray &pEphemeralPublicKey)
Transmit the General Authenticate (Ephemeral Public Key) command to the card.
Definition: KeyAgreement.cpp:185
const QByteArray & getCarPrev() const
Subsequent to the key agreement a certificate authority reference (CAR) may be determined.
Definition: KeyAgreement.cpp:235
Definition: KeyDerivationFunction.h:16
KeyAgreementStatus
Definition: KeyAgreement.h:24
static QSharedPointer< KeyAgreement > create(const QSharedPointer< const PACEInfo > &pPaceInfo, QSharedPointer< CardConnectionWorker > pCardConnectionWorker)
Factory method to create an instance of KeyAgreement.
Definition: KeyAgreement.cpp:53
KeyDerivationFunction mKeyDerivationFunction
Definition: KeyAgreement.h:78
KeyAgreementStatus perform(const QString &pPin)
Perform the key agreement.
Definition: KeyAgreement.cpp:85
virtual QByteArray getUncompressedCardPublicKey()=0
Returns the uncompressed card's ephemeral public key calculated during key agreement.
const QByteArray & getMacKey() const
Subsequent to the key agreement a MAC key is determined.
Definition: KeyAgreement.cpp:241
const QByteArray & getCarCurr() const
Subsequent to the key agreement a certificate authority reference (CAR) may be determined.
Definition: KeyAgreement.cpp:229
Definition: CardOperationResult.h:14
virtual ~KeyAgreement()
Definition: KeyAgreement.cpp:80
const QByteArray & getEncryptionKey() const
Subsequent to the key agreement an encryption key is determined.
Definition: KeyAgreement.cpp:223