|
template<domain D :shared3p , type T> |
D T | inverseShuffle (D T[[1]] vec, D uint8[[1]] key) |
|
template<domain D :shared3p > |
D fix32 | inverseShuffle (D fix32[[1]] vec, D uint8[[1]] key) |
|
template<domain D :shared3p > |
D fix64 | inverseShuffle (D fix64[[1]] vec, D uint8[[1]] key) |
|
Protocols to undo the shuffle of an array with given key.
- Note
- D - shared3p protection domain
- Precondition
- the key is exactly 32 bytes long
- Returns
- the inverse of the permutation of the input array, defined by the key
- Postcondition
- the output is a permutation of the input
- Note
- the declassified value of the key does not matter, internally only the shares are used. If two vectors are shuffled using the same key the permutation applied is the same as long as the vectors are of the same length, and the key does not get reshared.
- Leakage
- None
◆ inverseShuffle() [1/3]
D fix32 inverseShuffle |
( |
D fix32[[1]] |
vec, |
|
|
D uint8[[1]] |
key |
|
) |
| |
◆ inverseShuffle() [2/3]
D fix64 inverseShuffle |
( |
D fix64[[1]] |
vec, |
|
|
D uint8[[1]] |
key |
|
) |
| |
◆ inverseShuffle() [3/3]
D T inverseShuffle |
( |
D T[[1]] |
vec, |
|
|
D uint8[[1]] |
key |
|
) |
| |
- Note
- T - any data type
- Parameters
-
vec | - input array to shuffle |
key | - an uint8 type key that specifies the permutation |