Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Use Ed25519 instead of RSA for ruleset signatures #12087

Closed

Description

Ed25519 RSASSA-PKCS1-v1_5 RSASSA-PSS RFC6979 ECDSA
Has no known security vulnerabilities Yes No Yes Yes No
Algorithm is well tested + ++ ++ + ++
Has a well tested implementation for JS TweetNaCl-js (passed audit) WebCrypto (built-in) WebCrypto (built-in) No WebCrypto (built-in)
Implemented by OpenSSL No Yes Yes No Yes
Deprecated No Yes No No No

Advantages:

  • Higher security with much smaller key size.
  • Possibly faster.
  • Used in respected open source projects (1, 2).

Disadvantages:

  • Currently requires a third-party library (that passed a security audit with no issues found).

Activity

  1. jeremyn commented on Aug 25, 2017

    @jeremyn
    Contributor

    Where in the code do we use cryptographic signatures? I've tried to answer this question with some searches in GitHub, but couldn't.

  2. jeremyn commented on Aug 25, 2017

    @jeremyn
    Contributor

    Thanks @koops76 .

    @Hainish By the way, I disagree with the entire approach of out-of-band updates for rulesets. See my comments in EFForg/privacybadger#1466 (comment) and following for Privacy Badger for why.

  3. Hainish commented on Aug 25, 2017

    @Hainish
    Member

    @koops76 I'd rather use the WebCrypto API than some library, even if it has been publicly audited. The longevity of crypto APIs implemented directly in the browser seems better assured. We also need something which is supported by openssl, given the signature scripts in util:
    https://github.com/EFForg/https-everywhere/blob/sign-rulesets/utils/sign-rulesets-standalone.sh
    https://github.com/EFForg/https-everywhere/blob/sign-rulesets/utils/sign-rulesets-request.sh
    https://github.com/EFForg/https-everywhere/blob/sign-rulesets/utils/sign-rulesets-airgap.sh

    ECDSA might work, and also has a shorter key size.

  4. jeremyn commented on Aug 25, 2017

    @jeremyn
    Contributor

    In the gist https://gist.github.com/tqbf/be58d2d39690c3b366ad by the highly respected security expert Thomas Ptacek, under "Asymmetric signatures" he says

    Use Nacl, Ed25519, or RFC6979.

    which supports @koops76 's point. On the other hand it's hard to argue with wanting to use the API included in the browser.

    EDIT: he goes on to say

    Avoid: RSA-PKCS1v15, RSA, ECDSA, DSA; really, especially avoid conventional DSA and ECDSA.

  5. Hainish commented on Aug 25, 2017

    @Hainish
    Member

    @Hainish Signing can be done by a Node script.

    We use an airgapped signing machine, node is not installed on it.

    For RSA signatures, the risk is prime factorization in a prime product modulus field.
    For ECDSA, the risk is the Elliptic Curve Discrete Logarithm Problem.

    The general consensus is that choosing two large prime factors for RSA (2048-bit for a prime product of a 4092-bit modulus) is more than enough to protect against a brute-force attack. For Quantum attacks like Shor's algorithm, RSA is more versatile. Yes, the key length is an issue, but only when that key is delivered in real-time in a TLS connection, when milliseconds matter. That's when Ec25519 is really preferred. We're bundling our RSA key with the extension - and bundling a 4092-bit key is trivial, it adds a mere 511 bytes to the filesize. This is not a real issue.

    Besides, the real weak link in the development chain is that git is signing tags with sha1. So before I refer to the rest of the crypto team at EFF let's tackle the real problems. Using RSA for delivery of signed rulesets doesn't even come close.

  6. Hainish commented on Aug 25, 2017

    @Hainish
    Member

    The problem with crypto experts is there's about 3 of them in the world. This isn't a problem that requires a crypto expert, it's a problem that requires a third-party audit of a security firm.

  7. 29 remaining items

  8. jeremyn commented on Aug 29, 2017

    @jeremyn
    Contributor

    @koops76 I agree this discussion isn't really productive anymore. I understand your points and disagree with some of them, and ultimately I agree with the EFF's library/algorithm decision here.

    We don't need to invite more people to discuss this. We don't need to vote on this. The EFF staff have listened and disagree. If we can't trust them to make good security decisions then this entire project is in serious trouble, not just this one thing we're talking about.

  9. jeremyn commented on Aug 29, 2017

    @jeremyn
    Contributor

    @koops76 I'm going to stop participating in this issue and let the EFF folks respond if they want to.

  10. cowlicks commented on Sep 14, 2017

    @cowlicks
    Contributor

    re: #12087 (comment)

    Sorry @koops76 I hope you do not feel like you are being ignored.

    My thoughts are that "RSA signatures are good enough", a debate about whether ed25519 is "more secure" than RSA is orthogonal to this. Even if ed25519 is more secure, RSA is still good enough.

    Refactoring the signature scheme comes with some risk of its own, especially if it means adding a 3rd party dependency. I don't think this risk is worth it to improve a thing that is "good enough".

    When will ed25519 be in webcrypto? If it is included there, it would be much easier and safer for us to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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