Hi Jeff,
I don't use a Mac (or any Apple product). But I am sure the OS X command line is Unix-like. OS X is in large-part ripped (for profit) from the free and open BSD operating system, which is closer to Unix. The BSD license allows this kind of behavior (unlike Linux under the GPL) but encourages contributions back into BSD (which Apple in large-part doesn't do, hence my shunning of Apple products). One major difference between Linux/Unix/BSD and OS X I heard about somewhere is that the current (at post time) OS X file system, like Windows, is not case-sensitive. To be fair, Microsoft has ripped a lot of stuff from BSD too. But due to the ubiquitous nature of Windows, I'm (reluctantly) forced to use it in order to make a living. (OK OK... end of rant.)
This article titled "A Security Primer for Mac OS X" says:
"To check a file's md5 checksum, simply open a Terminal window and type the following command: "md5 /path/to/the/file". Then, press return and compare the string returned with the one displayed on the download page."
The above referenced article is here:
http://www.oreillynet.com/pub/a/mac/200 ... urity.html
BUT.. I am suspicious about the command "MD5" in OS X. In BSD MD5(3) is a subroutine. From this site (OS X MAN pages) at:
http://osxfaq.com/man/1/md5sum.ws
Like in Linux, the correct command may be:
md5sum(1)... Which is a "General (1) Command"...
md5sum [-bv] [-c [file]] | [file...]
md5sum generates or checks MD5 checksums. The algorithm to
generate the checksum is reasonably fast and strong enough
for most cases. Exact specification of the algorithm is in
RFC 1321.
Normally md5sum generates checksums of all files given to
it as a parameter and prints the checksums followed by the
filenames. If, however, -c is specified, only one filename
parameter is allowed. This file should contain checksums
and filenames to which these checksums refer to, and the
files listed in that file are checked against the check-
sums listed there. See option -c for more information.
OPTIONS
-b Use binary mode. In unix environment, only differ-
ence between this and the normal mode is an asterix
preceding the filename in the output.
-c Check md5sum of all files listed in file against
the checksum listed in the same file. The actual
format of that file is the same as output of
md5sum. That is, each line in the file describes a
file. A line looks like:
<MD5 checksum> <filename>
So, for example, a file containing checksum for
this manpage would look like(don't worry, if the
checkusum doesn't match, there is a minor problem
in keeping it up to date):
c6514f34ffe6e1ce146e1f17db2c0f90 md5sum.1
-v Be more verbose. Print filenames when checking
(with -c).
You should be able to see the above MAN page output from the OS X command prompt by entering this:
man md5
man md5sum
A quick Google search shows some free third party MD5 check utilities for OS X too.
In strict terms the MD5 algorithm produces a hash (sometimes called a Message Digest), not a checksum, but in this application the terms are loosely interchangeable. There is more information on how MD5 works via these links:
http://en.wikipedia.org/wiki/MD5_hash
http://tools.ietf.org/html/rfc1321
There are known exploits for the MD5 algorithm that can allow modification of the original file while producing the same published MD5 hash. But these exploits are quite difficult to realize while maintaining the same file-size as the original (pre-exploit) file. This is why it is important to provide not only the MD5 hash for a file, but the file size as well. These exploits are rare if the files and MD5 hash are served from from secure sites, especially over TLS (previously named SSL) sessions (thwart man-in-the middle attacks). For all intents and purposes, using an MD5 to verify integrity of your router firmware images will be fine. There are other (perhaps better) file integrity hash-like algorithms available too (sha variants for example). Posting more than one hash integrity check algorithm result string for a file is a good idea if you have the tools.
Last but not least, let us know if your MD5 hash matches the one I posted earlier.
Best Regards, David - Jakarta (GMT+7)