Often when I run a .exe file in Windows, a small box pops up that shows that file is from a verified publisher (e.g Microsoft) or in other case, unknown publisher.
I know public key encryption can guarantee the integrity of a file. The questions here are:
Does Windows calculate the whole content of the file? Because I doubt it does that, since some files are very large, e.g several GB and Windows shows verified publisher after just a few seconds. If I copy that same file, it takes around tens minutes, so I assume the time to read the whole content of the file is much longer than just several seconds.
If Windows does not read the whole content of the file, how can it guarantee the files integrity? E.g if some parts of the file are injected with malfunction code, I think the only way is to read the whole file's content and then calculate checksum. I can't see anyway to verify integrity without reading the whole file's content
In some cases where I downloaded a large file, e.g Visual express iso file, and then mount it. When I run setup file, it shows that file is from a verified publisher, e.g Microsoft. The problem is that, the setup file's size is only several MBs, and it installs the content of several GBs. So does the verification of the small file (setup file) guarantee the content of related files (often much bigger). If this is the case, how can it be done and done very fast)?