pir

package
v0.0.0-...-57ac6aa Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: BSD-2-Clause Imports: 3 Imported by: 0

README

PIR Server Library and Bindings

This code represents a Go language binding for a PIR server.

Benchmarks of PIR performance can be gathered using the test harness, which is parameterized using environmental variables.

An example benchmark might look like

PIR_SOCKET=../pird/pir.socket PIR_CELL_LENGTH=2048 PIR_CELL_COUNT=262144 PIR_BATCH_SIZE=8 go test -run x -bench .

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	DB []byte
	// contains filtered or unexported fields
}

DB is a memory area for PIR computations shared with a PIR daemon.

func (*DB) Free

func (db *DB) Free() error

Free releases memory for a DB instance

type Server

type Server struct {
	CellLength int
	CellCount  int
	BatchSize  int
	DB         *DB
	// contains filtered or unexported fields
}

Server is a connection and state for a running PIR Server.

func NewServer

func NewServer(backing string) (*Server, error)

NewServer creates a Server for communication

func (*Server) Configure

func (s *Server) Configure(celllength int, cellcount int, batchsize int) error

Configure sets the size of the DB and operational parameters.

func (*Server) Disconnect

func (s *Server) Disconnect() error

Disconnect closes a Server connection

func (*Server) GetDB

func (s *Server) GetDB() (*DB, error)

GetDB provides direct access to the DB of the Server.

func (*Server) Read

func (s *Server) Read(masks []byte, responseChan chan []byte) error

Read makes a PIR request against the server.

func (*Server) SetDB

func (s *Server) SetDB(db *DB) error

SetDB updates the PIR Server Database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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