Skip to main content

securedrop_protocol_minimal/
keys.rs

1mod newsroom;
2
3use crate::primitives::ristretto255::{DHPrivateKey, DHPublicKey};
4use crate::sign::{FpfOnNewsroom, Signature, VerifyingKey};
5
6pub mod bundle;
7pub mod fpf;
8
9pub use bundle::KeyBundlePublic;
10pub(crate) use bundle::{LongtermKeyBundle, MessageKeyBundle};
11pub use fpf::FPFKeyPair;
12
13/// Generic KeyPair
14pub struct KeyPair<SK, PK> {
15    pub(crate) sk: SK,
16    pub(crate) pk: PK,
17}
18
19// silly name but include "fetch" for disambiguation with dh-akem.
20// eventually: ristretto255
21pub type DhFetchKeyPair = KeyPair<DHPrivateKey, DHPublicKey>;
22
23// in memory session storage
24pub struct SessionStorage {
25    pub fpf_key: Option<VerifyingKey>,
26    pub nr_key: Option<VerifyingKey>,
27    pub fpf_signature: Option<Signature<FpfOnNewsroom>>,
28}
29
30pub use newsroom::NR_ID;
31pub use newsroom::NewsroomKeyPair;