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

Allow pubkey recovery for all-zero messages #369

Merged

Commits on Apr 9, 2020

  1. Allow pubkey recovery for all-zero messages

    After https://github.com/openethereum/openethereum/pull/11406 it is no longer possible to to public key recovery from messages that are all-zero. This create issues when using the `ecrecover` builtin because externally produced signatures may well provide a message (i.e. a preimage) that is all-zeroes.
    This works around the problem at the cost of cloning the incoming message and create a `ZeroesAllowedMessage` wrapper around it. The `ZeroesAllowedMessage` implements the `ThirtyTwoByteHash` trait from `rust-secp256k1` which circumvents the zero-check.
    
    In a follow-up PR we'll likely change the interface of `recover()` to take a `ZeroesAllowedMessage` directly, thus removing the unneeded clone.
    dvdplm committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    6a14615 View commit details
    Browse the repository at this point in the history
  2. Inner doesn't need to be pub

    dvdplm committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    51d5e17 View commit details
    Browse the repository at this point in the history
  3. Update parity-crypto/src/publickey/ecdsa_signature.rs

    Co-Authored-By: Andronik Ordian <write@reusable.software>
    dvdplm and ordian committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    31a14e7 View commit details
    Browse the repository at this point in the history
  4. Docs and review grumbles

    dvdplm committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    0ad4caa View commit details
    Browse the repository at this point in the history
  5. Merge branch 'dp/fix/change-parity-crypto-to-allow-all-zeroes-message…

    …s' of github.com:paritytech/parity-common into dp/fix/change-parity-crypto-to-allow-all-zeroes-messages
    
    * 'dp/fix/change-parity-crypto-to-allow-all-zeroes-messages' of github.com:paritytech/parity-common:
      Update parity-crypto/src/publickey/ecdsa_signature.rs
    dvdplm committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    7568cd6 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2020

  1. Add recover_allowing_all_zero_message()

    Revert `recover()` to previous behaviour: no zero-messages allowed
    Docs and cleanup
    dvdplm committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    88f3d44 View commit details
    Browse the repository at this point in the history
  2. Obey the fmt

    dvdplm committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    634ecb5 View commit details
    Browse the repository at this point in the history