Skip to content
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

What is the purpose of StructuredDocuments? #32

Open
DRK3 opened this issue Jan 25, 2021 · 3 comments
Open

What is the purpose of StructuredDocuments? #32

DRK3 opened this issue Jan 25, 2021 · 3 comments
Labels
ready for PR Ready for Pull Request

Comments

@DRK3
Copy link

DRK3 commented Jan 25, 2021

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?

@dmitrizagidulin dmitrizagidulin transferred this issue from decentralized-identity/confidential-storage May 25, 2021
@DRK3
Copy link
Author

DRK3 commented Jul 8, 2021

Discussed on July 8, 2021 WG call:

Do we need the ID in a structured document?

  • Clients may want to use ID for indexing/caching
  • Could meta be used for these purposes?
  • Is the ID being in a structured document an artifact of a specific implementation?
  • Use case: relating structured doc to encrypted doc
  • Mandate that Structured Doc ID is identical to the encrypted doc ID.
  • Maybe structured document should also have the sequence number from encrypted document?
  • Document migration: Do IDs change?
  • Update spec to say that you only encrypt the meta, content and stream (if applicable) fields. An implementation may provide fields like id in the structured document that match what's in the encrypted document
  • Implementations may augment the structured document on their end.
  • First few examples could include only required fields, and then an example with those augmented fields.

@dmitrizagidulin
Copy link
Contributor

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.

@dmitrizagidulin dmitrizagidulin added the ready for PR Ready for Pull Request label Sep 2, 2021
@dlongley
Copy link
Contributor

dlongley commented Sep 2, 2021

The algorithm for generating encrypted indexes can be found here: #56 (comment)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for PR Ready for Pull Request
Projects
None yet
Development

No branches or pull requests

3 participants