Keypop Calypso Crypto Legacy SAM C++ API 0.6.0
Reference Calypso Crypto Legacy SAM API for C++
Public Member Functions | List of all members
keypop::calypso::crypto::legacysam::transaction::TraceableSignatureComputationData Class Referenceabstract

#include <TraceableSignatureComputationData.hpp>

Inheritance diagram for keypop::calypso::crypto::legacysam::transaction::TraceableSignatureComputationData:
Inheritance graph
[legend]
Collaboration diagram for keypop::calypso::crypto::legacysam::transaction::TraceableSignatureComputationData:
Collaboration graph
[legend]

Public Member Functions

virtual TraceableSignatureComputationDatawithSamTraceabilityMode (const int offset, const SamTraceabilityMode samTraceabilityMode)=0
 
virtual TraceableSignatureComputationDatawithoutBusyMode ()=0
 
virtual const std::vector< uint8_t > & getSignedData () const =0
 
- Public Member Functions inherited from keypop::calypso::crypto::legacysam::transaction::SignatureComputationData< TraceableSignatureComputationData >
virtual TraceableSignatureComputationDatasetData (const std::vector< uint8_t > &data, const uint8_t kif, const uint8_t kvc)=0
 
virtual TraceableSignatureComputationDatasetSignatureSize (const int size)=0
 
virtual TraceableSignatureComputationDatasetKeyDiversifier (const std::vector< uint8_t > &diversifier)=0
 
const std::vector< uint8_t > & getSignature () const=0
 

Detailed Description

Contains the input/output data of the FreeTransactionManager#prepareComputeSignature(SignatureComputationData) method for traceable signature computation using the "PSO Compute Signature" command.

An instance of this interface can be obtained via the method keypop::calypso::crypto::legacysam::LegacySamApiFactory ::createTraceableSignatureComputationData().

Since
0.1.0

Definition at line 35 of file TraceableSignatureComputationData.hpp.

Member Function Documentation

◆ getSignedData()

virtual const std::vector< uint8_t > & keypop::calypso::crypto::legacysam::transaction::TraceableSignatureComputationData::getSignedData ( ) const
pure virtual

Returns the data that was used to generate the signature. If the "SAM traceability" mode was enabled, then the signed data are the original data modified with the SAM traceability information.

Returns
A byte array of the same size as the original data to be signed.
Exceptions
IllegalStateExceptionIf the command has not yet been processed.
Since
0.1.0

◆ withoutBusyMode()

virtual TraceableSignatureComputationData & keypop::calypso::crypto::legacysam::transaction::TraceableSignatureComputationData::withoutBusyMode ( )
pure virtual

Disables the "Busy" mode. When enabled, if the "PSO Verify Signature" command used to check the signature fails because of an incorrect signature, other "PSO Verify Signature" command with "Busy" mode is rejected for a few seconds by responding with the "busy" status word. For security reasons, it is recommended to use the "Busy" mode in all new usages of this command.

By default, the "Busy" mode is enabled.

Returns
The current instance.
Since
0.1.0

◆ withSamTraceabilityMode()

virtual TraceableSignatureComputationData & keypop::calypso::crypto::legacysam::transaction::TraceableSignatureComputationData::withSamTraceabilityMode ( const int  offset,
const SamTraceabilityMode  samTraceabilityMode 
)
pure virtual

Enables the "SAM traceability" mode to securely record in the data to sign the SAM serial number and the value of the counter associated with the signing key.

The SAM replaces the bits after the indicated offset by its serial number (3 or 4 bytes) followed by the new value (3 bytes) of the counter.

To reduce the size of the data modified, the SAM may use only the 3 LSBytes of its serial number. With the full serial number, 56 bits of data are replaced. With the 3 LSBytes of the serial number, 48 bits of data are replaced.

By default, the "SAM traceability" mode is disabled.

Parameters
offsetThe offset in bits.
samTraceabilityModeThe SAM traceability mode to be used.
Returns
The current instance.
Exceptions
IllegalArgumentExceptionIf the provided samTraceabilityMode is null.
Since
0.1.0

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