Secure File Erase Overview
The secure file erase will overwrite the file using the selected algorithm, change the file length to zero, change the file date to 1/1/2034, and rename the file to a random file name. In this way not only the data is overwritten but it will be impossible to see the length, date, or name of the file.
Here are the supported secure erase algorithms:
- Null. Perform a single pass and overwrite files with null with no verification.
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- Random. Perform a single pass and overwrite files with cryptographically strong random values with no verification.
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- Dod3. U.S. Department of Defense's standard National Industrial Security Program Operating Manual DoD 5220.22-M Wipe Method
Three passes. First pass all zeroes then verify, second pass all ones then verify, third pass random values then verify. The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- Dod7. U.S. Department of Defense's standard National Industrial Security Program Operating Manual (US DoD 5220.22-M ECE) Wipe Method
Seven passes. Passes 1-3 Overwrite the data with the DoD 5220.22-M Standard then verify, Pass 4 Overwrite with Random Data then verify, Pass 5-7 Overwrite the data with the DoD 5220.22-M Standard then verify. The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- Gutmann. Gutmann overwrite with 35 passes with no verification
https://en.wikipedia.org/wiki/Gutmann_method
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- NAVSO3. US Navy NAVSO P-5239-26 Wipe Method, Same algorithm as HMG Infosec Standard 5, AFSSI-5020
Three passes. First pass all ones no verify, second pass all zeroes no verify, third pass random values then verify
https://fas.org/irp/doddir/navy/5239_26.htm
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- Schneier. Seven passes no verification. First pass all ones, second pass all zeroes, third to seven random values
https://www.lifewire.com/what-is-the-schneier-method-2626000
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- VSITR. German VSITR Wipe Method
Seven passes no verification. Alternating passes of zeroes and ones with the last pass being random data
https://www.lifewire.com/what-is-the-vsitr-method-2626047
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- AR38019. US Army AR 380-19 Wipe Method
Three passes. First pass random characters. Second pass zeros. Third pass ones with verification.
https://www.lifewire.com/what-is-the-ar-380-19-method-2625791
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- GOSTR5073995. Russian GOST R 50739-95 Version 2 Wipe Method
Two passes of random characters with no verification
https://www.lifewire.com/gost-r-50739-95-2625890
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
- AFSSI5020. US Air Force AFSSI-5020 Wipe Method
https://www.lifewire.com/what-is-the-afssi-5020-method-2625789
Three passes. First pass all zeroes no verify, second pass all ones no verify, third pass random values then verify
The file will be truncated to zero bytes to hide the length. All file dates will be set to 1/1/2034 to hide the original date. The file will be randomly named to hide the original name.
C# |
Copy Code |
Encryption encryption = new Encryption(); //Trial Mode
//Encryption encryption = new Encryption("place user name here", "place license key here"); //License Mode
string testFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testfile.txt");
File.WriteAllText(testFile, "This is a test");
Stopwatch watch = new Stopwatch();
watch.Start();
encryption.SecureFileErase(testFile, SecureEraseAlgorithm.Dod7);
watch.Stop();
Console.WriteLine("Elapsed: " + watch.ElapsedMilliseconds);
bool fileExists = File.Exists(testFile);
Console.WriteLine("File Exists: {0}", fileExists); |
VB.NET |
Copy Code |
Dim encryption As New Encryption() 'Trial Mode
'Encryption encryption = new Encryption("place user name here", "place license key here"); //License Mode
Dim testFile As String = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testfile.txt")
File.WriteAllText(testFile, "This is a test")
Dim watch As New Stopwatch()
watch.Start()
encryption.SecureFileErase(testFile, SecureEraseAlgorithm.Dod7)
watch.Stop()
Console.WriteLine("Elapsed: " & watch.ElapsedMilliseconds)
Dim fileExists As Boolean = File.Exists(testFile)
Console.WriteLine("File Exists: {0}", fileExists) |