apple / swift-crypto

Open-source implementation of a substantial portion of the API of Apple CryptoKit suitable for use on Linux platforms.

Home Page:https://apple.github.io/swift-crypto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New API Proposal: Add `RIPEMD` hash function family, especially `ripemd160`

Sajjon opened this issue · comments

New API Proposal: Add RIPEMD hash function family

Motivation:

Bitcoin uses ripemd160 for address formatting, so if proposal #8 goes through, this would be extremely advantageous for the whole Bitcoin community.

Importance:

Instead of everyone rolling their own RIPEMD it would be beneficial to have a good shared implementation. Previously I've used Martin R solution pasted on StackOverflow

Unfortunately, we don't think RIPEMD is a good fit for Swift Crypto at this time. The reasons are largely the same as laid out in the response for secp256k1: fundamentally, the primitive is not used widely enough to justify the extra cognitive burden of adding it to the API, and we don't have good optimised implementations of it.

As with #8, we think that the best place for this is in the wider Swift open source community, which can collaborate to build a package that the cryptocurrency ecosystem can use to best address its specific needs.

Thanks for the suggestion though!