shared3p_permutation.sc
shared3p_permutation.sc
Module with procedures for permuting vectors and matrices.
Functions:
applyPrivatePermutation
Permute a vector according to a private permutation.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
x |
- vector to be permuted |
p |
- permutation. Output at index |
|
None |
applyPrivatePermutationCols
Permute matrix columns according to a private permutation.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output column at index |
|
None |
applyPrivatePermutationRows
Permute matrix rows according to a private permutation.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output row at index |
|
None |
applyPublicPermutation
Permute a vector according to a public permutation.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
x |
- vector to be permuted |
p |
- permutation. Output at index |
|
None |
applyPublicPermutationCols
Permute matrix columns according to a public permutation.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output column at index |
|
None |
applyPublicPermutationRows
Permute matrix rows according to a public permutation.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output row at index |
|
None |
inversePermutation
Calculate inverse permutation from a permutation.
privateRandomPermutation
Generates a random private permutation.
publicRandomPermutation
Generates a random public permutation.
Detailed Description
D - shared3p protection domain |
This procedure actually generates a |
Parameters
domainProxy |
- a value used to indicate the shared3p domain used for generating shared randomness by the procedure. The value of this parameter is not important. |
n |
- length of the permutation |
a random permutation of length |
unapplyPrivatePermutation
Permute a vector according to a private permutation. Reverses the effect of applyPrivatePermutation
.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
x |
- vector to be permuted |
p |
- permutation. Output at index |
|
None |
unapplyPrivatePermutationCols
Permute matrix columns according to a private permutation. Reverses the effect of applyPrivatePermutationCols
.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output column at index |
|
None |
unapplyPrivatePermutationRows
Permute matrix rows according to a private permutation. Reverses the effect of applyPrivatePermutationRows
.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output row at index |
|
None |
unapplyPublicPermutation
Permute a vector according to a public permutation. Reverses the effect of applyPublicPermutation
.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output at index |
|
None |
unapplyPublicPermutationCols
Permute matrix columns according to a public permutation. Reverses the effect of applyPublicPermutationCols
.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output column at index |
|
None |
unapplyPublicPermutationRows
Permute matrix rows according to a public permutation. Reverses the effect of applyPublicPermutationRows
.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64 |
Parameters
X |
- matrix to be permuted |
p |
- permutation. Output row at index |
|
None |