Documentation ¶
Overview ¶
Gophers are fuzzy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetectionKey ¶
type DetectionKey struct {
// contains filtered or unexported fields
}
DetectionKey is given to the adversarial mailbox to test inbound messages for a given recipient. Detection keys have an inherent false positive rate set at construction.
func (*DetectionKey) Test ¶
func (dk *DetectionKey) Test(f *Flag) bool
Test returns true if the given flag matches the detection key.
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey is the public key that will be used to send messages to the recipient.
func (*PublicKey) GenerateFlag ¶
GenerateFlag creates a randomized flag ciphertext for the given public key.
type SecretKey ¶
type SecretKey struct {
// contains filtered or unexported fields
}
SecretKey is the secret key held by the ultimate recipient of the messages. It is used to derive public keys and detection keys for distribution. Internally, it's a vector of Ristretto255 scalars (the detection key) and Ristretto255 elements (the public key).
func NewSecretKey ¶
NewSecretKey constructs a secret key with a maximum false positive rate of 2^-gamma.
func (*SecretKey) ExtractDetectionKey ¶
func (sk *SecretKey) ExtractDetectionKey(n int) *DetectionKey
ExtractDetectionKey produces a detection key with false positive rate 0 <= 2^-n <= 2^-gamma. Internally, it's a copy of the first n scalars in the secret key.