myl7/fss 2.0.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
Loading...
Searching...
No Matches
fss::prg::ChaCha< mul, rounds > Class Template Reference

ChaCha as a PRG. More...

Public Member Functions

 ChaCha (int nonce0, int nonce1)
 Constructor.

Detailed Description

template<int mul, int rounds = 20>
requires (rounds > 0 && rounds % 2 == 0 && (mul == 1 || mul == 2 || mul == 4))
class fss::prg::ChaCha< mul, rounds >

ChaCha as a PRG.

Template Parameters
mulSeed expansion factor. Gen() maps one 16 B seed to mul * 16 B. Supported factors are 1, 2, and 4.
roundsPositive even round count. The default value is secure enough and widely used, thus preferred.

Constructor & Destructor Documentation

◆ ChaCha()

template<int mul, int rounds = 20>
fss::prg::ChaCha< mul, rounds >::ChaCha ( int nonce0,
int nonce1 )
inline

Constructor.

Parameters
nonce0,nonce1Can be randomly sampled by users. The nonce is stored by value, so an instance built on the host works on the device too: kernels capture the owning scheme object by value.

The documentation for this class was generated from the following file: