Secure File Deleting in C
I need to securely delete a file in C, here is what I do:
fopen
to get a handle of the filelseek
/ftell
fflush
/fclose
the file handleIs that how it's done? Because I read the name "Gutmann 25 passes" in Eraser, so I guess 25 is the number of times the file is overwritten and 'Gutmann' is the Randomization Algorithm?
If you're a Windows 10 user, you can securely delete files using third-party apps like Eraser, file shredder, or Freeraser. Using either of these methods, you can securely delete individual files and folders depending on your preference.
A secure delete application or process prevents the recovery of deleted files by overwriting the file data with meaningless data. Securely erasing data with this procedure is considered a best practice for eliminating sensitive data, and it is a critical task to perform if you sell or give away your computer.
Every time you delete a file from your Linux system using the shift + delete or rm command, it doesn't actually permanently and securely delete the file from the hard disk.
Go to Settings > Security > Advanced and tap Encryption & credentials. Select Encrypt phone if the option isn't already enabled. Next, go to Settings > System > Advanced and tap Reset options. Select Erase all data (factory reset), and press Delete all data.
You can't do this securely without the cooperation of the operating system - and often not even then.
When you open a file and write to it there is no guarantee that the OS is going to put the new file on the same bit of spinning rust as the old one. Even if it does you don't know if the new write will use the same chain of clusters as it did before.
Even then you aren't sure that the drive hasn't mapped out the disk block because of some fault - leaving your plans for world domination on a block that is marked bad but is still readable.
ps - the 25x overwrite is no longer necessary, it was needed on old low density MFM drives with poor head tracking. On modern GMR drives overwriting once is plenty.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With