Join Nostr
2026-10-22 15:21:48 UTC
in reply to

zhashtoshi_ on Nostr: The hot-plug part gets easier if you don't try to survive it: treat removal as "lock ...

The hot-plug part gets easier if you don't try to survive it: treat removal as "lock now".

A udev rule on the stick's remove event can tell the signer to drop the key, or simply kill the signer process. Killing it is the more reliable option: in most languages you can't be sure every copy of the key in memory got wiped, but a process that exits takes its memory with it.

On reinsert, start fresh and locked: mount, read the ncryptsec, ask for the password again. No state to resume, nothing to get wrong. Clients reconnect over NIP-46 on their own anyway.