Skip to content

ring is a bad dependency; get rid of it #1396

@llebout

Description

@llebout

Hello,
I'd like to suggest the removal of ring as a dependency all-together. That also includes rustls and webpki. (rustls is used by the websocket transport)

Why:

  • Because I don't see a point in using that one vs others when it mostly is a wrapper to Assembly code:
    Screenshot Capture - 2020-01-19 - 04-09-14
  • The maintainer is problematic: Why were all versions prior to 0.14 of this crate yanked? briansmith/ring#774 and doesnt work in the spirit of Free Software.
  • There is no portable fallback for crypto primitives, which means it wont compile on less common platforms, at the mercy of the problematic maintainer.
  • The build system of ring is really a mess.

I suggest using the openssl crate instead. That supports both OpenSSL and LibreSSL and any other library that offers an openssl-compatible interface. Or individual crates that implement the primitives needed by libp2p such as: https://github.com/RustCrypto -- but I don't think they're that mature yet.

I started porting libp2p crates to openssl but it seems that ring types are exposed in public interfaces, so that would be a breaking change. Also, usage of ring really doesnt seem contained, so it's not so trivial to do so either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions