Keypop Calypso Crypto Legacy SAM C++ API 0.6.0
Reference Calypso Crypto Legacy SAM API for C++
|
#include <TraceableSignatureComputationData.hpp>
Public Member Functions | |
virtual TraceableSignatureComputationData & | withSamTraceabilityMode (const int offset, const SamTraceabilityMode samTraceabilityMode)=0 |
virtual TraceableSignatureComputationData & | withoutBusyMode ()=0 |
virtual const std::vector< uint8_t > & | getSignedData () const =0 |
![]() | |
virtual TraceableSignatureComputationData & | setData (const std::vector< uint8_t > &data, const uint8_t kif, const uint8_t kvc)=0 |
virtual TraceableSignatureComputationData & | setSignatureSize (const int size)=0 |
virtual TraceableSignatureComputationData & | setKeyDiversifier (const std::vector< uint8_t > &diversifier)=0 |
const std::vector< uint8_t > & | getSignature () const=0 |
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().
Definition at line 35 of file TraceableSignatureComputationData.hpp.
|
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.
IllegalStateException | If the command has not yet been processed. |
|
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.
|
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.
offset | The offset in bits. |
samTraceabilityMode | The SAM traceability mode to be used. |
IllegalArgumentException | If the provided samTraceabilityMode is null. |