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

Signed messages #2

Merged
merged 4 commits into from
Jul 21, 2019
Merged

Signed messages #2

merged 4 commits into from
Jul 21, 2019

Conversation

stephanfeb
Copy link
Contributor

Bitcoin Signed Messages implementation including some supporting library refactors.

- Added default setting to derive compressed public keys when
constructing private keys from BigInt
- Initial success in implementing Compact Bitcoin Signatures.
  Compact Signatures are interesting since you have the ability to
recover an associated public key from just the signature.

- Refactored the sign() and verify() methods which had what appeared to
be "bitcoin-protocol-level" code for "reversed" messages in there.
  Code was factored out into the signWith() method of transaction.dart
- The original `bsv` library code has this funky 'Buffer' class which
dynamically decodes utf8 or base64 data on the fly. We have to be more
explicit. The Message() constructor now only accepts a byte array of
data for signing. It's up the client to deconstruct their source data
into a byte array. Not Message() class' concern.
- Implemented compact bitcoin message signatures and tests
  Compact Signature format is pretty cool. It allows you to
  retrieve a user's public key from just the message signature
  and the signed message.

- Implemented above scheme for both compressed and uncompressed public
keys

- Refactored parts of Address, PublicKey to support this signature
scheme. Refactor include fixes for some fugly hacks; most hairy of
the latter was the inconsistent handling of _publicKeyHash in the
Address class. Address can be further cleaned up. Later.
@stephanfeb stephanfeb merged commit 5a8204e into develop Jul 21, 2019
@stephanfeb stephanfeb deleted the signed-messages branch October 5, 2023 11:58
@abolfazlMKazemi abolfazlMKazemi mentioned this pull request Oct 14, 2023
@abolfazlMKazemi abolfazlMKazemi mentioned this pull request Feb 19, 2024
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

1 participant