Damus
SkyLords · 3d
Thanks for the suggestions. I have already managed to boot SkySigner USB OS but it shuts down shortly after starting. I have been trying to figure out whether the problem comes from the boot process o...
Zhash profile picture
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.
1❤️1
SkyLords · 3d
That actually makes a lot of sense. I have been trying to figure out how to keep SkySigner USB OS running after the USB drive is removed while making sure the vault becomes inaccessible. Separating the OS from the signer process might make this much simpler. The idea of using udev to detect removal...