decentralized-identity / peer-did-method-spec

A rich DID method that has no blockchain dependencies. The verifiable data registry is a synchronization protocol between peers.
https://decentralized-identity.github.io/peer-did-method-spec/index.html
Apache License 2.0
27 stars 17 forks source link

Explain delta signature scheme better #8

Open dhh1128 opened 4 years ago

dhh1128 commented 4 years ago

Moved from https://github.com/openssi/peer-did-method-spec/issues/126. Tagging @OR13 who opened it there.

dhh1128 commented 4 years ago

@OR13 : The intent is to use JWS. However, when I first wrote the section, that wasn't the intent. So the current muddiness is probably the result of me claiming we're using JWS but not updating my verbiage everywhere. Sorry about the confusion.

OR13 commented 4 years ago

Cool, IMO detached JWS is the best approach for these deltas, happy to help document that in the next version of the spec.

OR13 commented 4 years ago

Here is the detached JWS delta I used for my implementation: https://raw.githubusercontent.com/transmute-industries/did-peer.js/master/packages/did-peer.js/src/__fixtures__/deltas/0.json

{
  "change": "W3sib3AiOiJhZGQiLCJwYXRoIjoiL3B1YmxpY0tleS8xIiwidmFsdWUiOnsiY29udHJvbGxlciI6ImRpZDpwZWVyOjB6Nk1rZjVyR01vYXRyU2oxZjRDeXZ1SEJlWEpFTGU5UlBkem8yUEtHTkNLVnRaeFAiLCJpZCI6IiM0U1otU3RYcnA1WWQ0XzRyeEhWVENZVEh5dDR6eVBmTjFmSXVZc202azNBIiwicHVibGljS2V5SndrIjp7ImNydiI6InNlY3AyNTZrMSIsImtpZCI6IjRTWi1TdFhycDVZZDRfNHJ4SFZUQ1lUSHl0NHp5UGZOMWZJdVlzbTZrM0EiLCJrdHkiOiJFQyIsIngiOiJaNFkzTk5PeHYwSjZ0Q2dxT0JGbkhuYVpoSkY2TGR1bFQ3ejhBLTJENV84IiwieSI6Imk1YTJOdEpvVUtYa0xtNnE4bk9FdTlXT2tzbzFBZzZGVFVUNmtfTE1uR2sifSwidHlwZSI6Ikpzb25XZWJLZXkyMDIwIn19XQ",
  "when": "2020-06-27T18:08:28.514Z",
  "by": [
    {
      "key": "#z6Mkf5rGMoatrSj1f4CyvuHBeXJELe9RPdzo2PKGNCKVtZxP",
      "sig": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il0sImtpZCI6ImRpZDprZXk6ejZNa2Y1ckdNb2F0clNqMWY0Q3l2dUhCZVhKRUxlOVJQZHpvMlBLR05DS1Z0WnhQI3o2TWtmNXJHTW9hdHJTajFmNEN5dnVIQmVYSkVMZTlSUGR6bzJQS0dOQ0tWdFp4UCJ9..zGzx3xHiN7fnejRKIvVgPUSgzzOZGs4MF5khGshaRLCRJgfD1lJpxuL0u5QZSE_Fidf5IT2pmFZwyYpHHz9wDw"
    }
  ]
}