decentralized-identity / edv-spec

Encrypted Data Vault Spec
https://identity.foundation/edv-spec
Apache License 2.0
13 stars 5 forks source link

What is the purpose of StructuredDocuments? #32

Open DRK3 opened 3 years ago

DRK3 commented 3 years ago

Why not just encode your data as an JWE and directly put it in an EncryptedDocument instead of wrapping it in a StructuredDocument first, seeing as how the server never sees the StructuredDocument. A StructuredDocument are already a very general object.

Now... assuming that Structured Documents are here to stay... I find the ID constraint strange. In the description for the StructuredDocument id property, it says:

An identifier for the structured document. The value is required and MUST be a Base58-encoded 128-bit random value.

Seeing as a StructuredDocument is encrypted before being put in an EncryptedDocument what is the need for the format constraint on the id property? Why does a StructuredDocument have an ID anyway?

DRK3 commented 3 years ago

Discussed on July 8, 2021 WG call:

Do we need the ID in a structured document?

dmitrizagidulin commented 3 years ago

Discussed on Sep 2, 2021.

There are two issues here:

1) Does the EDV spec want to be able to reserve keys, in structured documents? 2) Clarifying the algorithm for generating encrypted indexes.

dlongley commented 3 years ago

The algorithm for generating encrypted indexes can be found here: https://github.com/decentralized-identity/edv-spec/issues/56#issuecomment-700108603

It should be checked against the edv-client implementation for any updates.