silverdr
I considered using Cloak and Cloak Ecto for encryption-at-rest but I noticed that both seem like abandonware these days. Moreover there are CVEs, one with severity rating high and unaddressed for almost a month now. Any suggestions for something well established and actively maintained instead?
Trending in Questions
Hi all,
I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
I’m very new to Elixir, so sorry if this is a silly question:
I am wondering what happens to the mailbox of a process when the machine i...
New
Hello everyone!
I am new to coding with Elixir/Erlang. And i am looking for some utilities for fuzzing testing like AFL++.
Does anyone ...
New
How do I tell Hologram not to escape HTML when substituting into templates?
{Textile.render(@product.long_description)}
escapes the HTM...
New
Background
When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error:
* assembling mark...
New
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New
Is there a way to import record definitions in the iex shell for pretty printing (similar to the rr command in the erl shell)? This woul...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
Hi everyone :waving_hand:
I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #elixirconf-us
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #security
- #elixirconf-eu
- #processes
- #api
- #forms
- #hex










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Schultzer
I would just hand-roll an ecto type and use Erlang crypto module.
A dependency seams pretty excessive for this, also consider just encrypting the database itself.
jsm
Seems like quite an exaggerated CVE to me. Block ciphers in counter mode are unauthenticated ciphers by definition; the CVE is basically saying “that bicycle only has two wheels, it’s dangerously unstable”. So just take the car then: Cloak natively supports authenticated ciphers like AES-GCM perfectly fine and you can configure it to use those trivially.
Additionally, Cloak offers features that are tricky to get right when rolling your own type, notably key rotation. It is a pity that the lib seems abandoned, but maybe I would prefer forking it (temporarily) over rolling my own. On the other hand, if you just need the basic functionality, it is very doable like @Schultzer says. Just my two cents
rachelwilson
if you do hand-roll it, id stick to the aead path in :crypto (aes_gcm) rather than plain ctr - the unauthenticated bit is basically the cve complaint
loics2
I wanted to maybe fork these libraries sometime soon or create a new compatible library. In addition to be abandonned, there are some painful things like the
Vaultconfiguration being a GenServer that doesn’t really make sens IMO, and the key rotation command is not made for production since it’s a mix task.Schultzer
Sure, but key rotation is not that hard again, if you’re a working professional you should be able to do this as you’ve very likely encountered data integrity and inconsistency issues before.
Anyway it looks like Ecto is going to have something builtin going forward, another options is to use the database to encrypt columns.
kevinschweikert
It’s merged! Add Ecto.Encrypted and Ecto.HMAC by josevalim · Pull Request #4814 · elixir-ecto/ecto · GitHub
silverdr
Yes, I’ve been considering this too (even initially included this idea when writing the post but then cut it out for brevity). This is of course an option, but – you know – with crypto stuff it’s always good to be able to point finger away from yourself in case :-)))
My concern is not so much about this particular CVE, which to my understanding can be easily mitigated with specific configuration. The concern is about the fact that it’s not being addressed at all for that long. Yes, it might be related, but this does not build confidence, does it?
Exactly what I meant a little above. I am sure I can do it. But in case…
Noticed that too and was actually scratching my head over it. I think I read something that explained why it is done this way, but can’t recall now.
Good to know! I’ll have an eye on Ecto updates then and see how this one fits. DB level encryption might be an option too, but I am usually reluctant to delegate things to DB without really cogent arguments.
Thanks to all who responded!
te_chris
I’ve just got Astra to port what we were using from cloak into our code base. Encrypted fields in Ecto looks like a major win though, so our port might be sticking around for long.