myl7/fss 1.1.0
Function secret sharing (FSS) primitives including distributed point/comparison function (DPF/DCF)
Loading...
Searching...
No Matches
hash.cuh
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
8#pragma once
9#include <cuda_runtime.h>
10#include <cuda/std/array>
11#include <cuda/std/span>
12#include <cuda/std/tuple>
13#include <concepts>
14
18template <typename Hash>
19concept Hashable = requires(Hash hash, cuda::std::span<const int4, 4> msg) {
20 { hash.Hash(msg) } -> std::same_as<cuda::std::array<int4, 2>>;
21};
22
26template <typename Hash>
27concept XorHashable = requires(Hash hash, cuda::std::tuple<int4, const int4> msg) {
28 { hash.Hash(msg) } -> std::same_as<cuda::std::array<int4, 4>>;
29};
Collision-resistant hash interface.
Definition hash.cuh:19
Collision-resistant and XOR-collision-resistant hash interface.
Definition hash.cuh:27