You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cyphr just wraps sodium and openssl. With the former we can have deterministic encryption for symmetric keys if you pass the nonce argument through with suitable random data. I don't think we can do this with public/private key-based methods though.
If this is important to you, then I'd be happy to review a PR that added it as an option that was fairly insensitive to the backend, but also reasonably secure by default.
I presume this is something where you want to hash the encrypted results to see if they're different or not? This is something we did briefly consider a few years ago. If you have a different use case I'd also be curious what it is.
Thanks. Yes, I wanted to encrypt a file and not change the file if the plaintext is unchanged.
If stability is hard, perhaps cyphr could offer a helper that safely decrypts to check plaintext equality before overwriting an existing file? This should be optional to avoid wasting cycles if the user knows that the plaintext is likely to have changed. For my use case, I already hand-rolled it.
Thank you for this package!
With the "data encryption" workflow in https://docs.ropensci.org/cyphr/articles/data.html, is there a way to ensure deterministic encryption (i.e., same input leads to same output)? Currently:
Created on 2024-01-18 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: