gehe zur Dokumentation dieser Datei
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);
54 CardResult determineNonce(
const QString& 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);
CommandApdu build() override
Definition: GABuilder.cpp:58
static QSharedPointer< EcdhKeyAgreement > create(const QSharedPointer< const PaceInfo > &pPaceInfo, const QSharedPointer< CardConnectionWorker > &pCardConnectionWorker)
Definition: EcdhKeyAgreement.cpp:53
virtual ~KeyAgreement()
Definition: KeyAgreement.cpp:83
const QByteArray & getAuthenticationToken() const
Definition: GeneralAuthenticateResponse.cpp:236
Definition: GeneralAuthenticateResponse.h:70
Definition: KeyDerivationFunction.h:17
Definition: SymmetricCipher.h:16
Definition: GeneralAuthenticateResponse.h:44
CardResult transmitGAEphemeralPublicKey(const QByteArray &pEphemeralPublicKey)
Transmit the General Authenticate (Ephemeral Public Key) command to the card.
Definition: KeyAgreement.cpp:196
ASN1_OCTET_STRING * mCarCurr
Definition: GeneralAuthenticateResponse.h:118
const QByteArray & getMappingData() const
Definition: GeneralAuthenticateResponse.cpp:129
virtual QByteArray getCompressedCardPublicKey()=0
Returns the compressed card's ephemeral public key calculated during key agreement.
Definition: KeyAgreement.h:31
Definition: GABuilder.h:16
static const char CLA
Definition: CommandApdu.h:26
SUCCESS
Definition: ResponseApdu.h:79
const QSharedPointer< const PaceInfo > mPaceInfo
Definition: KeyAgreement.h:85
void setPaceAuthenticationToken(const QByteArray &pData)
Definition: GABuilder.cpp:51
KeyDerivationFunction mKeyDerivationFunction
Definition: KeyAgreement.h:86
QByteArray enc(const QByteArray &pSecret)
Derive the encryption key.
Definition: KeyDerivationFunction.cpp:60
QByteArray mData
Definition: KeyAgreement.h:33
Definition: KeyAgreement.h:28
ASN1_OCTET_STRING * mCarPrev
Definition: GeneralAuthenticateResponse.h:119
const QByteArray & getMacKey() const
Subsequent to the key agreement a MAC key is determined.
Definition: KeyAgreement.cpp:251
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
Definition: CipherMac.h:16
QByteArray pi(const QString &pSecret)
Derive the password key.
Definition: KeyDerivationFunction.cpp:72
KeyAgreement(const QSharedPointer< const PaceInfo > &pPaceInfo, const QSharedPointer< CardConnectionWorker > &pCardConnectionWorker)
Definition: KeyAgreement.cpp:71
const QByteArray & getCarCurr() const
Definition: GeneralAuthenticateResponse.cpp:242
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 & getCarPrev() const
Definition: GeneralAuthenticateResponse.cpp:248
StatusCode getReturnCode() const
Definition: GeneralAuthenticateResponse.cpp:31
virtual QByteArray getUncompressedCardPublicKey()=0
Returns the uncompressed card's ephemeral public key calculated during key agreement.
void setPaceMappingData(const QByteArray &pData)
Definition: GABuilder.cpp:37
KeyAgreementStatus
Definition: KeyAgreement.h:19
static const char CLA_COMMAND_CHAINING
Definition: CommandApdu.h:27
const QByteArray & getCarPrev() const
Subsequent to the key agreement a certificate authority reference (CAR) may be determined.
Definition: KeyAgreement.cpp:245
KeyAgreementStatus perform(const QString &pPin)
Perform the key agreement.
Definition: KeyAgreement.cpp:88
GAMutualAuthenticationResponse transmitGAMutualAuthentication(const QByteArray &pMutualAuthenticationData)
Transmit the General Authenticate (Mutual Authentication) command to the card.
Definition: KeyAgreement.cpp:219
Definition: GeneralAuthenticateResponse.h:126
CardReturnCode mReturnCode
Definition: KeyAgreement.h:32
const QByteArray & getCarCurr() const
Subsequent to the key agreement a certificate authority reference (CAR) may be determined.
Definition: KeyAgreement.cpp:239
CardResult transmitGAMappingData(const QByteArray &pMappingData)
Transmit the General Authenticate (Mapping Data) command to the card.
Definition: KeyAgreement.cpp:207
ECDH
Definition: KnownOIDs.h:104
QByteArray mac(const QByteArray &pSecret)
Derive the MAC key.
Definition: KeyDerivationFunction.cpp:66
void setPaceEphemeralPublicKey(const QByteArray &pData)
Definition: GABuilder.cpp:44
const QByteArray & getEncryptionKey() const
Subsequent to the key agreement an encryption key is determined.
Definition: KeyAgreement.cpp:233