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
It would prevent data leakage if it is possible to add padding to encrypted values. Especially when encrypting "enum" values. A good use case for padding is shown on the Lockbox README.
When pointed into the right direction, I can try to create a PR for this feature.
The text was updated successfully, but these errors were encountered:
The next step would be to extend the Cloak.Vault encrypt/decrypt functions to accept an opts argument, where opts[:padding] is the minimum number of bytes you want the ciphertext to be. When the function sees opts[:padding], it should use the Cloak.Padding module to pad the plaintext before encrypting it.
After that, we'd need to extend Cloak.Ecto.Type in the cloak_ecto library to accept a new :padding option in your type which it passes on to encrypt/decrypt, so that you could do this:
It would prevent data leakage if it is possible to add padding to encrypted values. Especially when encrypting "enum" values. A good use case for padding is shown on the Lockbox README.
When pointed into the right direction, I can try to create a PR for this feature.
The text was updated successfully, but these errors were encountered: