Struct fuzzytags::RootSecret[][src]

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

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

Implementations

impl<const GAMMA: u8> RootSecret<{ GAMMA }>[src]

pub fn generate() -> RootSecret<{ GAMMA }>[src]

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};
    let secret = RootSecret::<24>::generate();

pub fn extract_detection_key(&self, n: usize) -> DetectionKey<{ GAMMA }>[src]

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};
    let secret = RootSecret::<24>::generate();
    let detection_key = secret.extract_detection_key(2);

pub fn tagging_key(&self) -> TaggingKey<{ GAMMA }>[src]

derive the tagging key for this secret Example:

    use fuzzytags::RootSecret;
    let secret = RootSecret::<24>::generate();
    let tagging_key = secret.tagging_key();

Trait Implementations

impl<'de, const GAMMA: u8> Deserialize<'de> for RootSecret<GAMMA>[src]

impl<const GAMMA: u8> Serialize for RootSecret<GAMMA>[src]

Auto Trait Implementations

impl<const GAMMA: u8> RefUnwindSafe for RootSecret<GAMMA>[src]

impl<const GAMMA: u8> Send for RootSecret<GAMMA>[src]

impl<const GAMMA: u8> Sync for RootSecret<GAMMA>[src]

impl<const GAMMA: u8> Unpin for RootSecret<GAMMA>[src]

impl<const GAMMA: u8> UnwindSafe for RootSecret<GAMMA>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,