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

Add-on library for recoverable signatures #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evgeny-osipenko
Copy link
Contributor

This is a continuation of PR #44, in accordance with the multi-package approach outlined in issue #43.

This has the same functionality as PR #42, but organized differently. Whereas #42 simply adds the recovery functions to the single module; this one has them as a separate package.

Copy link
Member

@jprupp jprupp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase against latest master, remove README.md file from pacakge, and include a copy of the LICENSE file instead of a symlink, as they break some Haskell tools.

@evgeny-osipenko
Copy link
Contributor Author

Removed README.md from the filesystem and from package.yaml, changed LICENSE from a symlink to a full copy (should it still say the year "2020" btw?), and also removed a couple of redundant imports from the code itself after checking it with -Wall.

@evgeny-osipenko
Copy link
Contributor Author

@jprupp I made the changes you asked for, is there anything else left to do before this PR can be merged in?

Copy link
Member

@jprupp jprupp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good. Just set yourself as the author and I can merge it.

secp256k1-haskell-recovery/package.yaml Outdated Show resolved Hide resolved
secp256k1-haskell-recovery/package.yaml Outdated Show resolved Hide resolved
@evgeny-osipenko
Copy link
Contributor Author

Changed the names to myself and amended the commit.

@evgeny-osipenko
Copy link
Contributor Author

Actually pushed the changes now.

Copy link
Member

@jprupp jprupp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Fails:

secp256k1-haskell-recovery> test (suite: spec)


Crypto.Secp256k1.Recovery
  recovery
    recovers public keys [✔]     
      +++ OK, passed 100 tests.
    recovers key from signed message [✔]     
      +++ OK, passed 100 tests.
    does not recover bad public keys [✔]     
      +++ OK, passed 100 tests.
    detects bad recoverable signature [✔]     
      +++ OK, passed 100 tests.
    serializes compact recoverable signature [✔]     
      +++ OK, passed 100 tests.
    shows and reads recoverable signature [✔]     
      +++ OK, passed 100 tests.
    reads recoverable signature from string [✔]     
      +++ OK, passed 100 tests.
    produces the expected signature [✘]    
    recovers the expected pub key [✔]
      +++ OK, passed 1 test.

Failures:

  test/Crypto/Secp256k1/RecoverySpec.hs:107:3: 
  1) Crypto.Secp256k1.Recovery.recovery produces the expected signature
       Falsifiable (after 1 test):
       
       produced signature matches
       expected: "02559ab98a8908ba4cf0f914eb8b66651405ab69ab7c461dd140e40baa1b5e1d2ef6ac88a13e2226f76a9d8d49bb9cf3061dac1364c0dfe7b69cd165a8d08f0700"
        but got: "d0205e402f5c0bc8bbbcf08b3f0912b055fc3998ef0d090c2dec52f98695c4e01cd55228c2370ffe52826b3f2bd82e42fcf94e8943cd402f39644935b2c7c08b00"

  To rerun use: --match "/Crypto.Secp256k1.Recovery/recovery/produces the expected signature/"

Randomized with seed 1890685244

Finished in 6.2283 seconds
9 examples, 1 failure

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 this pull request may close these issues.

2 participants