Enum sequoia_openpgp::cert::prelude::CipherSuite[][src]

pub enum CipherSuite {
    Cv25519,
    RSA3k,
    P256,
    P384,
    P521,
    RSA2k,
    RSA4k,
}
Expand description

Groups symmetric and asymmetric algorithms.

This is used to select a suite of ciphers.

Examples

use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::types::PublicKeyAlgorithm;

let (ecc, _) =
    CertBuilder::general_purpose(None, Some("alice@example.org"))
        .set_cipher_suite(CipherSuite::Cv25519)
        .generate()?;
assert_eq!(ecc.primary_key().pk_algo(), PublicKeyAlgorithm::EdDSA);

let (rsa, _) =
    CertBuilder::general_purpose(None, Some("alice@example.org"))
        .set_cipher_suite(CipherSuite::RSA4k)
        .generate()?;
assert_eq!(rsa.primary_key().pk_algo(), PublicKeyAlgorithm::RSAEncryptSign);

Variants

Cv25519

EdDSA and ECDH over Curve25519 with SHA512 and AES256

RSA3k

3072 bit RSA with SHA512 and AES256

P256

EdDSA and ECDH over NIST P-256 with SHA256 and AES256

P384

EdDSA and ECDH over NIST P-384 with SHA384 and AES256

P521

EdDSA and ECDH over NIST P-521 with SHA512 and AES256

RSA2k

2048 bit RSA with SHA512 and AES256

RSA4k

4096 bit RSA with SHA512 and AES256

Implementations

Returns whether the currently selected cryptographic backend supports the encryption and signing algorithms that the cipher suite selects.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

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

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.