Giter Site home page Giter Site logo

eraser's Introduction

eraser

Stupid simple Go binary to overwrite block devices and "wipe them clean".

The idea here is that if you want to overwrite your disk with random data, the /dev/urandom endpoint is pretty slow in supplying enough data quickly. But because almost any modern computer has some form of hardware acceleration for the AES algorithm, you can just encrypt a stream of zeroes with a random key and you'll get pretty decent randomness. The need for 35 Gutman passes is long gone, so this one pass ought the be enough, usually.

NOTE: This only reliably works on spinning disks, not flash disks like SSDs! Use ATA Secure Erase in that case, which deletes the MEK on self-encrypting drives and renders all data useless instantly. Some harddisks also have instant secure erase (ISE) โ€“ you should prefer that.

INSTALLATION

go get github.com/ansemjo/eraser

USAGE

eraser { -rand | -zero } [-direct] [-note] blockdev

Use -rand for the encrypted zerostream described above or -zero to just use zeroes instead.

The -note flag writes a little note with a timestamp to the first 32 bytes of blockdev after successful deletion. You can then head -1 blockdev and see when the disk was deleted later.

With -direct the disk is opened with O_DIRECT, which bypasses most caches and gives a more realistic speed.

The progress spinner calculates the estimated remaining time based on the average speed of the bytes written so far, as I've found that the current average speed is a very bad measure for accurate estimations.

DISCLAIMER

I'm not a cryptographer. This is just a small utility I like to use because I was fed up with copy-pasting a long openssl enc command. Don't trust me with your data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.