Skip to main content

securedrop_protocol_minimal/
lib.rs

1#![no_std]
2// Deny direct access to system randomness except in tests.
3// See clippy.toml
4// hax breaks on these clippy statements
5#![cfg_attr(not(hax), deny(clippy::disallowed_types, clippy::disallowed_methods))]
6#![cfg_attr(all(not(hax), test), allow(clippy::disallowed_types))]
7#![cfg_attr(all(not(hax), test), allow(clippy::disallowed_methods))]
8extern crate alloc;
9
10pub mod api;
11pub mod keys;
12pub(crate) mod primitives;
13pub mod schemes;
14pub mod server;
15mod traits;
16pub mod wire;
17
18pub mod client;
19pub mod journalist;
20pub mod source;
21
22pub use schemes::{challenge, message, metadata, sign};
23
24pub use client::plaintext::Plaintext;
25pub use wire::core::{Envelope, FetchResponse};
26
27pub use keys::{DhFetchKeyPair, KeyBundlePublic, KeyPair, SessionStorage};
28pub use wire::bundle::{SignedKeyBundlePublic, SignedLongtermKeyBundle};
29pub use wire::enrollment::Enrollment;
30
31pub use primitives::ristretto255::DHPublicKey;
32
33pub use traits::{Enrollable, JournalistPublic, UserPublic, UserSecret};
34
35pub use journalist::{
36    EphemeralBundleBytes, Journalist, JournalistLongTermBytes, JournalistPublicView,
37};
38pub use source::{Source, SourcePublicView};
39
40pub(crate) use keys::MessageKeyBundle;
41
42// Primitives for signing
43pub use sign::{
44    DomainTag, FpfOnNewsroom, JournalistEphemeralKey, JournalistLongTermKey, NewsroomOnJournalist,
45    Signature, SigningKey, VerifyingKey,
46};
47
48// Do not make this module public or re-export it anywhere!
49/// It uses the [sealed trait pattern](https://rust-lang.github.io/api-guidelines/future-proofing.html#c-sealed)
50/// to gate features that downstream crates should not implement.
51mod sealed;