fairDataSociety / fdp-storage

Serverless Web3 filesystem for organizing users' personal data implemented in Typescript.

Home Page:https://www.npmjs.com/package/@fairdatasociety/fdp-storage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validate that downloaded data is correct

IgorShadurin opened this issue · comments

It would be nice to check the downloaded data due to an issue in Bee ethersphere/bee#3714.

commented

how do you want to check that? building up bmt for all downloaded data on client side is quite heavy.
IMO the Bee client should handle this on request (that it does maybe, just the http error code handling on streaming is wrong)

how do you want to check that? building up bmt for all downloaded data on client side is quite heavy. IMO the Bee client should handle this on request (that it does maybe, just the http error code handling on streaming is wrong)

If the bmt validation is slow, then a new field in the metadata can be added with a hash of some browser-friendly algorithm to check the integrity of the file.

Even something like md5 can be used, since the hash is stored encrypted in the metadata and cannot be used by a malicious gateway to generate a collision.