go/

directory
v2.0.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: Apache-2.0

README

Private Set Intersection - Go Go Report Card

Private Set Intersection protocol based on ECDH, Bloom Filters, and Golomb Compressed Sets.

PSI client Documentation

import "github.com/openmined/psi/client"

PSI server Documentation

import "github.com/openmined/psi/server"

Tests

bazel test -c opt --test_output=all //private_set_intersection/go/...

Benchmarks

bazel test -c opt --test_output=all --test_arg=-test.bench=. //private_set_intersection/go/...

Integration

  • 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()
    }
}

Directories

Path Synopsis
Package client for the client-side of the Private Set Intersection protocol.
Package client for the client-side of the Private Set Intersection protocol.
Package server for the server-side of the Private Set Intersection protocol.
Package server for the server-side of the Private Set Intersection protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL