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

AES-128 CCR hash H(z) = AES_K(sigma(z)) xor sigma(z). More...

Public Member Functions

 Aes128Ccr (AesMmo aes_mmo)
 Initialize the hash with an AES-MMO backend configured with the fixed key K.
int4 Hash (int4 block)
 Return the 128-bit CCR hash of block with an OpenSSL or AES-NI backend.
int4 Hash (int4 block)
 Return the 128-bit CCR hash of block on the host or device with a software AES backend.

Detailed Description

template<typename AesMmo>
requires (std::same_as<AesMmo, prg::Aes128Mmo<1>> || std::same_as<AesMmo, prg::Aes128MmoRaw<1>> || std::same_as<AesMmo, prg::Aes128Soft<1>>)
class fss::hash::Aes128Ccr< AesMmo >

AES-128 CCR hash H(z) = AES_K(sigma(z)) xor sigma(z).

For 64-bit halves z = (L, R), sigma(z) = (L xor R, L). L is stored in int4::x and int4::y, and R in int4::z and int4::w. The construction uses the linear orthomorphism from Section 7.3 of https://eprint.iacr.org/2019/074. The AES key K belongs to the backend and differs from HalfTree's seed S.

Template Parameters
AesMmoAes128Mmo<1>, Aes128MmoRaw<1>, or Aes128Soft<1>. Execution-space support, context concurrency, and table/context lifetimes are those of the selected backend. Hash() is host/device for Aes128Soft<1> and host-only for Aes128Mmo<1> and Aes128MmoRaw<1>, whose device use fails to build with an unresolved-extern error naming fss_host_only_Aes128Ccr_used_in_device_code.

Member Function Documentation

◆ Hash()

template<typename AesMmo>
requires (!std::same_as<AesMmo, prg::Aes128Soft<1>>)
int4 fss::hash::Aes128Ccr< AesMmo >::Hash ( int4 block)
inline

Return the 128-bit CCR hash of block with an OpenSSL or AES-NI backend.

Only for host side; device use fails to build with an unresolved-extern error naming fss_host_only_Aes128Ccr_used_in_device_code.


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