psi

package
v0.0.0-...-ebe581b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VLPSI

type VLPSI interface {
	// EncryptSampleIDSet to encrypt local IDs
	EncryptSampleIDSet() ([]byte, error)

	// SetReEncryptIDSet sets re-encrypted IDs from other party,
	// and tries to calculate final re-encrypted IDs
	// returns True if calculation is Done, otherwise False if still waiting for others' parts
	// returns Error if any mistake happens
	SetReEncryptIDSet(party string, reEncIDs []byte) (bool, error)

	// ReEncryptIDSet to encrypt encrypted IDs for other party
	ReEncryptIDSet(party string, encIDs []byte) ([]byte, error)

	// SetOtherReEncryptIDSet sets final re-encrypted IDs of other party
	SetOtherFinalReEncryptIDSet(party string, reEncIDs []byte) error

	// IntersectParts tries to calculate intersection with all parties samples
	// returns True with final result if calculation is Done, otherwise False if still waiting for others' samples
	// returns Error if any mistake happens
	// You'd better call it when SetReEncryptIDSet returns Done or SetOtherFinalReEncryptIDSet finishes
	IntersectParts() (bool, [][]string, []string, error)
}

VLPSI psi for vertical learning initialized at the beginning of training by Learner as well as prediction by Model see vl_common.psi for more

func NewVLPSIByPairs

func NewVLPSIByPairs(name string, samplesFile []byte, samplesIdName string, parties []string) (VLPSI, error)

NewVLPSIByPairs create a VLPSI instance and initiate it, calculating intersections of multiple nodes by pairs. name is to name the PSI instance parties are names of other parties who participate MPC sampleFile is csv file content subjected to specified form sampleIdName is used to extract IDs

func NewVLTwoPartsPSI

func NewVLTwoPartsPSI(name string, samplesFile []byte, samplesIdName string, parties []string) (VLPSI, error)

NewVLTwoPartsPSI create a VLPSI instance and initiate it name is to name the PSI instance parties are names of other parties who participate MPC sampleFile is csv file content subjected to specified form sampleIdName is used to extract IDs

Jump to

Keyboard shortcuts

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