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

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance 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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews