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

Verify files to detect (malicious) data changes #3

Closed
petoem opened this issue Mar 6, 2023 · 4 comments
Closed

Verify files to detect (malicious) data changes #3

petoem opened this issue Mar 6, 2023 · 4 comments

Comments

@petoem
Copy link

petoem commented Mar 6, 2023

At point 3.1 Send Request (Metadata only) a checksum for each file could be send along, to enable the recipient to verify the file. Depending on the algorithm used and file size this could take a while to compute both before send and after receiving. I think this should be an optional preference (globally or before each send) and cancelable (on the receiving side), so it doesn't impact users with for example big files or slow phones.

@notjedi
Copy link

notjedi commented Mar 8, 2023

doesn't TCP already support CRC checksums? should we really need to verify it ourselves?

@petoem
Copy link
Author

petoem commented Mar 9, 2023

You are right.

I was initially thinking about cryptographic hash functions like sha256, to guard against malicious changes to files.
But because only self signed certificates are used here for HTTPS, it's unknown who we are sending the metadata to (including the proposed hash/checksum). So I settled on at least catching some errors that may happen at the receiving side.

Actually, the current random fingerprint in the announcement, could be the self signed certificate fingerprint. This way it's possible to verify who the file is send to and guard against MITM attacks. And if the certificate is persistent, it's possible to remember known devices.

@petoem petoem changed the title Verify files to detect data corruption Verify files to detect (malicious) data changes Mar 13, 2023
@petoem
Copy link
Author

petoem commented Mar 13, 2023

Looks like v2 (PR #5) will set fingerprint to the certificate hash, which will make it harder to impersonate and maliciously change files at transmission once this is implemented.

@petoem
Copy link
Author

petoem commented Mar 13, 2023

I'll close this for now. Feel free to reopen.

@petoem petoem closed this as completed Mar 13, 2023
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

2 participants