just added in the recovery phrase, and also just embedded the stash id into the recovery phrase so the user never has to like interact with the stash id, only the recovery phrase.
.
also i just realized i never actually explained how the encryption system works for the app so like heres the explanation ig.
.
.
the core idea is that when you create a stash, your device generates a random 256-bit key that’s your stash key, and it never leaves your device in plaintext. everything else is derived from it. your auth key, your metadata encryption key, your file encryption key, all of them are derived from the stash key using HKDF, so the server never sees any of it, just encrypted blobs.
.
.
auth works via challenge-response. when you load the app, your device asks the server for a random nonce, signs it with your auth key (which the server knows a verifier for but not the key itself), and sends it back. if it checks out, you get a session token. this is how i mange auth without an account system.
.
.
the recovery phrase is a 12-word BIP39 mnemonic derived from the first 16 bytes of the stash key. when you create a stash, the app wraps your stash key using a key derived from that phrase using PBKDF2, and stores the encrypted blob server-side. to recover on a new device, you enter the phrase, the app re-derives the wrapping key, decrypts the blob, and you’re back in. the stash ID is also embedded in the recovery lookup so you never have to know or type it because the phrase is the only thing that matters.
.
.
anyway that was a pretty long explanation, but now that the main landing page ui + api is done, now i just need to make like the actual browser page and there ill probably have like a button to view all connected devices, send the access codes, and obv, upload/download/view files.
.
.
okie bye!