Struct fuzzytags::RootSecret[][src]

pub struct RootSecret<const GAMMA: u8> { /* fields omitted */ }
Expand description

The complete secret. Can’t directly be used for testing. Instead you will need to generate a DetectionKey using extract_detection_key

Implementations

Generate a new Key Pair given a security parameter GAMMA. Tags generated for a given TaggingKey::generate_tag will pass the DetectionKey::test_tag for other tagging keys with probability $ 2 ^ -8 $ Example:

    use fuzzytags::{RootSecret};
    use rand::rngs::OsRng;
    let mut rng = OsRng;
    let secret = RootSecret::<24>::generate(&mut rng);

extract a detection key for a given false positive (p = 2^-n) This is the key that can be given to adversarail servers so that they can detected messages that may be tagged for a given detection key with an ideal false positive rate 2^{-n} Example:

    use fuzzytags::{RootSecret};
    use rand::rngs::OsRng;
    let mut rng = OsRng;
    let secret = RootSecret::<24>::generate(&mut rng);
    let detection_key = secret.extract_detection_key(2);

derive the tagging key for this secret Example:

    use fuzzytags::RootSecret;
    use rand::rngs::OsRng;
    let mut rng = OsRng;
    let secret = RootSecret::<24>::generate(&mut rng);
    let tagging_key = secret.tagging_key();

Trait Implementations

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.