SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions
inverseShuffleRows(key)

Functions

template<domain D :shared3p , type T>
D T inverseShuffleRows (D T[[2]] mat, D uint8[[1]] key)
 
template<domain D :shared3p >
D fix32 inverseShuffleRows (D fix32[[2]] mat, D uint8[[1]] key)
 
template<domain D :shared3p >
D fix64 inverseShuffleRows (D fix64[[2]] mat, D uint8[[1]] key)
 

Detailed Description

Protocols to undo the shuffling of rows in a matrix 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 matrix, defined by the key
Postcondition
the output matrices rows are 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

Function Documentation

◆ inverseShuffleRows() [1/3]

D fix32 inverseShuffleRows ( D fix32[[2]]  mat,
D uint8[[1]]  key 
)

◆ inverseShuffleRows() [2/3]

D fix64 inverseShuffleRows ( D fix64[[2]]  mat,
D uint8[[1]]  key 
)

◆ inverseShuffleRows() [3/3]

D T inverseShuffleRows ( D T[[2]]  mat,
D uint8[[1]]  key 
)
Note
T - any data type
Parameters
mat- input matrix to shuffle
key- an uint8 type key that specifies the permutation