1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # Secure Frame (`SFrame`)
//! This library is an implementation of [SFrame (RFC 9605)](https://www.rfc-editor.org/rfc/rfc9605.html).
//!
//! # Optional features
//!
//! Using optional features `sframe` allows to configure different crypto libraries.
//! Be aware that those features are mutually exlusive, if multiple are configured `sframe` issues a compiler error.
//!
//! - **`ring`** *(enabled by default)* — Uses the [ring](https://crates.io/crates/ring) library which allows compilation to Wasm32.
//! AES-CTR mode ciphers are not supported.
//! - **`openssl`** — Uses the [rust-openssl](https://crates.io/crates/openssl) crate, which provides bindings to OpenSSL.
//! Per default the OpenSSL library is locally compiled and then statically linked. The build process requires a C compiler,
//! `perl` (and `perl-core`), and `make`. For further options see the [openssl crate documentation](https://docs.rs/openssl/0.10.55/openssl/).
//! Compilation to Wasm32 is not yet supported.
//! **Note:** This backend uses `unsafe` code for in-place encryption/decryption to avoid memory allocations.
//! - **`rust-crypto`** - Uses pure rust implementations of the [RustCrypto](https://github.com/RustCrypto) project. Compilation to Wasm32 is supported.
//!
//! If none of these features is enabled, only the generic crypto traits in [`crypto`] are exposed and a
//! custom crypto backend has to be provided by implementing [`crypto::AeadEncrypt`], [`crypto::AeadDecrypt`]
//! and [`crypto::KeyDerivation`], then parameterizing [`key::crypto_key::EncryptionKey`] /
//! [`key::crypto_key::DecryptionKey`] with those types. See the `caesar_cipher` example for a walkthrough.
/// Cryptographic primitives and traits for implementing custom crypto backends.
/// error definitions
/// Sframe header definitions as of [RFC 9605 4.3](https://www.rfc-editor.org/rfc/rfc9605.html#name-sframe-header)
/// sframe key definitions as of [RFC 9605 4.4.2](https://www.rfc-editor.org/rfc/rfc9605.html#section-4.4.2)
/// Sframe MLS definitions as of [RFC 9605 5.2](https://www.rfc-editor.org/rfc/rfc9605.html#name-mls)
/// Ratchet support as of [RFC 9605 5.1](https://www.rfc-editor.org/rfc/rfc9605.html#section-5.1)
pub use CipherSuite;