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

ReproChecksum instead of TimeDateStamp #28

Open
VBoucher opened this issue Apr 21, 2023 · 3 comments
Open

ReproChecksum instead of TimeDateStamp #28

VBoucher opened this issue Apr 21, 2023 · 3 comments
Labels
question Further information is requested

Comments

@VBoucher
Copy link

When I load a PE file, in the NT Header -> File Header, in the place where I should see TimeDateStamp, I see "ReproChecksum" in it's place and the value doesn't make sense.

Any idea why? And how to show the actual compilation date?

@hasherezade
Copy link
Owner

Hi @VBoucher !
This is not a bug. Actually, some of the PEs are build with /Brepro flag. This flag enables reproducible builds. It means, every build from the same code, with the same settings, must have identical hash. That would not be the case if the real timestamp of compilation was stored - on each build the current time will be taken, and this is going to cause a full PE having a new hash.
That's why, in reproducible builds, the timestamps aren't stored. Instead of them, what is stored is the checksum (or a constant 0xFFFFFFFF). You can read more about it here: https://www.amossys.fr/fr/ressources/blog-technique/pe-timestamps-and-bepro-flag/
PE-bear displays this field as ReproChecksum, rather then TimeDateStamp, just to support this convention, and not to mislead the user, because it is not a timestamp in fact.

@hasherezade hasherezade added the question Further information is requested label Apr 21, 2023
@VBoucher
Copy link
Author

Interesting! I didn't know about that. Thanks for the information!
One question in case you know, what would be the point of a build but no change in the code or settings?

@hasherezade
Copy link
Owner

Are you asking for the reason why reproducible builds are even needed?
The same code can be built at different days, by different entities. Someone else can download your code, build it on their machine, with the same settings, and get the same hash of the executable.

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