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 ¶
CreateFromKey creates and returns a new server instance with the provided private key.
Returns an error if any crypto operations fail.
func CreateWithNewKey ¶
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 ¶
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 ¶
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.