server

package
v0.0.0-...-79e4f8a Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCNServer

type TCNServer struct {
	// contains filtered or unexported fields
}

TCNServer context for the server side of a TCN-Private Set Intersection-Cardinality protocol.

func CreateFromKey

func CreateFromKey(key []byte) (*TCNServer, error)

CreateFromKey creates and returns a new server instance with the provided private key.

Returns an error if any crypto operations fail.

func CreateWithNewKey

func CreateWithNewKey() (*TCNServer, error)

CreateWithNewKey creates and returns a new server instance with a fresh private key.

Returns an error if any crypto operations fail.

func (*TCNServer) CreateSetupMessage

func (s *TCNServer) CreateSetupMessage(fpr float64, inputCount int64, reports []*tcn.SignedReport) (string, error)

CreateSetupMessage creates a setup message from the server's dataset to be sent to the client.

Returns an error if the context is invalid or if the encryption fails.

func (*TCNServer) GetPrivateKeyBytes

func (s *TCNServer) GetPrivateKeyBytes() ([]byte, error)

GetPrivateKeyBytes returns this instance's private key. This key should only be used to create other server instances. DO NOT SEND THIS KEY TO ANY OTHER PARTY!

func (*TCNServer) ProcessRequest

func (s *TCNServer) ProcessRequest(request string) (string, error)

ProcessRequest processes a client query and returns the corresponding server response to be sent to the client.

Returns an error if the context is invalid.

func (*TCNServer) Version

func (s *TCNServer) Version() string

Version of the library.

Jump to

Keyboard shortcuts

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