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

Schnorr scale #80

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open

Schnorr scale #80

wants to merge 77 commits into from

Conversation

icodezjb
Copy link
Member

  1. support schnorr
  2. support scale-info

hacpy and others added 30 commits August 2, 2021 17:26
 * Add tagged hash

 * Construct schnorr challenge

 * Generate nonce and nonce point

 * Sign the message

 * Implement XOnly for the x coordinate of the point

 * Add a simple test to make sure the program works
 * Impl From instead of Into

 * Use assert!() to assert true or false
 * Remove redundant reference
 * Add keypair

 * Pass verify test
 * Remove unwrap

 * More error details

 * More notes
 * Impl privkey.sign()

 * Impl pubkey.verify()
 * Add comments

 * More error alerts

 * Implement From<T> and TryFrom<T> whenever possible
Add feature getrandom

 * Gen random nonce

 * Test sign_with_random passed

 * Temporarily remove useless keypair
 * Check signature overflow

 * Check X on curve

 * Check X corresponds to having two y
  Just a simple aggregation, not tested and not checked internally for possible errors.
  Signatures without random numbers will directly expose the private key, and of course if the random numbers are reused they will also expose the private key.
 * Remove schnorr module

 * Add XOnly implementation in pubkey

 * Add SchnorrSignature implementation to the signature
@codecov
Copy link

codecov bot commented Nov 15, 2021

Codecov Report

Merging #80 (4e5546e) into master (c0db1bc) will increase coverage by 5.36%.
The diff coverage is 78.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #80      +/-   ##
==========================================
+ Coverage   67.04%   72.41%   +5.36%     
==========================================
  Files          38       44       +6     
  Lines        3823     4915    +1092     
==========================================
+ Hits         2563     3559     +996     
- Misses       1260     1356      +96     
Impacted Files Coverage Δ
chain/src/block.rs 51.85% <ø> (+3.57%) ⬆️
chain/src/block_header.rs 69.23% <0.00%> (+1.30%) ⬆️
chain/src/indexed_block.rs 45.28% <ø> (+7.78%) ⬆️
chain/src/indexed_header.rs 33.33% <ø> (+2.08%) ⬆️
chain/src/indexed_transaction.rs 31.25% <ø> (+1.83%) ⬆️
keys/src/error.rs 0.00% <0.00%> (ø)
keys/src/private.rs 86.88% <ø> (+1.40%) ⬆️
mast/src/error.rs 0.00% <0.00%> (ø)
merkle/src/lib.rs 87.67% <0.00%> (+5.19%) ⬆️
primitives/src/bytes.rs 45.61% <ø> (+4.93%) ⬆️
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0db1bc...4e5546e. Read the comment docs.

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