Skip to main content

Module securitykey

Module securitykey 

Source
Expand description

Your security key behind the window (docs/client.md, “Your keys on a security key”): the band of the writing window and of the Reader (plug the key in, its PIN, a touch, what went wrong, in words), signing at Send before the ten seconds of “Undo”, opening a message on “Open with your security key”, the PIN held in memory for fifteen quiet minutes, the key’s setup in Accounts ▸ Encryption, and “Let GnuPG release it”; GnuPG’s own steps as buttons there (“Import from GnuPG”, “Renew for two years”) and “Send it to keys.openpgp.org”, each run on its press only, its command kept under “By hand” to copy.

Nothing here touches the key unless you asked: a message shown is never opened with it, and no lookup runs by itself. A demo profile never reaches the system’s smart card service: it has a key of its own, made of software, whose PIN is 123456.

Structs§

Band 🔒
What the band of a writing window, of the Reader or of the setup shows, as JSON.
Demo 🔒
The demo’s security key: software behind the same traits, its PIN 123456, a touch asked to sign; its certificate names the profile’s first address.
Kept 🔒
What keeping a certificate says, and what it offers.
KnownView 🔒
One known security key, as Accounts ▸ Encryption lists it.

Constants§

LOOK_EVERY 🔒
How often Sioul looks whether a key it waits for came, or whether the key whose PIN it holds went.
SETUP_BAND 🔒
The band of the setup, in Accounts ▸ Encryption.
WAIT_AT_MOST 🔒
How long a band waits for its key before it stops looking.

Statics§

PIN 🔒
The PIN, held in memory for fifteen quiet minutes after its last use.
SETUP 🔒
What the setup read from the key, for “Look for it” and “Import a file…”.
WAITING 🔒
The bands waiting for the key to be plugged in, by their context, until “Not now”.
WATCHING 🔒
Whether the watch over the held PIN runs.
WINDOW 🔒
The window, told when the PIN is held or forgotten: Accounts offers “Forget the PIN now” then.

Functions§

adopt 🔒
The certificate found is the key’s: kept, the key made yours for the addresses it names among yours, and said.
as_info 🔒
What Sioul kept of a key, as the key would say it (fingerprints, no public parts).
ask_pin 🔒
The band asks for the PIN, with the tries left when fewer than the most seen.
card_for_lookup 🔒
The key to look up a certificate for: the one the setup read, else a key known already (“Look for a newer version”), from what Sioul kept of it.
closing 🔒
Sioul closes: the PIN and the session keys go with it.
demo 🔒
describe 🔒
“YubiKey 12 345 678, Noa Ferrand. It signs (Ed25519, made on 3 March 2026) and decrypts (Curve25519).”
expired_line 🔒
What the writing window says when the security key that signs for address has an expired certificate: the date, and how to renew it.
failed 🔒
What a failure does to the band, and to a PIN held that the key refused. A key not plugged in is waited for instead (wait_for).
fingerprint_of 🔒
The fingerprint gpg --export takes for the key: its signing key’s, else its decryption key’s.
for_draft 🔒
The security key that signs a draft at Send, as JSON {ident, label}; or {expired: …} when its certificate expired; “” when the draft is signed another way, or not at all.
forget_pin 🔒
“Forget the PIN now”.
gnupg 🔒
GnuPG here, or why not; in a demo, none: the demo’s key stands in.
gnupg_sentence 🔒
What GnuPG did not do, in words, and what to do then.
holder_name 🔒
The cardholder’s name as written on the key (“Ferrand<<Noa”, ISO/IEC 7501-1), in the usual order (“Noa Ferrand”).
host_of 🔒
keys.openpgp.org from https://keys.openpgp.org/vks/v1/….
import_certificate 🔒
“Import a file…”: the key’s certificate from gpg --export, checked, kept.
import_from_gnupg 🔒
“Import from GnuPG”: the key’s certificate as your GnuPG keeps it (gpg --export --armor), checked against the key, kept. A demo profile takes its own key’s certificate, as if GnuPG had it.
keep 🔒
The certificate kept for the key, the key made yours for the addresses it names among yours: what to say, and whether warmly.
keep_taken 🔒
A PIN the key took before something else failed (a touch missed, the key pulled out): held, so that “Try again” does not ask it again.
key_in 🔒
The key ident as it says itself (“”: the first one), read without its PIN.
keys_changed 🔒
Tells the window the keys’ state changed: the PIN held, or forgotten.
know_window 🔒
Remembers the window, to tell it when the PIN is held or forgotten.
known_view 🔒
Your security keys, as JSON {cards: […]}, for Accounts ▸ Encryption.
look_for_certificate 🔒
“Look for it”, “Look for a newer version”: the key’s certificate looked up, only now that you asked, checked against the key, and kept.
not_now 🔒
“Not now”: the band stops waiting for the key.
now_unix 🔒
open_message 🔒
Opens a message encrypted to your security key (“Open with your security key”); its session key then stays in memory until Sioul closes, so that it opens again, with its attachments and its answer, without the key.
open_now 🔒
pin_for 🔒
The PIN to use: the one typed, else the one held (not for a key that asks it for each signature, decision 5); with what the key says, read without its PIN. None as the PIN: the band asks for it.
problem_line 🔒
read_for_setup 🔒
“Use a security key”: reads the key plugged in, without its PIN.
readers 🔒
Where security keys are: the system’s smart card service; in a demo, the demo’s own key, never a real one.
release 🔒
“Let GnuPG release it”, pressed: GnuPG’s smart card daemon stopped. Returns JSON {line, done}: done, the band tries again at once.
remember 🔒
The PIN worked: held for its quiet time, watched; what the key said, kept.
renew 🔒
“Renew for two years”: GnuPG renews the key, then its subkeys (gpg --quick-set-expire, its own pinentry asking the security key’s PIN, and a touch); the certificate it then holds is checked and kept here.
renew_line 🔒
What the setup says while GnuPG renews the key: its pinentry open, the PIN typed there (then a touch, when the key may ask for one); the key’s turn, to touch it now and hold the finger a second or two, as long as GnuPG works (Touch::words); else that GnuPG renews it.
renewable 🔒
Whether GnuPG is here to renew a key: never on a phone, in a Flatpak, or a demo. Whether it holds the key is asked only on “Renew for two years”: GnuPG is never run behind your back, nor the security key woken for it.
send_to_keys_openpgp 🔒
“Send it to keys.openpgp.org”, pressed after the sentence that says what goes public: the certificate Sioul keeps for the key, its public part only, sent; keys.openpgp.org then mails each address it names a link. A demo profile sends nothing, and says what would come.
setup_problem 🔒
What the setup’s band says when the key could not be read: a key another program holds offers “Let GnuPG release it”, never a dead end; one not plugged in, “Try again”.
sign_and_send 🔒
Signs a draft with your security key at Send, then schedules it with its ten seconds of “Undo”; typed is the PIN typed in the band, else “”.
sign_now 🔒
stop_using 🔒
“Stop using this security key”: it leaves Sioul’s list, its certificate is kept aside; the PIN held, if it was its, is forgotten.
tell_band 🔒
touch_line 🔒
What the band says when the key’s slot may wait for a touch, its setting read from the key this session (Touch::words): “If your key asks for a touch…” when it could not be read.
wait_for 🔒
The key is not plugged in: the band says so, and Sioul looks, without opening any key, until it comes, “Not now”, or a few minutes pass.
watch_pin 🔒
While a PIN is held: forgotten when its quiet time ends, or when its key is pulled out (its reader gone).
working 🔒
your_addresses 🔒
Your mail addresses.