Re:Microsoft Put Off Fixing Zero Day for 2 Years
by Lammy on Monday August 17, 2020 @07:31AM
(#24186193)
If you hashed the entire file you wouldn't be able to append that hash to the file for distribution because it would change the hash of the file. That's why FOSS software signatures are usually MD5/SHAwhatever in a separate text file.
[ Parent
| on HN ]
Re:Microsoft Put Off Fixing Zero Day for 2 Years
by wwright on Monday August 17, 2020 @12:18PM
(#24188655)
The format could still be "hash of everything else + everything else"
Re:Microsoft Put Off Fixing Zero Day for 2 Years
by hnick on Monday August 17, 2020 @09:03PM
(#24194219)
You can, if the consuming system is format-aware. I think MSI can fall into that category.
I developed something like this to put an md5 hash in a comment in the first line of a code module at a place I worked. It simply read the file, removed that line, and hashed the rest of the file data to generate the hash for comparison.
This was just to stop programmers changing the code without submitting it to a secondary system for validation/tracking (easy to work around, but that shows intent to bypass policies when we see it in the repo).