Keypop Calypso Crypto Asymmetric C++ API - 0.2.0
Component of the Keypop C++ API
AsymmetricCryptoCardTransactionManagerSpi.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2025 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * This program and the accompanying materials are made available under the *
5 * terms of the MIT License which is available at *
6 * https://opensource.org/licenses/MIT. *
7 * *
8 * SPDX-License-Identifier: MIT *
9 ******************************************************************************/
10
11#pragma once
12
13#include <memory>
14#include <vector>
15
17
18namespace keypop {
19namespace calypso {
20namespace crypto {
21namespace asymmetric {
22namespace transaction {
23namespace spi {
24
26
39public:
51 const std::shared_ptr<CardPublicKeySpi> cardPublicKey)
52 = 0;
53
68 virtual void updateTerminalPkiSession(const std::vector<uint8_t>& cardApdu)
69 = 0;
70
81 virtual bool
82 isCardPkiSessionValid(const std::vector<uint8_t>& cardSessionSignature)
83 = 0;
84};
85
86} /* namespace spi */
87} /* namespace transaction */
88} /* namespace asymmetric */
89} /* namespace crypto */
90} /* namespace calypso */
91} /* namespace keypop */
virtual bool isCardPkiSessionValid(const std::vector< uint8_t > &cardSessionSignature)=0
Verifies the provided secure session signature (a 64-byte byte array) from the previously initialized...
virtual void initTerminalPkiSession(const std::shared_ptr< CardPublicKeySpi > cardPublicKey)=0
Initialize the cryptographic context for a new secure session in PKI mode with the provided card publ...
virtual void updateTerminalPkiSession(const std::vector< uint8_t > &cardApdu)=0
Updates the session signature verification engine with data sent or received from the card as a byte ...