Skip to main content

Crate kernoid_e2e

Crate kernoid_e2e 

Source
Expand description

End-to-end encryption of kernoid’s apps (RFC 0006): an account’s OpenPGP key and the protected copies of its secret key (keys), encrypting and decrypting data (message), mail as PGP/MIME with header protection and the summary the apps show in lists (mime), and mail built and read in the client (compose). All of the cryptography is rpgp; nothing here is cryptography of its own.

Re-exports§

pub use keys::Kind;
pub use keys::PublicKey;
pub use keys::SecretKey;

Modules§

compose
Mail the apps write and read when kernoid must not see it (RFC 0006, 5.3–5.4): a message built from its parts – here, because the server builds it otherwise (JMAP Email/set) and must not see the text –, and an encrypted message’s inner message read into its parts for display, with mail-parser (never sent back to the server’s Email/parse). Building is plain RFC 5322 and MIME: header fields with RFC 2047 encoded words where they are not ASCII, file names after RFC 2231, every body in base64.
keys
An account’s key (RFC 0006, 4): made by the client, of one of two kinds; its secret key leaves the client only as a protected copy – the OpenPGP secret key protected with Argon2 and AEAD (RFC 9580, 3.7) under a passphrase: a passkey’s PRF output, a recovery code, a device’s own secret.
message
Encrypting data to keys and decrypting it (RFC 0006): OpenPGP messages, AEAD (SEIPDv2, AES-256-OCB) when every recipient’s key is v6, otherwise SEIPDv1 as v4 programs read it; signed with the sender’s key if one is given.
mime
Mail as PGP/MIME (RFC 3156) with header protection (RFC 9788), and the summary the apps show in lists (RFC 0006, 5.2). The whole original message becomes the cryptographic payload; its Content-Type gets protected-headers="v1", and the outer message keeps the header fields delivery, threads and sorting need – with the subject replaced by [...] and recorded in HP-Outer.

Enums§

Error
What can go wrong. Decryption failures are one Decrypt – which key or packet failed is not for the user.

Type Aliases§

Result