Private Set Intersection protocol based on ECDH, Bloom Filters, and Golomb Compressed Sets.
import "github.com/openmined/psi/client"
import "github.com/openmined/psi/server"
bazel test --test_output=all //private_set_intersection/go/...
bazel test -c opt --test_output=all --test_arg=-test.bench=. //private_set_intersection/go/...
- Add Bazel depends to your WORKSPACE, as indicated in the Usage section.
- Add the server or the client to your deps in the BUILD file
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "github.com/openmined/psi",
deps = [
"@org_openmined_psi//private_set_intersection/go/server",
"@org_openmined_psi//private_set_intersection/go/client",
],
)
- Import and use the library
package main
import (
"fmt"
"github.com/openmined/psi/server"
"github.com/openmined/psi/client"
)
func main(){
revealIntersection := false
psiServer, err := server.CreateWithNewKey(revealIntersection)
if err == nil {
fmt.Println("server loaded")
psiServer.Destroy()
}
psiClient, err := client.CreateWithNewKey(revealIntersection)
if err == nil {
fmt.Println("client loaded")
psiClient.Destroy()
}
}