CharlesO

CharlesO

Please how can we replace :des_ecb, the list of supported ciphers no longer includes :des_ecb

 :crypto.supports(:ciphers) |> Enum.sort

[:aes_128_cbc, :aes_128_ccm, :aes_128_cfb128, :aes_128_cfb8, :aes_128_ctr, :aes_128_ecb, :aes_128_gcm, :aes_128_ofb, :aes_192_cbc, :aes_192_ccm, :aes_192_cfb128, :aes_192_cfb8, :aes_192_ctr, :aes_192_ecb, :aes_192_gcm, :aes_192_ofb, :aes_256_cbc, :aes_256_ccm, :aes_256_cfb128, :aes_256_cfb8, :aes_256_ctr, :aes_256_ecb, :aes_256_gcm, :aes_256_ofb, :aes_cbc, :aes_ccm, :aes_cfb128, :aes_cfb8, :aes_ctr, :aes_ecb, :aes_gcm, :chacha20, :chacha20_poly1305, :des_ede3_cbc, :des_ede3_cfb]
 :crypto.crypto_one_time(:des_ecb, <<22, 196, 241, 251, 94, 110, 73, 185>>, <<173, 40, 36, 224, 82, 88, 223, 183>>, true)

** (ErlangError) Erlang error: {:notsup, {~c"api_ng.c", 284}, ~c"Cipher not supported in this libcrypto version"}:

  * 1st argument: Cipher not supported in this libcrypto version

    (crypto 5.3) crypto.erl:965: :crypto.crypto_one_time(:des_ecb, <<22, 196, 241, 251, 94, 110, 73, 185>>, <<173, 40, 36, 224, 82, 88, 223, 183>>, true)
    iex:3: (file)

I had ported this erlang library to Elixir, it was working before updating to OTP26

https://github.com/gotthardp/erlang-ntlm/blob/9e78be32dd627d350f7ff0c52693c46b4e25fb02/src/ntlm_auth.erl#L199

Showing Posts 1 to 9

al2o3cr

al2o3cr

You’ll likely need to adjust how OpenSSL is compiled on your system; des_cbc is in the “legacy” provider, and Erlang started tolerating that provider’s absence in OTP25.1:

https://github.com/erlang/otp/commit/5549bf92e6920304ae83af13511b9a1c62ffe71e

CharlesO

CharlesO OP

it would seem Windows Server 2019 has this version presently

λ openssl version
OpenSSL 3.1.1 30 May 2023 (Library: OpenSSL 3.1.1 30 May 2023)
CharlesO

CharlesO OP

are you suggesting we can set a flag to allow “legacy” providers?

al2o3cr

al2o3cr

Not quite - I linked to the Erlang source where it’s trying to load the legacy provider, but will ignore a failure to load. des_ecb not working tells me that provider isn’t being loaded.

The documentation suggests that, depending on how OpenSSL was compiled, you might be able to set an environment variable to allow that provider to load. On the other hand, those functions might not be compiled into the OpenSSL library at all if that option was selected at compile-time.

Another alternative would be to manually implement the needed DES functions. The usual advice of “don’t roll your own crypto” applies less here, since NTLMv1 has been deprecated for a decade+…

D4no0

D4no0

Maybe downgrading to openssl 1.1 might help.

CharlesO

CharlesO OP

Im on a windows server, I dont know if reconfiguring openSSL would be advisable

CharlesO

CharlesO OP

A lot of companies still use web services that require NTLMv1
IT would be good for us to have a way to keep supporting those clients , even if we upgrade to OPT26 and beyond

D4no0

D4no0

Disagree, deprecation encouragement is the only way to motivate those companies to move to new secure standards.

CharlesO

CharlesO OP

I’ll simply roll them back to OTP25

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews