Enum fcp_cryptoauth::authentication::Credentials [] [src]

pub enum Credentials {
    LoginPassword {
        login: Vec<u8>,
        password: Vec<u8>,
    },
    Password {
        password: Vec<u8>,
    },
    None,
}

Used for specifying authorization credentials of a peer, either oneself or an incoming peer.

Represents an authorization method and its data, as defined by https://github.com/fc00/spec/blob/10b349ab11/cryptoauth.md#authorization-challenges

Variants

This is the preferred credentials method, with a login and a password.

The login is used to tell the other party who we are, and the password is combined with cryptographic keys of the two peers to computed a shared secret, in order to provide a stronger authentication than just checking public keys.

The password is not revealed to someone who does not know it, even if they have the secret keys of both peers.

Fields of LoginPassword

The login used to tell who we are. Does not have to be a secret, but must be unique.

Seven bytes of its sha256 hash are sent unencrypted before authentication.

The password which will be combined with keys of other peers to prove who we are.

Password-only credentials. This method is not recommended and may be dropped in the future. See https://github.com/cjdelisle/cjdns/blob/cjdns-v18/util/version/Version.h#L357-L363 for details about why the LoginPassword method is prefered.

Fields of Password

The password used to tell who we are and prove it. It must be unique.

Seven bytes of its double-sha256 hash are sent unencrypted before authentication.

Pseudo-credentials used for when authorization is not needed. Do not use it for outgoing connections.

Trait Implementations

impl Clone for Credentials
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Credentials
[src]

Formats the value using the given formatter.

impl Hash for Credentials
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Eq for Credentials
[src]

impl PartialEq for Credentials
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl ToAuthChallenge for Credentials
[src]

Generates a byte array representation of the auth challenge, as defined by: https://github.com/cjdelisle/cjdns/blob/cjdns-v17.4/doc/Whitepaper.md#authentication-field