Comment by RomanPushkin
1 year ago
That's pretty cool and this is exactly why I am here :) To have this kind of advice. I'll implement these changes as soon as I can.
1 year ago
That's pretty cool and this is exactly why I am here :) To have this kind of advice. I'll implement these changes as soon as I can.
You will still need to get the nonce and key generation right, but I'd recommend using Golang's nacl/secretbox [0] for a project such as this. It's designed to be relatively misuse-resistant compared to using underlying primitives directly, and under the hood it's XSalsa20+Poly1305 - so you can use random nonces with negligible collision risk.
[0]: https://pkg.go.dev/golang.org/x/crypto/nacl/secretbox
This is such a healthy interaction, it makes me so happy to see people lifting each other up like this
Love to see things like this on HN.