dat-ecosystem-archive / DEPs

Dat Enhancement Proposals. Contains all specs for the Dat protocol, including drafts. [ DEPRECATED - see https://github.com/hypercore-protocol/hypercore-proposals for similar functionality. More info on active projects and modules at https://dat-ecosystem.org/ ]
https://dat-ecosystem.github.io/DEPs
166 stars 17 forks source link

Clarify when and how signatures are generated for hypercore DEP #39

Closed RangerMauve closed 5 years ago

RangerMauve commented 5 years ago

The hypercore DEP (0002) contains some useful example code for how nodes are hashed.

I think it's important to do the same thing for signing these nodes because it was a little hard to follow the internals in hypercore and hypercore-crypto to find this line.

bnewbold commented 5 years ago

If you are doing an implementation (as noted on IRC), you might be interested in these notes:

https://github.com/bnewbold/geniza/blob/master/notes/crypto/notes.txt https://github.com/bnewbold/geniza/tree/master/notes

I think @yoshuawuyts also started a "how to implement dat" guide as part of datrs... maybe this? https://github.com/datrs/book/tree/master/src

soyuka commented 5 years ago

And https://github.com/datrs/tree-index/issues/7 cool stuff there as well :)

pfrazee commented 5 years ago

@RangerMauve I went to make the PR but I'm not 100% what aspect was unclear. (Sorry to put this on you but) could you make an PR or suggest some language that you think would clarify this?

RangerMauve commented 5 years ago

Sure, I'll do a PR. Basically, I just want to add some psuedocode to show how signatures are generated for a node, and how they are verified once you get a node.

pfrazee commented 5 years ago

@RangerMauve Okay awesome 👍 gracias!