Whenever I open a .dmg, my computer says that it is
Verifying… for a moment. I'm just curious as to what it is doing at this time. Is it running a checksum, checking if it is the same as the online version, etc.?
In most cases, your computer is just doing a checksum, to make sure the Apple Disk Image,
.dmg, hasn't been corrupted due to a flakey network connection or hard drive, or from bit-rot, etc. This can let you know about a problem early on, so you don't waste time troubleshooting a bad copy of an app.
Developers also have the ability to codesign
.dmg's (thanks @graham-miln), in which case, this signature will also be verified.