atomicdata-dev / atomic-data-docs

Atomic Data is a specification to make it easier to exchange data.
https://docs.atomicdata.dev
MIT License
17 stars 7 forks source link

Checksums in Commits - current state hash as extra check #118

Open joepio opened 2 years ago

joepio commented 2 years ago

By verifying the previousCommit and when applying a Commit, we can check that the signer was looking at the same state as before. But we don't know if the new state matches correctly. What if the Commit was wrongly applied? We could introduce a checksum, or stateHash, which contrary to the signature does not hash the Commit but hashes the Resource.

I'm not entirely sure if this is worth the hassle, though. It does make it less likely to expose issues if a client and server have disagreement on how a Commit should be applied.