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;
11mod ciphertext;
12pub mod keys;
13pub mod primitives;
14pub mod server;
15pub mod setup;
16mod traits;
17pub mod wire;
18
19pub mod journalist;
20pub mod source;
21
22pub use ciphertext::{Envelope, FetchResponse, Plaintext};
23
24pub use keys::{
25    DhFetchKeyPair, Enrollment, KeyBundlePublic, KeyPair, SessionStorage, SignedKeyBundlePublic,
26    SignedLongtermKeyBundle,
27};
28
29pub use primitives::ristretto255::DHPublicKey;
30
31pub use traits::{Enrollable, JournalistPublic, UserPublic, UserSecret};
32
33pub use journalist::{
34    EphemeralBundleBytes, Journalist, JournalistLongTermBytes, JournalistPublicView,
35};
36pub use source::{Source, SourcePublicView};
37
38pub(crate) use keys::MessageKeyBundle;
39
40// Primitives for signing
41pub mod sign;
42pub use sign::{
43    DomainTag, FpfOnNewsroom, JournalistEphemeralKey, JournalistLongTermKey, NewsroomOnJournalist,
44    Signature, SigningKey, VerifyingKey,
45};
46
47pub mod storage;
48
49pub mod encrypt_decrypt;
50pub mod message;
51pub mod metadata;
52
53// Do not make this module public or re-export it anywhere!
54/// It uses the [sealed trait pattern](https://rust-lang.github.io/api-guidelines/future-proofing.html#c-sealed)
55/// to gate features that downstream crates should not implement.
56mod sealed;