You are not logged in.

#1 2024-02-29 00:08:34

Registered: 2024-02-15
Posts: 6

python3 openssl md4 not supported

i have a script here im trying to run to make a test file for datasurgeon app except i get this error


"Generating a 5GB test file called 'test.txt'
Traceback (most recent call last):
  File "/root/anaconda3/lib/python3.11/", line 160, in __hash_new
    return, data, **kwargs)
_hashlib.UnsupportedDigestmodError: [digital envelope routines] unsupported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/max/Downloads/", line 109, in <module>
  File "/home/max/Downloads/", line 106, in main
    generate_test_file(args.output, args.size, args.speed)
  File "/home/max/Downloads/", line 76, in generate_test_file
    message = generate_message(data_type) + '\n'
  File "/home/max/Downloads/", line 60, in generate_message
  File "/root/anaconda3/lib/python3.11/", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
  File "/root/anaconda3/lib/python3.11/", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md4"

how can i fix this error i have hashlib installed and openssl on latest version of arch.

thank you


#2 2024-02-29 18:26:10

Registered: 2021-05-09
Posts: 67

Re: python3 openssl md4 not supported

It seems your code is choosing to use an unsupported hashing algorithm (md4 in this case). The available hashing algorithms depend on openssl and can be checked with


Your code seems choose a hashing algorithm at random, so maybe look into fixing that part (I assume it is a pregenerated list). It is also useful to share the program, so people helping you can give more comprehensive answers and must not resort to guesswork.

MD4 can be reenabled in openssl by editing /etc/ssl/openssl.cnf see for more.

providers = provider_sect

default = default_sect
legacy = legacy_sect

activate = 1

activate = 1

But be careful with changes to the system ssl as these hashing algorithms are deprecated for a reason.

Edit: changed filename

Last edited by lmn (2024-02-29 18:31:46)


Board footer

Powered by FluxBB