The DoD 5220.22-M data sanitization method is usually implemented in the following way:
- Pass 1: Writes a zero and verifies the write
- Pass 2: Writes a one and verifies the write
- Pass 3: Writes a random character and verifies the write
You might also come across various iterations of DoD 5220.22-M including DoD 5220.22-M (E), DoD 5220.22-M (ECE), or others. Each will probably use a character and its compliment (as in 1 and 0) and varying frequencies of verifications. Some versions of DoD 5220.22-M write a 97 during the last pass.
Erasing a hard drive using the DoD 5220.22-M data sanitization method will prevent all software based file recovery methods from lifting information from the drive and should also prevent most if not all hardware based recovery methods.
The DoD 5220.22-M sanitization method was originally defined by the US National Industrial Security Program (NISP) in the National Industrial Security Program Operating Manual (NISPOM) located here (PDF) and is one of the most common sanitization methods used in data destruction software.
Most data destruction programs support multiple data sanitization methods in addition to DoD 5220.22-M.
Note: The NISPOM does not define any US government standard for data sanitization. The Cognizant Security Authority (CSA) is responsible for data sanitization standards.
As I understand it, the DoD 5220.22-M method is no longer permitted (nor is any software based data sanitization method) for use by various members of the CSA including the Department of Defense, the Department of Energy, the Nuclear Regulatory Commission, and the Central Intelligence Agency.