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

Bmap file integrity check #59

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Razaloc
Copy link
Contributor

@Razaloc Razaloc commented Dec 1, 2022

Checks if the bmap hash is correct for the current bmap file.
Bmap file checksum is calculated having that field as all 0s.

Closes: #50

Signed-off-by: Rafael Garcia Ruiz [email protected]

@Razaloc Razaloc force-pushed the wip/rafaelgarrui/integritybmap branch 9 times, most recently from 8cea86a to 4004d0f Compare December 5, 2022 12:35
@Razaloc Razaloc force-pushed the wip/rafaelgarrui/integritybmap branch 3 times, most recently from e513da0 to ed62867 Compare December 16, 2022 21:22
@Razaloc
Copy link
Contributor Author

Razaloc commented Dec 21, 2022

Bmap integrity check bmap_integrity added into the remote copying function copy_remote_input

@Razaloc Razaloc force-pushed the wip/rafaelgarrui/integritybmap branch 2 times, most recently from 96f9991 to bcfa4cf Compare January 13, 2023 08:54
bmap_file_checksum is going to be used to check the integrity of the
file. It is now included in the Bmap struct type and the
builder.

Signed-off-by: Rafael Garcia Ruiz <[email protected]>
Before using a Bmap file checks if its checksum is correct for the
current bmap file.
Bmap checksum is the application of Sha256 to the file data. When the
bmap file is created, the value of the checksum has to be zero (all ASCII
"0" symbols). Once calculated, zeros are replaced by the checksum, notice
this modifies the file itself.
In order to calculate the checksum before using it and compare it with
the original, we need to set the field as all "0" before applying Sha256.

Closes: #50

Signed-off-by: Rafael Garcia Ruiz <[email protected]>
Remote copy checks the integrity of the bmap file after downloading it.

Signed-off-by: Rafael Garcia Ruiz <[email protected]>
@Razaloc Razaloc force-pushed the wip/rafaelgarrui/integritybmap branch from bcfa4cf to 1ac7fed Compare January 19, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

bmap file integrity
1 participant