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

AES-128 with Matyas-Meyer-Oseas and AES-NI intrinsics as a PRG. More...

Public Member Functions

 Aes128MmoRaw (const uint8_t keys[][16])
 Constructor.
cuda::std::array< int4, mul/2 > GenHalf (int4 seed, bool right)
 Return the selected half of Gen() with the same call requirements.
cuda::std::array< cuda::std::array< int4, mul >, 8 > Gen8 (cuda::std::span< const int4, 8 > seeds)
 Batched 8-seed version of Gen().

Detailed Description

template<int mul>
class fss::prg::Aes128MmoRaw< mul >

AES-128 with Matyas-Meyer-Oseas and AES-NI intrinsics as a PRG.

Host-only. Device use of Gen(), GenHalf(), or Gen8() fails to build with an unresolved-extern error naming fss_host_only_Aes128MmoRaw_used_in_device_code.

Template Parameters
mulSee Prgable mul.

Constructor & Destructor Documentation

◆ Aes128MmoRaw()

template<int mul>
fss::prg::Aes128MmoRaw< mul >::Aes128MmoRaw ( const uint8_t keys[][16])
inline

Constructor.

Parameters
keysmul 16-byte AES-128 keys.

Member Function Documentation

◆ Gen8()

template<int mul>
cuda::std::array< cuda::std::array< int4, mul >, 8 > fss::prg::Aes128MmoRaw< mul >::Gen8 ( cuda::std::span< const int4, 8 > seeds)
inline

Batched 8-seed version of Gen().

Applies the same MMO construction to 8 independent seeds under the same key schedules, so out[j] is bit-exact with Gen(seeds[j]). The 8 streams are interleaved as 8 x 128b lanes: each AES round key is loaded once and consumed by 8 consecutive aesenc calls.

Only for host side.

See the HasGen8 concept for the effect on the schemes that batch their PRG expansion through this member and for when a backend gains from it.

Parameters
seeds8 independent 16B seeds.
Returns
For each seed j, the mul MMO output blocks out[j][i] = E_{keys[i]}(seeds[j]) ^ seeds[j].

◆ GenHalf()

template<int mul>
requires (mul > 0 && mul % 2 == 0)
cuda::std::array< int4, mul/2 > fss::prg::Aes128MmoRaw< mul >::GenHalf ( int4 seed,
bool right )
inline

Return the selected half of Gen() with the same call requirements.

Parameters
seedSeed block to expand, the same input Gen() takes.
rightfalse selects the first half, true selects the second half.

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