Interface TraceableSignatureComputationData
-
- All Superinterfaces:
SignatureComputationData<TraceableSignatureComputationData>
public interface TraceableSignatureComputationData extends SignatureComputationData<TraceableSignatureComputationData>
Contains the input/output data of theFreeTransactionManager.prepareComputeSignature(SignatureComputationData)
method for traceable signature computation using the "PSO Compute Signature" command.An instance of this interface can be obtained via the method
LegacySamApiFactory.createTraceableSignatureComputationData()
.- Since:
- 0.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getSignedData()
Returns the data that was used to generate the signature.TraceableSignatureComputationData
withoutBusyMode()
Disables the "Busy" mode.TraceableSignatureComputationData
withSamTraceabilityMode(int offset, SamTraceabilityMode samTraceabilityMode)
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.-
Methods inherited from interface org.eclipse.keypop.calypso.crypto.legacysam.transaction.SignatureComputationData
getSignature, setData, setKeyDiversifier, setSignatureSize
-
-
-
-
Method Detail
-
withSamTraceabilityMode
TraceableSignatureComputationData withSamTraceabilityMode(int offset, SamTraceabilityMode samTraceabilityMode)
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:
offset
- The offset in bits.samTraceabilityMode
- The SAM traceability mode to be used.- Returns:
- The current instance.
- Throws:
java.lang.IllegalArgumentException
- If the provided samTraceabilityMode is null.- Since:
- 0.1.0
-
withoutBusyMode
TraceableSignatureComputationData withoutBusyMode()
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
-
getSignedData
byte[] getSignedData()
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.
- Throws:
java.lang.IllegalStateException
- If the command has not yet been processed.- Since:
- 0.1.0
-
-