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

Potential problem with RIPEMD160 removal from newer OpenSSL versions by default #64

Closed
kristapsk opened this issue Dec 9, 2021 · 2 comments

Comments

@kristapsk
Copy link

See bitcoin-core/HWI#305 and openssl/openssl#16994.

Bitcoin Core solved it by writing own pure Python RIPEMD160 implementation (see bitcoin/bitcoin#23716), but it's meant to be used only for tests as it isn't constant time.

dgpv added a commit that referenced this issue Dec 9, 2021
The implementation is taken from Bitcoin Core's test framework

Closes #64
@dgpv
Copy link

dgpv commented Dec 9, 2021

#65 should solve this (taken the code from Core's test framework)

I'm not sure if 'constant time' is relevant here. Hash160 function is not supposed to work with any secret data.

It will likely be much slower than openssl implementation that is used by python, but given that ripemd160 is already not available from python.hashlib in some linux distributions, we'll have to bear this this.

dgpv added a commit that referenced this issue Dec 9, 2021
The implementation is taken from Bitcoin Core's test framework

Closes #64
@dgpv
Copy link

dgpv commented Dec 9, 2021

(edit: moved this comment about Core's implementation described as "Test only" to the PR, it is more appropriate there: #65 (comment))

dgpv added a commit that referenced this issue Dec 9, 2021
The implementation is taken from Electrum

Closes #64
dgpv added a commit that referenced this issue Jan 11, 2022
The implementation is taken from Bitcoin Core's test framework

Closes #64
@dgpv dgpv closed this as completed in afac19c Jan 22, 2022
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

Successfully merging a pull request may close this issue.

2 participants