Skip to main content

Module crypto

Module crypto 

Source
Expand description

OpenPGP behind the window: protected messages opened for the reader, the keys Autocrypt brings, what a draft can be (signed, encrypted), and your keys: made, imported, exported, removed. Passphrases stay in the keyring; decrypted messages stay in memory.

Structs§

DraftProtection 🔒
What a draft can be, for the writing window’s switches.
KeysView 🔒

Functions§

draft_protection 🔒
export 🔒
Your public key into the downloads folder, to give to others.
generate 🔒
Makes a key for one of your addresses; its passphrase, random, goes to the keyring.
import 🔒
Imports the keys of a file (a file:// address); a secret key’s passphrase is checked, then kept in the keyring.
keys_view 🔒
Your keys and others’, and the addresses that could have one.
learn_autocrypt 🔒
Keeps the key a sender’s Autocrypt header carries, only when the sender’s domain vouches for the message (the Porch’s judgement): an unproven one could plant a key for someone you write to, and read your answers.
looks_protected 🔒
Whether a message might be protected: cheap, before any key is read.
lookup 🔒
Looks up the keys a draft’s recipients miss; returns what the status line says.
open 🔒
A protected message opened with your keys: what it reads once decrypted, and what was found; None when it is not protected. Your security key is never asked here: a message encrypted to it opens from its session key, kept since you opened it with the key, or waits for “Open with your security key”.
protect_answer 🔒
Answering an encrypted message: the copy kept with the draft is the decrypted one (in your drafts folder, as your own text is), and the answer is encrypted when every key is known.
readable 🔒
The message as it reads: decrypted when it was encrypted to you.