[go: nahoru, domu]

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

Data integrity feature? #43

Open
VladUsatii opened this issue Jul 29, 2022 · 0 comments
Open

Data integrity feature? #43

VladUsatii opened this issue Jul 29, 2022 · 0 comments

Comments

@VladUsatii
Copy link

Just a suggestion for implementing (tell me if it doesn't make sense for the project):

  • File integrity: Append the hash of of the previous index value of data (SHA-256) to the newest index value. This prevents tampering with file contents, because every machine can check to make sure that the appended block hash of some index is equal to the block hash of the (index - 1) contents.

Further clarification with this image:
image

Keep in mind that h_0 represents hash of the newest data || h_1, and h_1 is the hash of data || h_2, and so on. This nested check ensures file integrity.

Mutability requires a re-computation of the hashes, but can only be done with a key.

Feedback? Will this fit in the 1000-line requirement?

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

No branches or pull requests

1 participant