Checkpoint the party/runtime stack before share-program and malicious-mode work.
Ship the TLS mesh, composer, Beaver/Yao/leaf MPC, prep/online paths, apps, and docs so the tree is pushable before elevating share_expr, security_mode, and prep resume. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
695f8e84f7
commit
0d22946a0e
1835 changed files with 170291 additions and 2849 deletions
|
|
@ -135,6 +135,66 @@ template <typename T>
|
|||
inline constexpr bool is_multilevel_key_v =
|
||||
is_multilevel_key<std::decay_t<T>>::value;
|
||||
|
||||
/// @brief True when `T` stores its DPF key in a public member named `dpf_key`
|
||||
/// and is not itself a DPF key.
|
||||
/// @details Wrappers (`ic_key`, `vdpf_plus_key`, `dpf3_cmp_key`, `dpf3_ic_key`,
|
||||
/// and the distributed `opened_*` envelopes) use that member name.
|
||||
/// `party_key` inherits the DPF key, so it is not a wrapper.
|
||||
template <typename T, typename = void>
|
||||
struct has_embedded_dpf_key : std::false_type
|
||||
{
|
||||
};
|
||||
template <typename T>
|
||||
struct has_embedded_dpf_key<T,
|
||||
std::void_t<decltype(std::declval<T &>().dpf_key)>>
|
||||
: std::bool_constant<!looks_like_dpf_key_v<T>>
|
||||
{
|
||||
};
|
||||
template <typename T>
|
||||
inline constexpr bool has_embedded_dpf_key_v =
|
||||
has_embedded_dpf_key<std::decay_t<T>>::value;
|
||||
|
||||
/// @brief The DPF key `T` evaluates as: `T` itself, or `T::dpf_key` peeled
|
||||
/// until the result looks like a DPF key.
|
||||
template <typename T, typename = void>
|
||||
struct bare_dpf_key
|
||||
{
|
||||
using type = std::decay_t<T>;
|
||||
};
|
||||
template <typename T>
|
||||
struct bare_dpf_key<T, std::enable_if_t<has_embedded_dpf_key_v<std::decay_t<T>>>>
|
||||
: bare_dpf_key<std::decay_t<decltype(std::declval<std::decay_t<T> &>().dpf_key)>>
|
||||
{
|
||||
};
|
||||
template <typename T>
|
||||
using bare_dpf_key_t = typename bare_dpf_key<std::decay_t<T>>::type;
|
||||
|
||||
/// @brief Key-first protocol evals (`dpf3`, `dpf3_cmp`, `dpf3_ic`) keep their
|
||||
/// own overloads. Peel does not replace those.
|
||||
template <typename T, typename = void>
|
||||
struct flag_is_dpf3 : std::false_type {};
|
||||
template <typename T>
|
||||
struct flag_is_dpf3<T, std::void_t<decltype(T::is_dpf3)>>
|
||||
: std::bool_constant<T::is_dpf3> {};
|
||||
|
||||
template <typename T, typename = void>
|
||||
struct flag_is_dpf3_cmp : std::false_type {};
|
||||
template <typename T>
|
||||
struct flag_is_dpf3_cmp<T, std::void_t<decltype(T::is_dpf3_cmp)>>
|
||||
: std::bool_constant<T::is_dpf3_cmp> {};
|
||||
|
||||
template <typename T, typename = void>
|
||||
struct flag_is_dpf3_ic : std::false_type {};
|
||||
template <typename T>
|
||||
struct flag_is_dpf3_ic<T, std::void_t<decltype(T::is_dpf3_ic)>>
|
||||
: std::bool_constant<T::is_dpf3_ic> {};
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool owns_protocol_eval_v =
|
||||
flag_is_dpf3<std::decay_t<T>>::value
|
||||
|| flag_is_dpf3_cmp<std::decay_t<T>>::value
|
||||
|| flag_is_dpf3_ic<std::decay_t<T>>::value;
|
||||
|
||||
} // namespace dpf
|
||||
|
||||
#endif // LIBDPF_INCLUDE_DPF_EVAL_TARGET_HPP__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue