Keypop Calypso Crypto Asymmetric C++ API 0.2.0
Reference Calypso Crypto Asymmetric API for C++
Public Member Functions | List of all members
keypop::calypso::crypto::asymmetric::transaction::spi::AsymmetricCryptoCardTransactionManagerSpi Class Referenceabstract

#include <AsymmetricCryptoCardTransactionManagerFactorySpi copy.hpp>

Public Member Functions

virtual std::shared_ptr< AsymmetricCryptoCardTransactionManagerSpicreateCardTransactionManager () const =0
 
virtual void initTerminalPkiSession (const std::shared_ptr< CardPublicKeySpi > cardPublicKey)=0
 
virtual void updateTerminalPkiSession (const std::vector< uint8_t > &cardApdu)=0
 
virtual bool isCardPkiSessionValid (const std::vector< uint8_t > &cardSessionSignature)=0
 

Detailed Description

Factory of AsymmetricCryptoCardTransactionManagerSpi.

Since
0.2.0

Calypso card asymmetric key cryptography service.

It defines the API needed by a terminal to perform the cryptographic operations required by a Calypso card when using asymmetric keys.

An instance of this interface can be obtained via the method AsymmetricCryptoCardTransactionManagerFactorySpi::createCardTransactionManager().

Since
0.2.0

Definition at line 28 of file AsymmetricCryptoCardTransactionManagerFactorySpi copy.hpp.

Member Function Documentation

◆ createCardTransactionManager()

virtual std::shared_ptr< AsymmetricCryptoCardTransactionManagerSpi > keypop::calypso::crypto::asymmetric::transaction::spi::AsymmetricCryptoCardTransactionManagerSpi::createCardTransactionManager ( ) const
pure virtual

Returns a new instance of AsymmetricCryptoCardTransactionManagerSpi.

Returns
A non-null reference.
Since
0.2.0

◆ initTerminalPkiSession()

virtual void keypop::calypso::crypto::asymmetric::transaction::spi::AsymmetricCryptoCardTransactionManagerSpi::initTerminalPkiSession ( const std::shared_ptr< CardPublicKeySpi cardPublicKey)
pure virtual

Initialize the cryptographic context for a new secure session in PKI mode with the provided card public key.

Parameters
cardPublicKeyThe card public key.
Exceptions
AsymmetricCryptoExceptionIf the provided public key value is not compliant with the current elliptic curve or if an error occurs during the initialization.
Since
0.2.0

◆ isCardPkiSessionValid()

virtual bool keypop::calypso::crypto::asymmetric::transaction::spi::AsymmetricCryptoCardTransactionManagerSpi::isCardPkiSessionValid ( const std::vector< uint8_t > &  cardSessionSignature)
pure virtual

Verifies the provided secure session signature (a 64-byte byte array) from the previously initialized and updated context.

Parameters
cardSessionSignatureThe card signature.
Returns
True if the signature is valid, false otherwise.
Exceptions
AsymmetricCryptoExceptionIf an error occurs while verifying the signature.
Since
0.2.0

◆ updateTerminalPkiSession()

virtual void keypop::calypso::crypto::asymmetric::transaction::spi::AsymmetricCryptoCardTransactionManagerSpi::updateTerminalPkiSession ( const std::vector< uint8_t > &  cardApdu)
pure virtual

Updates the session signature verification engine with data sent or received from the card as a byte array.

In the case of ingoing data, the input length must be >= 5.

In the case of outgoing data, the input length must be >= 2.

Parameters
cardApduThe APDU bytes exchanged with the card (ingoing or outgoing).
Exceptions
AsymmetricCryptoExceptionIf an error occurs while updating the session.
Since
0.2.0

The documentation for this class was generated from the following files: