Interface TraceableSignatureComputationData

    • Method Detail

      • withSamTraceabilityMode

        TraceableSignatureComputationData withSamTraceabilityMode​(int offset,
                                                                  boolean usePartialSamSerialNumber)
        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.
        usePartialSamSerialNumber - True if only the 3 LSBytes of the SAM serial number should be used.
        Returns:
        The current instance.
        Since:
        1.2.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:
        1.2.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:
        1.2.0