Long-term support of blowfish_ecb in Erlang crypto

I wanted to use crypto module blowfish_ecb to encrypt 64bit ids, but I noticed that this cypher is marked deprecated in OpenSSL. If OpenSSL removes it in a few years, will BEAM still provide it ? I want to retain the ability to decrypt ids even multiple years in the future.
Unfortunately this is the only secure cypher available that doesn’t bloat resulting cyphertext (I want to have the option to keep the id short even with encryption). I know it has some weaknesses but with the right setup (rate limiting etc) I think it should be perfectly fine for ids. There are community-maintained libraries implementing other algorithms, but I don’t have much faith in them, especially if the author used AI for the code.

I can’t speak for the OTP team, but Erlang currently delegates all cryptography operations to OpenSSL’s libcrypto. If OpenSSL removed it, I can’t imagine that Erlang would continue to support it separately. As you noted, you are reaching for Blowfish because of its properties (64-bit block size), not because it is the right tool for the job today. What you want is format-preserving encryption (FPE), which you can do with AES using things like FF1.

As an alternative, there are other 64-bit block-size algorithms on Hex, like speck_ex | Hex.

Well speck has bad rep for being NSA backed, I wouldn’t use something like that :smiling_face:
There are multiple libraries that could be used via a NIF, the problem is that their soundness and long term support is not clear either. Unless I write my own implementation, I’m out of luck it seems.

I had a similar problem and now use a pure erlang blowfish implementation which is fast enough for my use-case (Id generation)