Document what actually happens to key material on drop

This commit is contained in:
raucao committed 2026-11-13 14:48:39 +04:00
1 parent f8249c89a1
commit 445346d57f
1 file changed
+6 -4
+6 -4
View File
@@ -40,10 +40,12 @@ data/ desktop, metainfo, gschema, icons, resources (ui/*.blp, sty
requesting apps see, and it can be rotated without touching the identity key.
- Both are individual keyring items with attributes
`application=org.kosmos.raucao.Regent` and `kind=user|device`.
- **Never write the `nsec` to a file**, log it, or put it in argv/env. In-memory
copies are wrapped in `zeroize::Zeroizing`; note that `Keys`/`SecretKey`
zeroize on drop only if secp256k1 was built with `zeroize` (verify before
claiming it).
- **Never write the `nsec` to a file**, log it, or put it in argv/env. The
plaintext strings we handle are wrapped in `zeroize::Zeroizing`. Verified: on
drop, `nostr::SecretKey` calls secp256k1's `non_secure_erase()`, which is a
volatile overwrite — *not* a guarantee (hence the name; copies can survive in
registers or on the stack, and there is no `ZeroizeOnDrop` contract). Treat
in-memory exposure as a real risk and keep the window small.
- Everything async goes through `runtime::spawn`, which runs the future on tokio
and applies the result on the main loop. GTK objects are not `Send`, so a
closure passed to `MainContext::invoke` cannot capture widgets — that is why