"Master keys are kept in cold storage, and access is delegated through revokable homeserver sessions, minimizing exposure and maximizing security."
https://medium.com/pubky/pubky-the-next-web-3287b35408f1
Let's look at what the code actually does.
The master key (secretKey + mnemonic) correctly goes to the OS Keychain. That part is true.
But session tokens (the credentials that grant active access to your homeserver) tell a different story.
https://github.com/pubky/pubky-ring/blob/main/src/store/mmkv-storage.ts
line 4:
const storage = createMMKV();
No encryption key. Unencrypted storage.
https://github.com/pubky/pubky-ring/blob/main/src/store/index.ts
line 45:
whitelist: ['pubky', 'settings'],
The pubky slice (which contains your sessions) is persisted to that unencrypted MMKV store.
https://github.com/pubky/pubky-ring/blob/main/src/store/slices/pubkysSlice.ts
lines 73-84:
addSession: (state, action) => {
state.pubkys[pubky].sessions.push({
...session, created_at: Date.now()
});
}
session_secret pushed directly into the unencrypted Redux store.
Your master key is safe. Your session tokens (the active credentials that authenticate you to your homeserver) sit in plain unencrypted storage on your device.
The migration file makes it explicit — this isn't an oversight. Migration version 6 deliberately migrates session_secret into persisted storage:
https://github.com/pubky/pubky-ring/blob/main/src/store/migrations/index.ts
lines 81-90:
// Add session_secret to all existing sessions
sessions: pubky.sessions.map((session) => ({
...session,
session_secret: '',
}))
"Master keys are kept in cold storage, and access is delegated through revokable homeserver sessions, minimizing exposure and maximizing security." Right. Sure bitcoinerrorlog (npub13nd…0svh)
Nostr doesn't have a session token layer to compromise. Your key signs events directly, via NIP-07 extensions or NIP-46 bunkers (how you *should be* using nostr) that never expose it to apps at all. Pubky adds a session delegation layer to protect the master key (a reasonable idea) but then stored those session tokens unencrypted. The mitigation introduces the vulnerability.
