protocol

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptAssignmentData

func DecryptAssignmentData(dlocCiphertexts [][]byte, encryptedAssignmentData []encryption.GCMCiphertext, dlocPrivateKey *rsa.PrivateKey) ([]types.AssignmentData, error)

DecryptAssignmentData decrypts a list of encrypted assignment data. It does this by finding a common k value amongst matched dlocData and attempting to decrypt encrypted assignment keys with this k. It then uses the decrypted assignment keys to decrypt all assignment data.

func DecryptEntryData

func DecryptEntryData(locCiphertexts [][]byte, encryptedEntryData []encryption.GCMCiphertext, locPrivateKey *rsa.PrivateKey) ([]types.EntryData, error)

DecryptEntryData decrypts a list of encrypted entry data. It does this by finding a common k value amongst matched locData and attempting to decrypt encrypted entry keys with this k. It then uses the decrypted entry keys to decrypt all entry data.

Types

type Matchable

type Matchable interface {
	Pi() []byte
	UserID() []byte
}

type PiMatch

type PiMatch struct {
	SharedPiValue  []byte
	MatchedEntries []Matchable
}

func FindMatches

func FindMatches(entries []Matchable) ([]PiMatch, error)

FindMatches returns a list of Pi matches. A match is defined as >= 2 entries sharing the same pi value, but different user IDs. The returned list is nil if no matches were found.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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