Interface SecureWriteTransactionManager

All Superinterfaces:
TransactionManager<SecureWriteTransactionManager>, WriteTransactionManager<SecureWriteTransactionManager>

public interface SecureWriteTransactionManager extends WriteTransactionManager<SecureWriteTransactionManager>
Transaction manager dedicated to "WRITE" operations secured by a control SAM.

The write operations defined here can only be executed synchronously.

Since:
0.7.0
  • Method Details

    • prepareWriteSamParameters

      SecureWriteTransactionManager prepareWriteSamParameters(byte[] parameters)
      Schedules the execution of a "Write Parameters" command to write the SAM parameters file.
      Parameters:
      parameters - A 29-byte byte array representing the content of the SAM parameters file.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If the provided argument is null or out of range.
      Since:
      0.7.0
    • prepareTransferSystemKey

      SecureWriteTransactionManager prepareTransferSystemKey(SystemKeyType systemKeyType, byte kvc, byte[] systemKeyParameters)
      Schedules the execution of a "Write Key" command to perform the transfer of a system key from the control SAM to the target SAM.
      Parameters:
      systemKeyType - The type of system key.
      kvc - The KVC of the key.
      systemKeyParameters - A 29-byte byte array containing the key parameter data.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If one of the provided argument is null or out of range.
      Since:
      0.7.0
    • prepareTransferSystemKeyDiversified

      SecureWriteTransactionManager prepareTransferSystemKeyDiversified(SystemKeyType systemKeyType, byte kvc, byte[] systemKeyParameters)
      Schedules the execution of a "Write Key" command to perform the transfer of a system key from the control SAM to the target SAM, the key being first diversified (with the serial number of the target SAM).
      Parameters:
      systemKeyType - The type of system key.
      kvc - The KVC of the key.
      systemKeyParameters - A 29-byte byte array containing the key parameter data.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If one of the provided argument is null or out of range.
      Since:
      0.7.0
    • prepareTransferWorkKey

      SecureWriteTransactionManager prepareTransferWorkKey(byte kif, byte kvc, byte[] workKeyParameters, int targetRecordNumber)
      Schedules the execution of a "Write Key" command to perform the transfer of a work key from the control SAM to the target SAM.

      The record number supplied indicates the destination location in the work key file. If its value is zero, then the location will be chosen automatically by the SAM.

      Parameters:
      kif - The KIF of the key.
      kvc - The KVC of the key.
      workKeyParameters - A 29-byte byte array containing the key parameter data.
      targetRecordNumber - The number of the record where to store the key (in range [0..126]).
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If one of the provided argument is null or out of range.
      Since:
      0.7.0
    • prepareTransferWorkKeyDiversified

      SecureWriteTransactionManager prepareTransferWorkKeyDiversified(byte kif, byte kvc, byte[] workKeyParameters, int targetRecordNumber)
      Schedules the execution of a "Write Key" command to perform the transfer of a work key from the control SAM to the target SAM, the key being first diversified with the serial number of the target SAM).

      The record number supplied indicates the destination location in the work key file. If its value is zero, then the location will be chosen automatically by the SAM.

      Parameters:
      kif - The KIF of the key.
      kvc - The KVC of the key.
      workKeyParameters - A 29-byte byte array containing the key parameter data.
      targetRecordNumber - The number of the record where to store the key (in range [0..126]).
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If one of the provided argument is null or out of range.
      Since:
      0.7.0
    • prepareTransferWorkKeyDiversified

      SecureWriteTransactionManager prepareTransferWorkKeyDiversified(byte kif, byte kvc, byte[] workKeyParameters, int targetRecordNumber, byte[] diversifier)
      Schedules the execution of a "Write Key" command to perform the transfer of a work key from the control SAM to the target SAM, the key being first diversified with the provided diversifier.

      The record number supplied indicates the destination location in the work key file. If its value is zero, then the location will be chosen automatically by the SAM.

      Parameters:
      kif - The KIF of the key.
      kvc - The KVC of the key.
      workKeyParameters - A 29-byte byte array containing the key parameter data.
      targetRecordNumber - The number of the record where to store the key (in range [0..126]).
      diversifier - A 8-byte byte array to use as key diversifier.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If one of the provided argument is null or out of range.
      Since:
      0.7.0
    • prepareTransferLock

      SecureWriteTransactionManager prepareTransferLock(byte lockIndex, byte lockParameters)
      Schedules the execution of a "Write Key" command to transfer a lock file from the control SAM to the target SAM.
      Parameters:
      lockIndex - The index of the lock file.
      lockParameters - The lock permissions parameters.
      Returns:
      The current instance.
      Since:
      0.7.0
    • prepareTransferLockDiversified

      SecureWriteTransactionManager prepareTransferLockDiversified(byte lockIndex, byte lockParameters)
      Schedules the execution of a "Write Key" command to transfer a lock file from the control SAM to the target SAM, the key being first diversified (with the serial number of the target SAM).
      Parameters:
      lockIndex - The index of the lock file.
      lockParameters - The lock permissions parameters.
      Returns:
      The current instance.
      Since:
      0.7.0
    • preparePlainWriteLock

      SecureWriteTransactionManager preparePlainWriteLock(byte lockIndex, byte lockParameters, byte[] lockValue)
      Schedules the execution of a "Write Key" command to set the lock file of the SAM.

      The lock value will be transferred in plain text.

      Parameters:
      lockIndex - The index of the lock file.
      lockParameters - The lock permissions parameters.
      lockValue - A 16-byte byte array representing the lock's value.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If lockValue is null or out of range.
      Since:
      0.7.0