|
template<domain D :shared3p > |
uint | oramPrepareWrite (uint arrLen, D uint[[1]] indices, D uint8[[1]] shuffleSeed1, D uint8[[1]] shuffleSeed2) |
|
Prepares a sort permutation for oblivious write function oramPerformWrite.
- Note
- D - shared3p protection domain
-
See supported types for oramPerformWrite
- Parameters
-
arrLen | - length of the original values vector (arr in oramPerformWrite) |
indices | - vector specifying where to write the corresponding value from the replacement values vector (vals in oramPerformWrite) |
shuffleSeed1 | - random seed (32 bytes) |
shuffleSeed2 | - random seed (32 bytes) |
- Returns
- sorting permutation, used as
sigmatau
in oramPerformWrite
- Note
- Note that the output sorting permutation is a public value. Based on its input data, oramPrepareWrite computes a secret permutation that is represented as combination of a public output permutation and secret
shuffleSeed1
and shuffleSeed2
. Therefore, the public permutation alone does not leak anything as it is masked by the secret permutation. This works similarly to one-time-pad. However, for the same reason shuffleSeed1
shuffleSeed2
values must not be reused for other prepare*
(or shuffle) calls.
- Leakage
- None
◆ oramPrepareWrite()
uint oramPrepareWrite |
( |
uint |
arrLen, |
|
|
D uint[[1]] |
indices, |
|
|
D uint8[[1]] |
shuffleSeed1, |
|
|
D uint8[[1]] |
shuffleSeed2 |
|
) |
| |