|
| template<domain D :shared3p , dim N> |
| D float32 | choose (D bool cond, D float32 first, D float32 second) |
| |
| template<domain D :shared3p , dim N> |
| D float64 | choose (D bool cond, D float64 first, D float64 second) |
| |
| template<domain D, dim N> |
| D fix32 | choose (D bool cond, D fix32 first, D fix32 second) |
| |
| template<domain D, dim N> |
| D fix64 | choose (D bool cond, D fix64 first, D fix64 second) |
| |
Function for obliviously choosing one of the inputs.
- Note
- 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 |
- Returns
- one of the input arrays that was obliviously chosen with the condition. if true, array first is returned else second is returned
- Leakage
- None
◆ choose() [1/4]
template<domain D, dim N>
| D fix32 choose |
( |
D bool |
cond, |
|
|
D fix32 |
first, |
|
|
D fix32 |
second |
|
) |
| |
◆ choose() [2/4]
template<domain D, dim N>
| D fix64 choose |
( |
D bool |
cond, |
|
|
D fix64 |
first, |
|
|
D fix64 |
second |
|
) |
| |
◆ choose() [3/4]
template<domain D :shared3p , dim N>
| D float32 choose |
( |
D bool |
cond, |
|
|
D float32 |
first, |
|
|
D float32 |
second |
|
) |
| |
◆ choose() [4/4]
template<domain D :shared3p , dim N>
| D float64 choose |
( |
D bool |
cond, |
|
|
D float64 |
first, |
|
|
D float64 |
second |
|
) |
| |