examples

command
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

examples

The standard match operation involves a sender and a receiver. The sender performs an intersection match with a receiver, such that the receiver learns the result of the intersection, and the sender learns nothing. Protocols such as PSI allow the sender and receiver to protect, to varying degrees of security guarantees and without a trusted third-party, private data records that are used as inputs in performing the intersection match.

The examples support kkrt, dhpsi, npsi and bpsi: the protocol can be selected with the -proto argument. Note that npsi is the default.

1. generate some data

go run generate.go

This will create two files, sender-ids.txt and receiver-ids.txt with 100 IDs in common between them. You can confirm the commonality by running:

comm -12 <(sort sender-ids.txt) <(sort receiver-ids.txt) | wc -l

2. run the receiver

go run receiver/main.go

The receiver will learn of the intersection between sender-ids.txt and receiver-ids.txt and write the results to common-ids.txt

3. start a sender

go run sender/main.go

The sender sends the contents of sender-ids.txt to the receiver but learns nothing.

4. verify the intersection

comm -12 <(sort receiver-ids.txt) <(sort common-ids.txt) | wc -l
comm -12 <(sort sender-ids.txt) <(sort common-ids.txt) | wc -l

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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