S.NH
Naive hash-based PSI
type t
type elt
= Cstruct.t
Plaintext element
type pset
= Stdlib.Set.Make(Cstruct).t
Plaintext set
type hset
Hashed set
val init : ?salt:Cstruct.t -> unit -> t
init ?salt ?set () initializes a NH PSI instance.
init ?salt ?set ()
Salt for hashing elements
val add : elt -> t -> t
add elem t adds elt to the set
add elem t
elt
val add_set : pset -> t -> t
add_set pset t adds pset of elements to the set
add_set pset t
pset
val remove : elt -> t -> t
remove elem t removes elt from the set
remove elem t
val inter : t -> hset -> pset
inter t hset computes the intersection of a private, plaintext set and a public, hashed set
inter t hset
val priv : t -> pset
priv t returns the set of private, plaintext set
priv t
val pub : t -> hset
pub t returns the set of public, hashed set
pub t