Hacker News new | ask | show | jobs
by nett_ef 147 days ago
Thanks!

I’m using Argon2id-Blake2b. There’s a flowchart here: https://github.com/theosaveliev/rtty-soda?tab=readme-ov-file...

And the relevant code is here: https://github.com/theosaveliev/rtty-soda/blob/main/src/rtty...

I made a couple of explicit assumptions to reduce UX friction, and I try to document and test them rather than hide them:

1. I’m aware that using size=PrivateKey.SIZE is not ideal, since that constant is shared between public and secret schemes. I rely on the fact that the sizes match in libsodium, and I enforce that assumption with tests so it fails loudly if that ever changes: https://github.com/theosaveliev/rtty-soda/blob/main/tests/te...

2. For the salt, I intentionally avoid asking the user for an additional input. Instead, I hash a fixed long quote from Henry Fielding together with the user password. The assumption is that combining a short password with a long, fixed string still provides sufficient entropy for the KDF input and forces an attacker to recompute rainbow tables with the quote included, rather than reuse generic ones.

These tradeoffs are deliberate. I’m open to critique, especially if there’s a way to improve this without increasing UX complexity.