Skip to content
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.

feat: message verification #7

Merged
merged 7 commits into from Jul 13, 2018
Merged

feat: message verification #7

merged 7 commits into from Jul 13, 2018

Conversation

ItsANameToo
Copy link
Contributor

@ItsANameToo ItsANameToo commented Jul 6, 2018

Proposed changes

Adds message verification and message signing / verification tests.
Based on the verify functionality implemented by @supaiku0

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build (changes that affect the build system)
  • Docs (documentation only changes)
  • Test (adding missing tests or fixing existing tests)
  • Other... Please describe:

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@faustbrian
Copy link
Contributor

@ItsANameToo there have been some changes in the last commits that should make it possible to finish this now.

@spkjp
Copy link
Contributor

spkjp commented Jul 12, 2018

@ItsANameToo Before you commit please also move Message.ex tolib/arkcosystem/crypto.

BtcCore.decompress(public_key)
end

def verify_message(message, signature, public_key) do
Copy link
Contributor

Choose a reason for hiding this comment

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

This method should be inside message.ex as it is specific to the message entity.

@@ -44,6 +44,15 @@ defmodule ArkEcosystem.Crypto.Utils.EcKey do
|> private_key_to_address(network_address)
end

def pubkey_from_hex(public_key) do
Copy link
Contributor

Choose a reason for hiding this comment

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

This method should be named public_key_from_hex. Abbreviations don't really offer any benefit here.

@ItsANameToo
Copy link
Contributor Author

@supaiku0 will do :)

@ItsANameToo ItsANameToo changed the title [WIP] feat: message verification feat: message verification Jul 12, 2018
@ItsANameToo
Copy link
Contributor Author

@faustbrian you can take a look again

@faustbrian faustbrian merged commit e4b82e7 into ArkEcosystemArchive:develop Jul 13, 2018
@ItsANameToo ItsANameToo deleted the feat/message-verify branch July 13, 2018 15:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants