FEP-8b32: Object Integrity Proofs

I don’t think the linked issue agrees with this. What was described in eddsa issue 81 was the pattern of securing an inner document then an outer document, but NOT what the unsecured document (“input”) should be in either case. The VCDI spec defines an “unsecured document” as one where there are zero proof nodes or proof graphs. It would be a contradiction to have an unsecured document that contained an inner proof. This is what the other linked issue on vc-data-integrity (issue 350) seeks to clarify upstream.

basically, the example document in issue 81 is valid, but the verification of such proofs is ambiguous due to undefined behavior.

jsonld context stacks and is inherited from parent nodes in the same document. you can “reset” the context in some cases by declaring an array with null as one of the elements, which overrides earlier declarations but can break with protected term definitions. the only way you can get clean separation between contexts is to use separate documents, i.e. not compound documents.

this is again what eddsa issue 81 was concluding, that it’s okay to merge documents after verification, but republishing that merged/compound document is not specified. in other words, the following has no issues:

  1. verify document a
  2. verify document b
  3. construct a compound document using a as the base and injecting merged statements about b within an inner node

but the following cannot be done reliably:

  1. verify a and b given the compound document from step 3 above

you must obtain an unambiguous canonical representation of a and b to verify a and b. what you do internally after that doesn’t matter – combine them or don’t combine them, if you wish.

note that even if you are including statements initially asserted by someone else in another document, you are still reasserting them in your own document / default graph. their proof graph remains separate though, and signing signatures is a bad idea – use previousProof if you need to establish a chain of proofs.