shared3p_random.sc
shared3p_random.sc
Module with functions for randomizing values.
Functions:
randomize
Function for randomizing values.
Detailed Description
D - shared3p protection domain |
Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64 |
Parameters
arr |
- an array of any dimension |
returns an array with randomized values |
None |
Function Overloads
D bool randomize(D bool[[N]] arr)
D uint8 randomize(D uint8[[N]] arr)
D uint16 randomize(D uint16[[N]] arr)
D uint32 randomize(D uint32[[N]] arr)
D uint randomize(D uint[[N]] arr)
D int8 randomize(D int8[[N]] arr)
D int16 randomize(D int16[[N]] arr)
D int32 randomize(D int32[[N]] arr)
D int randomize(D int[[N]] arr)
D xor_uint8 randomize(D xor_uint8[[N]] arr)
D xor_uint16 randomize(D xor_uint16[[N]] arr)
D xor_uint32 randomize(D xor_uint32[[N]] arr)
D xor_uint64 randomize(D xor_uint64[[N]] arr)
D fix32 randomize(D fix32[[N]] arr)
D fix64 randomize(D fix64[[N]] arr)
shuffle
Functions for shuffling values.
Functions:
D - shared3p protection domain |
T - any data type |
inverseShuffle(key)
Protocols to undo the shuffle of an array with given key.
Detailed Description
D - shared3p protection domain |
the key is exactly 32 bytes long |
the inverse of the permutation of the input array, defined by the key |
the output is a permutation of the input |
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. |
None |
inverseShuffleColumns(key)
Protocols to undo the shuffle of columns in a matrix with given key.
Detailed Description
D - shared3p protection domain |
the key is exactly 32 bytes long |
the inverse of the permutation of the input matrix, defined by the key |
the output matrixes columns are a permutation of the input |
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. |
None |
inverseShuffleRows(key)
Protocols to undo the shuffling of rows in a matrix with given key.
Detailed Description
D - shared3p protection domain |
the key is exactly 32 bytes long |
the inverse of the permutation of the input matrix, defined by the key |
the output matrices rows are a permutation of the input |
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. |
None |
shuffle(key)
Protocols to shuffle an array with given key.
Detailed Description
D - shared3p protection domain |
the key is exactly 32 bytes long |
a random permutation of the input array |
the output is a permutation of the input |
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. |
None |
shuffleColumns(key)
Protocols to shuffle columns in a matrix with given key.
Detailed Description
D - shared3p protection domain |
the key is exactly 32 bytes long |
a random permutation of the input matrix |
the output matrixes columns are a permutation of the input |
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. |
None |
shuffleRows(key)
Protocols to shuffle rows in a matrix with given key.
Detailed Description
D - shared3p protection domain |
the key is exactly 32 bytes long |
a random permutation of the input matrix |
the output matrices rows are a permutation of the input |
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. |
None |