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

Functions

template<domain D :shared3p >
uint publicRandomPermutation (D uint domainProxy, uint n)
 

Detailed Description

Generates a random public permutation.

Note
D - shared3p protection domain
This procedure actually generates a uint32 permutation vector which is converted to uint64. It does not work when n > UINT32_MAX.
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
Returns
a random permutation of length n

Function Documentation

◆ publicRandomPermutation()

uint publicRandomPermutation ( D uint  domainProxy,
uint  n 
)