Replaced in-memory nonce/key store with persistent database version