shared3p_oblivious.sc
shared3p_oblivious.sc
Module with functions for oblivious tasks (shared3p protection domain)
Functions:
choose
Function for obliviously choosing one of the inputs.
Detailed Description
D - shared3p protection domain |
Supported types - float32 / float64 / fix32 / fix64 |
Parameters
cond |
- a boolean array |
first |
- values for true case |
second |
- values for false case |
one of the input arrays that was obliviously chosen with the condition. if true, array first is returned else second is returned |
None |
Function Overloads
D float32 choose(D bool[[N]] cond, D float32[[N]] first, D float32[[N]] second)
D float64 choose(D bool[[N]] cond, D float64[[N]] first, D float64[[N]] second)
D fix32 choose(D bool[[N]] cond, D fix32[[N]] first, D fix32[[N]] second)
D fix64 choose(D bool[[N]] cond, D fix64[[N]] first, D fix64[[N]] second)
matrixUpdate
Function for obliviously updating a value in the input matrix.
Detailed Description
D - shared3p protection domain |
Supported types - float32 / float64 |
Parameters
mat |
- a matrix of supported type |
rowIndex |
- an uint type scalar for specifying the row in the input matrix |
colIndex |
- an uint type scalar for specifying the column in the input matrix |
newValue |
- a new scalar value |
returns a matrix where the element at row rowIndex and column colIndex has been replaced with newValue |
None |
matrixUpdateColumn
Function for obliviously updating a column in the input matrix.
Detailed Description
D - shared3p protection domain |
Supported types - float32 / float64 |
Parameters
mat |
- a matrix of supported type |
colIndex |
- an uint type scalar for specifying the column to replace |
newCol |
- a vector with new values |
returns a matrix where the column at colIndex has been replaced with newCol |
None |
matrixUpdateRow
Function for obliviously updating a row in the input matrix.
Detailed Description
D - shared3p protection domain |
Supported types - float32 / float64 |
Parameters
mat |
- a matrix of supported type |
rowIndex |
- an uint type scalar for specifying the row to replace |
newRow |
- a vector with new values |
returns a matrix where the row at rowIndex has been replaced with newRow |
None |
vectorUpdate
Function for obliviously updating an element in the input vector.
Detailed Description
D - shared3p protection domain |
Supported types - float64 / float32 |
Parameters
vec |
- a 1-dimensional vector of supported type |
index |
- an uint type scalar for specifying the element to replace |
newValue |
- a scalar value of the same type as the input vector |
returns a vector with the value at position index replaced by newValue |
None |