|
template<domain D :shared3p > |
uint | oramPrepareRead (uint srcLen, D uint[[1]] indices, D uint8[[1]] shuffleSeed) |
|
Prepares a sort permutation for oblivious read function oramPerformRead.
- Note
- D - shared3p protection domain
-
See supported types for oramPerformRead
- Parameters
-
srcLen | - length of the vector to read from |
indices | - indices (in the src vector) to read from |
shuffleSeed | - random seed (32 bytes) |
- Returns
- sorting permutation, used as
sortperm
in oramPerformRead
- Note
- Note that the output sorting permutation is a public value. Based on its input data, oramPrepareRead computes a secret permutation that is represented as combination of a public output permutation and a secret
shuffleSeed
. 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 the shuffleSeed
value must not be reused for other prepare*
(or shuffle) calls.
- Leakage
- None
◆ oramPrepareRead()
uint oramPrepareRead |
( |
uint |
srcLen, |
|
|
D uint[[1]] |
indices, |
|
|
D uint8[[1]] |
shuffleSeed |
|
) |
| |