Documentation ¶
Index ¶
- Constants
- type AssignmentData
- type CallistoTuple
- func (c CallistoTuple) DLOCCiphertext() []byte
- func (c CallistoTuple) EncryptedAssignmentData() encryption.GCMCiphertext
- func (c CallistoTuple) EncryptedEntryData() encryption.GCMCiphertext
- func (c CallistoTuple) EncryptedEntryDataKeyUnderUserKey() encryption.GCMCiphertext
- func (c CallistoTuple) LOCCiphertext() []byte
- func (c CallistoTuple) Pi() []byte
- func (c CallistoTuple) UserID() []byte
- type EntryData
- type LOCData
- type LOCDataMsgPack
- type LOCType
Constants ¶
const OPRF_CIPHERSUITE string = "OPRF-P521-HKDF-SHA512-SSWU-RO"
The ciphersuite used for the OPRF protocol
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignmentData ¶
type AssignmentData struct { VictimStateOfCurrentResidence string CategorizationOfSexualMisconduct string IndustryOfPerpetrator string }
AssignmentData encapsulates the necessary information for DLOCs to assign matched users to LOCs. AssignmentData is onnly meant to be viewed by DLOCs.
type CallistoTuple ¶
type CallistoTuple struct {
// contains filtered or unexported fields
}
CallistoTuple represents the 6-tuple record sent by Callisto clients and received by Callisto servers
func NewCallistoTuple ¶
func NewCallistoTuple( userId, pi, locCiphertext, dlocCiphertext []byte, encryptedEntryDataKeyUnderUserKey, encryptedEntryData, encryptedAssignmentData encryption.GCMCiphertext) (CallistoTuple, error)
NewCallistoTuple constructs a valid CallistoTuple. Returns a non-nil error if provided input is invalid.
func (CallistoTuple) DLOCCiphertext ¶
func (c CallistoTuple) DLOCCiphertext() []byte
DLOCCiphertext returns the ciphertext to be decrypted by a DLOC
func (CallistoTuple) EncryptedAssignmentData ¶
func (c CallistoTuple) EncryptedAssignmentData() encryption.GCMCiphertext
EncryptedAssignmentData returns the encrypted assignment data under k_a
func (CallistoTuple) EncryptedEntryData ¶
func (c CallistoTuple) EncryptedEntryData() encryption.GCMCiphertext
EncryptedEntryData returns the encrypted entry data under k_e
func (CallistoTuple) EncryptedEntryDataKeyUnderUserKey ¶
func (c CallistoTuple) EncryptedEntryDataKeyUnderUserKey() encryption.GCMCiphertext
EncryptedEntryDataKeyUnderUserKey returns the ciphertext protecting the random entry data key created for encrypting entry data. It can only be decrypted with the user's key.
func (CallistoTuple) LOCCiphertext ¶
func (c CallistoTuple) LOCCiphertext() []byte
LOCCiphertext returns the ciphertext to be decrypted by a LOC
func (CallistoTuple) Pi ¶
func (c CallistoTuple) Pi() []byte
Pi returns the pi value derived from P-Hat. Enables a Callisto server to find perpetrator matches between clients.
func (CallistoTuple) UserID ¶
func (c CallistoTuple) UserID() []byte
UserID returns the userID of this tuple's submitter
type EntryData ¶
type EntryData struct { PerpetratorName string PerpetratorTwitterUserName string VictimName string VictimPhoneNumber string VictimEmail string }
EntryData encapsulates information about the perpetrator and the victim. EntryData is only meant to be viewed by LOCs.
type LOCData ¶
type LOCData struct {
// contains filtered or unexported fields
}
LOCData encapsulates the 3-tuple plaintext that is encrypted for LOCs
func FromLOCDataMsgPack ¶
func FromLOCDataMsgPack(msgPackEncodedData LOCDataMsgPack) (LOCData, error)
FromLOCDataMsgPack converts LOCData that is message-pack encoded into a LOCData struct
func NewLOCData ¶
func NewLOCData(locType LOCType, shamirShare *shamir.ShamirShare, encryptedKey encryption.GCMCiphertext) (LOCData, error)
NewLOCData constructs a valid LOCData. Returns a non-nil error if provided input is invalid.
func (LOCData) EncryptedKey ¶
func (d LOCData) EncryptedKey() encryption.GCMCiphertext
EncryptedKey returns the encrypted entry or assignment key. If LocType() is Director, then the encrypted assignment key is returned. If LocType() is Counselor, then the encrypted entry key is returned.
func (LOCData) GetShamirShare ¶
func (d LOCData) GetShamirShare() *shamir.ShamirShare
GetShamirShare returns the (U, s) shamir share contained within LOCData
func (LOCData) LocType ¶
LocType returns either Director or Counselor. The result depends on the intended recipent of this data
func (LOCData) ToLOCDataMsgPack ¶
func (d LOCData) ToLOCDataMsgPack() LOCDataMsgPack
ToLOCDataMsgPack converts LOCData into a struct that can be MessagePack encoded
type LOCDataMsgPack ¶
type LOCDataMsgPack struct { LocType LOCType U []byte S []byte EncryptedKey encryption.GCMCiphertext }
LOCDataMsgPack encapsulates the same information as LOCData but is used for MessagePack encoding purposes