digitalbazaar / did-io

Decentralized identifier management library for browser and node.js
Other
43 stars 8 forks source link

Convert to use ed25519 keys / multihash. #30

Closed dmitrizagidulin closed 6 years ago

dmitrizagidulin commented 6 years ago

Based on Manu's work on did-veres-one (https://github.com/veres-one/did-veres-one/pull/6).

Closes #24 and #25.

(Depends on PR https://github.com/veres-one/veres-one-context/pull/3 ).

dmitrizagidulin commented 6 years ago

Ready to review.

dmitrizagidulin commented 6 years ago

I thought the aim was to have a did-veres-one dependency and use that code the generate the DID. Is that correct?

The plan is to eventually extract Veres-related code out of did-io into did-veres-one, but it is not a priority. All downstream libs should be using did-io meanwhile, anyway.

mattcollier commented 6 years ago

@dmitrizagidulin one of the tests is failing on node 8: https://travis-ci.org/digitalbazaar/did-io/jobs/435714189

dmitrizagidulin commented 6 years ago

@mattcollier:

one of the tests is failing on node 8: https://travis-ci.org/digitalbazaar/did-io/jobs/435714189

Yeah, that one's weird, it passes like 3/4 of the time, so something is off either with the algorithm or with the test. I need to check with @msporny or @dlongley

dmitrizagidulin commented 6 years ago

Ok, I extracted fingerprint generating code to LDKeyPair class, and added a corresponding verifyFingerprint() function. The reason the test was failing had to do with the vagaries of base58-encoding. When we compare bytes directly, the fingerprints verify.