In Wired, Noah Shachtman pointed out that the US Cyber Command logo has a 32-character code inscribed onto its inner gold ring. It is well-known that MD5 produces 128-bit message digests (often represented as 32-character hexadecimal digests) so it surprised few that the code turned out to be an MD5 hash of the organization’s mission statement.

To recreate this hash in Python, type the following into your Python interpreter:

Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from hashlib import md5
>>> ms = "USCYBERCOM plans, coordinates, integrates, synchronizes and conducts activities to: direct the operations and defense of specified Department of Defense information networks and; prepare to, and when directed, conduct full spectrum military cyberspace operations in order to enable actions in all domains, ensure US/Allied freedom of action in cyberspace and deny the same to our adversaries."
>>> o = md5(ms).hexdigest()
>>> print o
9ec4c12949a4f31474f299058ce2b22a
>>> len(o)
32
>>>

Note: The library ‘hashlib’ was added in Python 2.5.

Tags: , , , , ,