13 #include <QSharedPointer> 33 QByteArray
mData = QByteArray();
37 const QSharedPointer<CardConnectionWorker> mCardConnectionWorker;
38 QByteArray mEncryptionKey;
40 QByteArray mCarCurr, mCarPrev;
43 CardResult createTransmitResult(CardReturnCode pReturnCode,
44 StatusCode pResponseReturnCode,
45 const QByteArray& pResultData,
46 const char* pLogMessage)
const;
54 CardResult determineNonce(
const QByteArray& pPin);
62 virtual CardResult determineSharedSecret(
const QByteArray& pNonce) = 0;
69 virtual QByteArray getUncompressedTerminalPublicKey() = 0;
88 KeyAgreement(
const QSharedPointer<const PaceInfo>& pPaceInfo,
const QSharedPointer<CardConnectionWorker>& pCardConnectionWorker);
132 static QSharedPointer<KeyAgreement>
create(
const QSharedPointer<const PaceInfo>& pPaceInfo,
133 QSharedPointer<CardConnectionWorker> pCardConnectionWorker);
155 [[nodiscard]]
const QByteArray&
getMacKey()
const;
161 [[nodiscard]]
const QByteArray&
getCarCurr()
const;
167 [[nodiscard]]
const QByteArray&
getCarPrev()
const;
Definition: KeyAgreement.h:27
CardResult transmitGAEphemeralPublicKey(const QByteArray &pEphemeralPublicKey)
Transmit the General Authenticate (Ephemeral Public Key) command to the card.
Definition: KeyAgreement.cpp:196
virtual QByteArray getCompressedCardPublicKey()=0
Returns the compressed card's ephemeral public key calculated during key agreement.
CardResult transmitGAMappingData(const QByteArray &pMappingData) const
Transmit the General Authenticate (Mapping Data) command to the card.
Definition: KeyAgreement.cpp:207
Definition: GeneralAuthenticateResponse.h:124
Definition: KeyDerivationFunction.h:15
KeyAgreementStatus
Definition: KeyAgreement.h:18
KeyDerivationFunction mKeyDerivationFunction
Definition: KeyAgreement.h:86
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:14
const QByteArray & getCarPrev() const
Subsequent to the key agreement a certificate authority reference (CAR) may be determined.
Definition: KeyAgreement.cpp:245
QByteArray mData
Definition: KeyAgreement.h:33
const QSharedPointer< const PaceInfo > mPaceInfo
Definition: KeyAgreement.h:85
const QByteArray & getMacKey() const
Subsequent to the key agreement a MAC key is determined.
Definition: KeyAgreement.cpp:251
KeyAgreement(const QSharedPointer< const PaceInfo > &pPaceInfo, const QSharedPointer< CardConnectionWorker > &pCardConnectionWorker)
Definition: KeyAgreement.cpp:71
virtual QByteArray getUncompressedCardPublicKey()=0
Returns the uncompressed card's ephemeral public key calculated during key agreement.
GAMutualAuthenticationResponse transmitGAMutualAuthentication(const QByteArray &pMutualAuthenticationData)
Transmit the General Authenticate (Mutual Authentication) command to the card.
Definition: KeyAgreement.cpp:219
KeyAgreementStatus perform(const QByteArray &pPin)
Perform the key agreement.
Definition: KeyAgreement.cpp:88
static QSharedPointer< KeyAgreement > create(const QSharedPointer< const PaceInfo > &pPaceInfo, QSharedPointer< CardConnectionWorker > pCardConnectionWorker)
Factory method to create an instance of KeyAgreement.
Definition: KeyAgreement.cpp:56
const QByteArray & getCarCurr() const
Subsequent to the key agreement a certificate authority reference (CAR) may be determined.
Definition: KeyAgreement.cpp:239
Definition: KeyAgreement.h:30
CardReturnCode mReturnCode
Definition: KeyAgreement.h:32
const QByteArray & getEncryptionKey() const
Subsequent to the key agreement an encryption key is determined.
Definition: KeyAgreement.cpp:233
virtual ~KeyAgreement()
Definition: KeyAgreement.cpp:83