samuel-lucas6 / Geralt

A modern cryptographic library for .NET 8+ based on libsodium and inspired by Monocypher.
https://www.geralt.xyz/
MIT License
48 stars 3 forks source link

Salt in KDF #9

Closed shipitfaster closed 1 year ago

shipitfaster commented 1 year ago

I hope it's OK to ask questions here. Thanks again for your help in previous threads. I have gone through the flow you outline here for my purposes of creating messages for a specific wallet owner. I'm wondering if it makes sense to prepend the salt for the KDF (Blake2) to the message since it's not known by the receiving party prior. For personalization, I was thinking of keeping blank as I don't think there is much benefit.

Given the need to include the salt in the messages, I'm wondering if this is the correct flow for my use case which is to encrypt a message, write to a block, and then notify the wallet owner that there is a message for their consumption.

If you'd prefer to discuss elsewhere, please let me know! Appreciate the discussion.