Keypop Calypso Crypto Legacy SAM C++ API - 1.0.0
Component of the Keypop C++ API
SecureWriteTransactionManager.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2025 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * This program and the accompanying materials are made available under the *
5 * terms of the MIT License which is available at *
6 * https://opensource.org/licenses/MIT. *
7 * *
8 * SPDX-License-Identifier: MIT *
9 ******************************************************************************/
10
11#pragma once
12
13#include <cstdint>
14#include <vector>
15
18
19namespace keypop {
20namespace calypso {
21namespace crypto {
22namespace legacysam {
23namespace transaction {
24
26
35: public WriteTransactionManager<SecureWriteTransactionManager> {
36public:
49 prepareWriteSamParameters(const std::vector<uint8_t>& parameters)
50 = 0;
51
66 const SystemKeyType systemKeyType,
67 const uint8_t kvc,
68 const std::vector<uint8_t>& systemKeyParameters)
69 = 0;
70
86 const SystemKeyType systemKeyType,
87 const uint8_t kvc,
88 const std::vector<uint8_t>& systemKeyParameters)
89 = 0;
90
111 const uint8_t kif,
112 const uint8_t kvc,
113 const std::vector<uint8_t>& workKeyParameters,
114 const int targetRecordNumber)
115 = 0;
116
138 const uint8_t kif,
139 const uint8_t kvc,
140 const std::vector<uint8_t>& workKeyParameters,
141 const int targetRecordNumber)
142 = 0;
143
166 const uint8_t kif,
167 const uint8_t kvc,
168 const std::vector<uint8_t>& workKeyParameters,
169 const int targetRecordNumber,
170 const std::vector<uint8_t>& diversifier)
171 = 0;
172
184 prepareTransferLock(const uint8_t lockIndex, const uint8_t lockParameters)
185 = 0;
186
198 const uint8_t lockIndex, const uint8_t lockParameters)
199 = 0;
200
215 const uint8_t lockIndex,
216 const uint8_t lockParameters,
217 const std::vector<uint8_t>& lockValue)
218 = 0;
219};
220
221} /* namespace transaction */
222} /* namespace legacysam */
223} /* namespace crypto */
224} /* namespace calypso */
225} /* namespace keypop */
Transaction manager dedicated to "WRITE" operations secured by a control SAM.
virtual SecureWriteTransactionManager & prepareTransferLockDiversified(const uint8_t lockIndex, const uint8_t lockParameters)=0
Schedules the execution of a "Write Key" command to transfer a lock file from the control SAM to the ...
virtual SecureWriteTransactionManager & preparePlainWriteLock(const uint8_t lockIndex, const uint8_t lockParameters, const std::vector< uint8_t > &lockValue)=0
Schedules the execution of a "Write Key" command to set the lock file of the SAM.
virtual SecureWriteTransactionManager & prepareTransferWorkKey(const uint8_t kif, const uint8_t kvc, const std::vector< uint8_t > &workKeyParameters, const int targetRecordNumber)=0
Schedules the execution of a "Write Key" command to perform the transfer of a work key from the contr...
virtual SecureWriteTransactionManager & prepareTransferWorkKeyDiversified(const uint8_t kif, const uint8_t kvc, const std::vector< uint8_t > &workKeyParameters, const int targetRecordNumber, const std::vector< uint8_t > &diversifier)=0
Schedules the execution of a "Write Key" command to perform the transfer of a work key from the contr...
virtual SecureWriteTransactionManager & prepareTransferSystemKeyDiversified(const SystemKeyType systemKeyType, const uint8_t kvc, const std::vector< uint8_t > &systemKeyParameters)=0
Schedules the execution of a "Write Key" command to perform the transfer of a system key from the con...
virtual SecureWriteTransactionManager & prepareTransferWorkKeyDiversified(const uint8_t kif, const uint8_t kvc, const std::vector< uint8_t > &workKeyParameters, const int targetRecordNumber)=0
Schedules the execution of a "Write Key" command to perform the transfer of a work key from the contr...
virtual SecureWriteTransactionManager & prepareWriteSamParameters(const std::vector< uint8_t > &parameters)=0
Schedules the execution of a "Write Parameters" command to write the SAM parameters file.
virtual SecureWriteTransactionManager & prepareTransferLock(const uint8_t lockIndex, const uint8_t lockParameters)=0
Schedules the execution of a "Write Key" command to transfer a lock file from the control SAM to the ...
virtual SecureWriteTransactionManager & prepareTransferSystemKey(const SystemKeyType systemKeyType, const uint8_t kvc, const std::vector< uint8_t > &systemKeyParameters)=0
Schedules the execution of a "Write Key" command to perform the transfer of a system key from the con...
SystemKeyType
Enumeration of the system key types of a Legacy Sam.