2019-11-09 10:17:44 -05:00
|
|
|
# nwipe
|
2020-01-13 01:22:36 -05:00
|
|
|

|
|
|
|
|

|
2019-11-09 10:17:44 -05:00
|
|
|
|
2019-12-03 21:49:02 +00:00
|
|
|
nwipe is a program that will securely erase disks. It can operate as both a command line
|
2019-12-03 22:18:10 +00:00
|
|
|
tool without a GUI or with an ncurses GUI as shown in the example below. It can wipe multiple
|
|
|
|
|
disks simultaneously.
|
2019-12-03 21:49:02 +00:00
|
|
|
|
|
|
|
|
The user can select from a variety of recognised secure erase methods which include:
|
2019-12-03 20:40:45 +00:00
|
|
|
|
2019-12-27 13:55:16 -05:00
|
|
|
* Zero Fill - Fills the device with zeros, one round only.
|
2019-12-03 20:40:45 +00:00
|
|
|
* RCMP TSSIT OPS-II - Royal Candian Mounted Police Technical Security Standard, OPS-II
|
2019-12-27 13:55:16 -05:00
|
|
|
* DoD Short - The American Department of Defense 5220.22-M short 3 pass wipe (passes 1, 2 & 7).
|
|
|
|
|
* DoD 5220.22M - The American Department of Defense 5220.22-M full 7 pass wipe.
|
|
|
|
|
* Gutmann Wipe - Peter Gutmann's method (Secure Deletion of Data from Magnetic and Solid-State Memory).
|
2019-12-03 20:40:45 +00:00
|
|
|
* PRNG Stream - Fills the device with a stream from the PRNG.
|
|
|
|
|
* Verify only - This method only reads the device and checks that it is all zero.
|
2019-12-28 21:39:28 +00:00
|
|
|
* HMG IS5 enhanced - Secure Sanitisation of Protectively Marked Information or Sensitive Information
|
2019-12-03 20:40:45 +00:00
|
|
|
|
|
|
|
|
It also includes the following pseudo random number generators:
|
2019-12-28 19:10:22 +00:00
|
|
|
* Mersenne Twister
|
|
|
|
|
* ISAAC
|
2019-12-03 20:40:45 +00:00
|
|
|
|
|
|
|
|
It is a fork of the dwipe command used by
|
2019-12-03 20:50:12 +00:00
|
|
|
Darik's Boot and Nuke (dban). nwipe is included with [partedmagic](https://partedmagic.com) and
|
|
|
|
|
[ShredOS](https://github.com/nadenislamarre/shredos) if you want a quick and easy bootable CD or USB version.
|
2019-12-03 20:40:45 +00:00
|
|
|
|
|
|
|
|
Nwipe was created out of a need to run the DBAN dwipe command outside
|
|
|
|
|
of DBAN, in order to allow its use with any host distribution, thus
|
|
|
|
|
giving better hardware support.
|
2017-02-12 22:30:00 +01:00
|
|
|
|
2019-12-04 23:59:49 +00:00
|
|
|

|
2019-12-03 21:40:27 +00:00
|
|
|
|
2019-11-09 10:17:44 -05:00
|
|
|
## Compiling & Installing
|
|
|
|
|
|
|
|
|
|
`nwipe` requires the following libraries to be installed:
|
|
|
|
|
|
|
|
|
|
* ncurses
|
|
|
|
|
* pthreads
|
|
|
|
|
* parted
|
|
|
|
|
|
|
|
|
|
### Debian & Ubuntu prerequisites
|
|
|
|
|
|
|
|
|
|
If you are compiling `nwipe` from source, the following libraries will need to be installed first:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
sudo apt install \
|
|
|
|
|
build-essential \
|
|
|
|
|
pkg-config \
|
|
|
|
|
automake \
|
|
|
|
|
libncurses5-dev \
|
|
|
|
|
autotools-dev \
|
2019-11-09 21:06:08 +00:00
|
|
|
libparted-dev \
|
|
|
|
|
dmidecode
|
2019-11-09 10:17:44 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Fedora prerequisites
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
sudo bash
|
|
|
|
|
dnf update
|
|
|
|
|
dnf groupinstall "Development Tools"
|
|
|
|
|
dnf groupinstall "C Development Tools and Libraries"
|
|
|
|
|
yum install ncurses-devel
|
|
|
|
|
yum install parted-devel
|
2019-11-09 21:06:08 +00:00
|
|
|
yum install dmidecode
|
2019-11-09 10:17:44 -05:00
|
|
|
```
|
2019-11-09 21:06:08 +00:00
|
|
|
Note. dmidecode is optional, it provides SMBIOS/DMI host data to stdout or the log file.
|
2019-11-09 10:17:44 -05:00
|
|
|
|
|
|
|
|
### Compilation
|
|
|
|
|
|
|
|
|
|
For a development setup, see [the hacking section below](#Hacking).
|
|
|
|
|
|
|
|
|
|
First create all the autoconf files:
|
|
|
|
|
```
|
|
|
|
|
./init.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then compile & install using the following standard commands:
|
|
|
|
|
```
|
|
|
|
|
./configure
|
|
|
|
|
make
|
|
|
|
|
make install
|
|
|
|
|
```
|
|
|
|
|
|
2019-12-03 22:55:50 +00:00
|
|
|
Then run nwipe !
|
|
|
|
|
```
|
|
|
|
|
cd src
|
|
|
|
|
sudo ./nwipe
|
|
|
|
|
```
|
2019-12-03 23:01:30 +00:00
|
|
|
or
|
|
|
|
|
```
|
|
|
|
|
sudo nwipe
|
|
|
|
|
```
|
2019-12-03 22:55:50 +00:00
|
|
|
|
2019-11-09 10:17:44 -05:00
|
|
|
### Hacking
|
|
|
|
|
|
|
|
|
|
If you wish to submit pull requests to this code we would prefer you enable all warnings when compiling.
|
|
|
|
|
This can be done using the following compile commands:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
./configure --prefix=/usr CFLAGS='-O0 -g -Wall -Wextra'
|
|
|
|
|
make
|
|
|
|
|
make install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The `-O0 -g` flags disable optimisations. This is required if you're debugging with
|
|
|
|
|
`gdb` in an IDE such as Kdevelop. With these optimisations enabled you won't be
|
|
|
|
|
able to see the values of many variables in nwipe, not to mention the IDE won't step
|
|
|
|
|
through the code properly.
|
|
|
|
|
|
|
|
|
|
The `-Wall` and `-Wextra` flags enable all compiler warnings. Please submit code with zero warnings.
|
|
|
|
|
|
2020-01-12 13:02:36 -05:00
|
|
|
Also make sure that your changes are consistent with the coding style defined in the `.clang-format` file, using:
|
|
|
|
|
```
|
|
|
|
|
make format
|
|
|
|
|
```
|
|
|
|
|
You will need `clang-format` installed to use the `format` command.
|
|
|
|
|
|
|
|
|
|
|
2019-11-09 10:17:44 -05:00
|
|
|
Once done with your coding then the released/patch/fixed code can be compiled,
|
|
|
|
|
with all the normal optimisations, using:
|
|
|
|
|
```
|
|
|
|
|
./configure --prefix=/usr && make && make install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Bugs
|
|
|
|
|
|
|
|
|
|
Bugs can be reported on GitHub:
|
|
|
|
|
https://github.com/martijnvanbrummelen/nwipe
|
2017-02-12 22:30:00 +01:00
|
|
|
|
2019-11-09 10:17:44 -05:00
|
|
|
## License
|
2017-02-12 22:30:00 +01:00
|
|
|
|
2019-11-09 10:17:44 -05:00
|
|
|
GNU General Public License v2.0
|