[][src]Enum dup_crypto::private_message::AuthenticationPolicy

pub enum AuthenticationPolicy {
    PrivateAuthentication,
    Signature,
}

Authentication policy.

Warning: Take the time to study which is the authentication policy adapted to your specific use case. Choosing an unsuitable authentication policy can be dramatic for your end users.

Variants

PrivateAuthentication

Only the sender and the recipient have proof that the message was written by one of them. The recipient knows that he is not the author of the message so he has proof that the message was necessarily written by the sender. If your use case is the encrypted correspondence between machines in a decentralized network, and you sometimes need to prove that a machine has sent this or that message (to prove for example that it has not honored a commitment), then choose policy Signature instead.

Signature

The sender proves that he is the author of the message. If the message is publicly disclosed, everyone will have proof that the sender is indeed the one who wrote the message. In certain uses this can be harmful to the sender: in case of conflict with the recipient, the latter may threaten to disclose their private correspondence to blackmail the sender. If your use case is private messaging between humans, choose method PrivateAuthentication instead.

Trait Implementations

impl Clone for AuthenticationPolicy[src]

impl Copy for AuthenticationPolicy[src]

impl Debug for AuthenticationPolicy[src]

impl From<u8> for AuthenticationPolicy[src]

impl Into<u8> for AuthenticationPolicy[src]

Auto Trait Implementations

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> 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.