Skip to content

Add JSON-LD verification via BTC public key #442

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

Merged
merged 3 commits into from
Jan 26, 2017

Conversation

harlantwood
Copy link
Contributor

@harlantwood harlantwood commented Dec 6, 2016

@harlantwood harlantwood force-pushed the btc-verify branch 2 times, most recently from e4551ad to 9bdc26a Compare January 12, 2017 02:02
@harlantwood
Copy link
Contributor Author

@ChristopherA @msporny @aquabu @gkellogg this is ready to merge IMO. Please take a look at the demo: http://thawing-inlet-70039.herokuapp.com/playground/ and/or the code, and let's give it some 👍 or 👎 . Thanks!

@msporny
Copy link
Member

msporny commented Jan 12, 2017

Works for me, fine with it getting merged. Pulling in @dlongley and @davidlehn for comments.

I have the following requests for future discussion:

  1. We need to figure out how to make the UI for all of this more intuitive. It'll help if/when we launch a digital verification playground.
  2. There is no way to put in some signed JSON-LD and see if the signature checks out. The Koblitz stuff only checks to see if the displayed information is valid (which is fine, but the DV Playground should probably just have a signature checking mechanism).
  3. The key format is strange because it 1) doesn't allow lookups, 2) doesn't enable extra metadata to be stored w/ the key, and 3) differs from the public key input box (hex vs. Base58Check).

Only the third item really needs work before we suggest the signature format for broader use. The first two is on us to make sure it's all more friendly to use in the DV Playground.

Thanks a ton for all the hard work @harlantwood.

+1 from me to merge.

@harlantwood harlantwood changed the title [DO NOT MERGE] Add JSON-LD verification via BTC public key Add JSON-LD verification via BTC public key Jan 12, 2017
@harlantwood
Copy link
Contributor Author

  1. The key format is strange because it ... 3) differs from the public key input box (hex vs. Base58Check).

Yeah, this one was weird, so I pushed a fix.

@harlantwood
Copy link
Contributor Author

There is no way to put in some signed JSON-LD and see if the signature checks out. The Koblitz stuff only checks to see if the displayed information is valid (which is fine, but the DV Playground should probably just have a signature checking mechanism).

I'm not sure if it's quite what you mean, but if you paste in a different (valid) public key ( eg try 1duznTM2aFTdzUnvGx7oBHjWubRpE2EBX) you will see that the signature (created by signing with an unrelated private key) fails to validate using this public key. However, if you then paste in the private key that matches this new public key (L1CwqSsUaGh7NXPB8BfotjdtkzTSWrsRmx1PrtfvK3ZwkgMQRphG), a new signature is generated, and this one is validated by the matching public key.

I clarified the verbiage a bit in the UI:

  • Bitcoin (ECDSA Koblitz) Private Key for Signing
  • Bitcoin (ECDSA Koblitz) Public Key for Verification

The latest code is at http://thawing-inlet-70039.herokuapp.com/playground/

@harlantwood
Copy link
Contributor Author

@msporny can we merge this? Any feedback from others? @dlongley @davidlehn @ChristopherA

@dlongley dlongley merged commit 441ff75 into json-ld:master Jan 26, 2017
@dlongley
Copy link
Member

@harlantwood,

Merged to avoid any further hold up. We can make any additional adjustments as needed via new PRs.

@msporny
Copy link
Member

msporny commented Jan 26, 2017

Thanks for merging, @dlongley. Sorry, @harlantwood we never meant this PR to hang out there that long.

I'm not sure if it's quite what you mean

I was raising a general concern wrt. digital signatures and the JSON-LD playground, not with anything you did. What I meant was that "A person can't show up with a digitally signed message and just dump it into the JSON-LD input box and then know whether or not the signature is valid". We have no generalized signature verification mechanism. From what I gather, anything dumped into the JSON-LD input box is then re-signed with the value in "Bitcoin (ECDSA Koblitz) Private Key for Signing" and then checked against the public key in "Bitcoin (ECDSA Koblitz) Public Key for Verification".

... and that we just need to all remember to put this very obvious feature in the yet-to-be-created Digital Verification Playground. :)

@harlantwood
Copy link
Contributor Author

Ah makes sense. NP, thanks for feedback and merging.

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.

3 participants