Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openssl removed ripemd160 - issues on Ubuntu22 #20

Open
MCM-Mike opened this issue May 26, 2022 · 2 comments
Open

Openssl removed ripemd160 - issues on Ubuntu22 #20

MCM-Mike opened this issue May 26, 2022 · 2 comments

Comments

@MCM-Mike
Copy link

Type "help", "copyright", "credits" or "license" for more information.
>>> from bitcoinaddress import Wallet
>>> wallet = Wallet()
Traceback (most recent call last):
  File "/usr/lib/python3.10/hashlib.py", line 160, in __hash_new
    return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines] unsupported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/.local/lib/python3.10/site-packages/bitcoinaddress/wallet.py", line 16, in __init__
    self.address = Address.of(self.key)
  File "/home/user/.local/lib/python3.10/site-packages/bitcoinaddress/address.py", line 88, in of
    address.generate()
  File "/home/user/.local/lib/python3.10/site-packages/bitcoinaddress/address.py", line 94, in generate
    self.mainnet.generate_publicaddress1()
  File "/home/user/.local/lib/python3.10/site-packages/bitcoinaddress/address.py", line 38, in generate_publicaddress1
    self.pubaddr1 = self.instance._generate_publicaddress1(Address.MainNet.PREFIX_A,
  File "/home/user/.local/lib/python3.10/site-packages/bitcoinaddress/address.py", line 107, in _generate_publicaddress1
    m = prefix_a + hash160(p).digest()
  File "/home/user/.local/lib/python3.10/site-packages/bitcoinaddress/util.py", line 20, in hash160
    return ripemd(hashlib.sha256(v).digest())
  File "/home/user/.local/lib/python3.10/site-packages/bitcoinaddress/util.py", line 24, in ripemd
    r = hashlib.new('ripemd160')
  File "/usr/lib/python3.10/hashlib.py", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
  File "/usr/lib/python3.10/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name) ```
    ```

ValueError: unsupported hash type ripemd160

Kernel: 5.15.0-33
Ubuntu 22.04 LTS
OpenSSL: OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
https://www.openssl.org/news/changelog.html

The low-level MD2, MD4, MD5, MDC2, RIPEMD160 and Whirlpool digest functions have been deprecated.

I would need some advice here ?

@Exohayvan
Copy link

Exohayvan commented Feb 16, 2023

Just spend days trying to find a way around this. Check this out. Worked for me. OpenSSL was under /usr/lib/ssl for me

08DA2BD7-89CA-40D9-BCB7-1ED870989284

@dmugtasimov
Copy link

A link https://stackoverflow.com/questions/69922525/python-3-9-8-hashlib-and-ripemd160 for those who do not like retyping from screenshots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants