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

Fix: invalid public key #182

Merged
merged 4 commits into from
Apr 28, 2023
Merged

Fix: invalid public key #182

merged 4 commits into from
Apr 28, 2023

Conversation

moonsettler
Copy link
Collaborator

        # DLEQ verify
        # the below lines break the format of C and result in 'invalid public key'
        # error when the mint tries to verify it's blind signature.
        # unclear what the purpose of this exercise was, it's not fit for negative
        # test in the DLEQ proofs, so i commented them out - moonsettler
        #
        # print(f"before:{scnd_proofs[0].C}")
        # scnd_proofs[0].C = "1" + scnd_proofs[0].C[1:]
        # print(f"after: {scnd_proofs[0].C}")

* Fix comments (DLEQ sign error)
* Fix alice_verify_dleq in d_dhke.py
* Fix_generate_promise in ledger.py
* Fix verify_proofs_dleq in wallet.py
* Exception: Mint Error: invalid public key
@moonsettler moonsettler marked this pull request as draft April 28, 2023 09:40
@moonsettler moonsettler marked this pull request as ready for review April 28, 2023 09:45
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (dleq@e0bd8bc). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             dleq     #182   +/-   ##
=======================================
  Coverage        ?   51.72%           
=======================================
  Files           ?       36           
  Lines           ?     2834           
  Branches        ?        0           
=======================================
  Hits            ?     1466           
  Misses          ?     1368           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

cashu/wallet/wallet.py Outdated Show resolved Hide resolved
@callebtc callebtc merged commit 65be72b into cashubtc:dleq Apr 28, 2023
1 check passed
callebtc added a commit that referenced this pull request Sep 23, 2023
* produce dleq

* start working on verification

* wip dleq

* Use C_ instead of C in verify DLEQ! (#176)

* Fix comments (DLEQ sign error)
* Fix alice_verify_dleq in d_dhke.py
* Fix_generate_promise in ledger.py
* Fix verify_proofs_dleq in wallet.py

* Fix: invalid public key (#182)

* Use C_ instead of C in verify DLEQ!

* Fix comments (DLEQ sign error)
* Fix alice_verify_dleq in d_dhke.py
* Fix_generate_promise in ledger.py
* Fix verify_proofs_dleq in wallet.py

* Fix: invalid public key

* Exception: Mint Error: invalid public key

* Update cashu/wallet/wallet.py

---------

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* Update cashu/core/b_dhke.py

* Update tests/test_cli.py

* verify all constructed proofs

* dleq upon receive

* serialize without dleq

* all tests passing

* make format

* remove print

* remove debug

* option to send with dleq

* add tests

* fix test

* deterministic p in step2_dleq and fix mypy error for hash_to_curve

* test crypto/hash_e and crypto/step2_bob_dleq

* rename A to K in b_dhke.py and test_alice_verify_dleq

* rename tests

* make format

* store dleq in mint db (and readd balance view)

* remove `r` from dleq in tests

* add pending output

* make format

* works with pre-dleq mints

* fix comments

* make format

* fix some tests

* fix last test

* test serialize dleq fix

* flake

* flake

* keyset.id must be str

* fix test decorators

* start removing the duplicate fields from the dleq

* format

* remove print

* cleanup

* add type anotations to dleq functions

* remove unnecessary fields from BlindedSignature

* tests not working yet

* spelling mistakes

* spelling mistakes

* fix more spelling mistakes

* revert to normal

* add comments

* bdhke: generalize hash_e

* remove P2PKSecret changes

* revert tests for P2PKSecret

* revert tests

* revert test fully

* revert p2pksecret changes

* refactor proof invalidation

* store dleq proofs in wallet db

* make mypy happy

---------

Co-authored-by: moonsettler <moonsettler@protonmail.com>
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.

None yet

3 participants