Hashing for Fun and Profit
-
Upload
mattrudel -
Category
Technology
-
view
194 -
download
4
description
Transcript of Hashing for Fun and Profit
![Page 1: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/1.jpg)
HASHING FOR FUN AND PROFITMat Trudel@mattrudel
![Page 2: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/2.jpg)
HASHING
• A one-way mathematical function that reduces a string of data into a fixed length number
• Easy to compute, hard to reverse
• Collision resistant. No two files should have the same hash
• Like a fingerprint, basically
![Page 3: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/3.jpg)
SHA-1
![Page 4: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/4.jpg)
SHA-1160 bits (40 hex chars)
![Page 5: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/5.jpg)
SHA-1ff4f25dfc62c9df4478549444e9eb364841c9391
![Page 6: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/6.jpg)
ff4f25dfc62c9df4478549444e9eb364841c9391
![Page 7: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/7.jpg)
WEBCITATION.ORG
![Page 8: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/8.jpg)
Unicorns! Unicorns! Unicorns!
Unicorns! Unicorns! Unicorns!
![Page 9: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/9.jpg)
Unicorns! Unicorns! Unicorns!
Unicorns!
ff4f25dfc62c9df4478549444e9eb364841c9391 ff4f25dfc62c9df4478549444e9eb364841c9391 ff4f25dfc62c9df4478549444e9eb364841c9391
![Page 10: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/10.jpg)
ASSET STORAGE ISDEAD SIMPLE
ff4f25dfc62c9df4478549444e9eb364841c9391.jpg
![Page 11: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/11.jpg)
COST OF A DUPLICATE COPY IS A DB ROW OF METADATA
They both point to the same data on-disk
![Page 12: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/12.jpg)
EVERY COPY OF
IS THE SAMEff4f25dfc62c9df4478549444e9eb364841c9391
![Page 13: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/13.jpg)
TONS OF OTHER USEFUL PROPERTIES
• Content Addressable - essentially a URN
• Useful for detecting file changes (intentional or not)
• Can be computed using just the file itself (it’s just math)
• Indispensable part of many tools (git, CDNs, TLS)
![Page 14: Hashing for Fun and Profit](https://reader034.fdocuments.net/reader034/viewer/2022052619/5564a58fd8b42a366c8b4d18/html5/thumbnails/14.jpg)
• fin •