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

Is cacache checking for hash collisions? #76

Open
RustyNova016 opened this issue May 13, 2024 · 1 comment
Open

Is cacache checking for hash collisions? #76

RustyNova016 opened this issue May 13, 2024 · 1 comment
Labels
question Further information is requested

Comments

@RustyNova016
Copy link
Contributor

One thing missing from the readme is whether cacache checks for hash collisions, since hashes seems to be the way the contents is indexed internally. While they are rare, that's definitely something to be worried about

So is cacache checking for those or do we have to manually check it ourselves?

@zkat
Copy link
Owner

zkat commented May 13, 2024

cacache defaults to, iirc, sha256. The odds of hash collisions is... negligible. I think testing for it would be overkill, tbh.

If you had 1 billion entries in cacache, your chances of a hash collision with sha256 are 4.3*10^-60

For sha512, which you can opt into, it's even more.

You're more likely to have an asteroid strike earth and kill us all in the next 30 seconds.

@zkat zkat added the question Further information is requested label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants