13 Commits
v0.38 ... v0.39

Author SHA1 Message Date
Martijn van Brummelen
316b707308 release 0.39 2025-09-10 11:10:15 +02:00
Martijn van Brummelen
ae6cd21019 add tag v038.1 2025-09-10 10:21:08 +02:00
Martijn van Brummelen
a01ec958e4 Merge pull request #652 from Knogle/remove-exp-flag
Removed EXPERIMENTAL! comments for ALFG and Xoroshiro due to their ma…
2025-09-09 21:45:27 +02:00
Martijn van Brummelen
ad25e08997 Merge pull request #663 from Knogle/gcc-15-forward-declarations
fix: some declaration changes to satisfy gcc 15
2025-09-09 21:42:21 +02:00
Fabian Druschke
436aa12227 fix: some declaration changes to satisfy gcc 15 2025-06-09 20:05:05 +02:00
Fabian Druschke
764235fc7d Removed EXPERIMENTAL! comments for ALFG and Xoroshiro due to their matured state. Some clarification on ALFG PRNG header, which is actually more a SLFG 2025-03-14 11:06:32 +01:00
PartialVolume
f594d677a7 Merge pull request #651 from Knogle/cleanup
Some cleanup in options.c, added missing xoroshiro256_prng argument in help.
2025-03-13 21:46:35 +00:00
Fabian Druschke
536ead8f2b Some cleanup in options.c, added missing xoroshiro256_prng argument in --help 2025-03-13 12:51:04 +01:00
PartialVolume
c29a17d090 Update version.c
Bumped minor version
2025-03-12 22:58:05 +00:00
PartialVolume
d630e3bd3c Merge pull request #648 from Knogle/bruce-7
Implement Bruce Schneier 7-Pass wiping method
2025-03-12 22:44:32 +00:00
Fabian Druschke
997a1867cf Implement Bruce Schneier 7-Pass wiping method
- Added a new wiping method following the Bruce Schneier 7-Pass standard.
- Overwrites the device with:
  - Pass 1: All ones (0xFF)
  - Pass 2: All zeroes (0x00)
  - Pass 3-7: Five passes of PRNG-generated random data.
- Updated method.h with the function prototype for `nwipe_bruce7`.
- Added `nwipe_bruce7()` implementation in method.c.
- Registered method label in `nwipe_method_label()`.
- Updated UI in options.c to display security level and details.
2025-03-08 18:18:13 +01:00
PartialVolume
ddb0329f03 Merge pull request #643 from PartialVolume/Fix_sandisk_endian_on_some_chipsets
Fix model name Endian for Sandisk-SunDisk drives
2025-02-09 17:11:02 +00:00
PartialVolume
b21860d336 Fix model name Endian for Sandisk-SunDisk drives 2025-02-09 17:05:57 +00:00
12 changed files with 132 additions and 45 deletions

View File

@@ -1,6 +1,11 @@
RELEASE NOTES
=============
v0.39
-----------------------
- Removed EXPERIMENTAL! comments for ALFG and Xoroshiro. [#652](https://github.com/martijnvanbrummelen/nwipe/pull/652) Thanks @Knogle
- Fix: some declaration changes to satisfy gcc 15. [#663]((https://github.com/martijnvanbrummelen/nwipe/pull/663) Thanks @Knogle
v0.38
-----------------------
includes the following changes:

View File

@@ -20,6 +20,9 @@
* damages, or other liability, whether in an action of contract, tort, or otherwise, arising
* from, out of, or in connection with the software or the use or other dealings in the software.
*
* Actually it uses subtraction as the core operation, making it conceptually closer to a
* "Subtractive Lagged Fibonacci Generator" (SLFG) variant, but well..
*
* Note: This implementation is designed for non-cryptographic applications and should not be
* used where cryptographic security is required.
*/

View File

@@ -26,7 +26,7 @@
void customer_processes( int );
void select_customers( int, char** );
void delete_customer();
void delete_customer( int, char** );
void add_customer();
void write_customer_csv_entry( char*, char*, char*, char* );
void delete_customer_csv_entry( int* );

View File

@@ -2305,7 +2305,7 @@ void nwipe_gui_method( void )
extern int terminate_signal;
/* The number of implemented methods. */
const int count = 10;
const int count = 11;
/* The first tabstop. */
const int tab1 = 2;
@@ -2367,6 +2367,10 @@ void nwipe_gui_method( void )
{
focus = 9;
}
if( nwipe_options.method == &nwipe_bruce7 )
{
focus = 10;
}
do
{
@@ -2389,6 +2393,7 @@ void nwipe_gui_method( void )
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_verify_zero ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_verify_one ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_is5enh ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_bruce7 ) );
mvwprintw( main_window, yy++, tab1, " " );
/* Print the cursor. */
@@ -2524,6 +2529,19 @@ void nwipe_gui_method( void )
mvwprintw( main_window, 10, tab2, "device to verify the PRNG stream was " );
mvwprintw( main_window, 11, tab2, "successfully written. " );
break;
case 10:
mvwprintw( main_window, 2, tab2, "Security Level: very high (7 passes)" );
mvwprintw( main_window, 4, tab2, "Bruce Schneier 7-Pass Wiping Method: " );
mvwprintw( main_window, 5, tab2, "A secure erasure technique developed by the " );
mvwprintw( main_window, 6, tab2, "renowned cryptographer Bruce Schneier. " );
mvwprintw( main_window, 7, tab2, " " );
mvwprintw( main_window, 8, tab2, "This method first overwrites the device with " );
mvwprintw( main_window, 9, tab2, "ones (0xFF), followed by zeroes (0x00). Then, " );
mvwprintw( main_window, 10, tab2, "it performs five additional passes of PRNG- " );
mvwprintw( main_window, 11, tab2, "generated random data to maximize security. " );
break;
} /* switch */
@@ -2619,6 +2637,10 @@ void nwipe_gui_method( void )
case 9:
nwipe_options.method = &nwipe_is5enh;
break;
case 10:
nwipe_options.method = &nwipe_bruce7;
break;
}
} /* nwipe_gui_method */

View File

@@ -25,8 +25,7 @@ MODIFIED:
*(r++) = b = ind(mm,y>>RANDSIZL) + x; \
}
void isaac(ctx)
randctx *ctx;
void isaac(randctx *ctx)
{
register ub4 a,b,x,y,*m,*mm,*m2,*r,*mend;
mm=ctx->randmem;
@@ -64,9 +63,7 @@ randctx *ctx;
}
/* if (flag==TRUE), then use the contents of randrsl[] to initialize mm[]. */
void randinit(ctx, flag)
randctx *ctx;
word flag;
void randinit(randctx *ctx, word flag)
{
word i;
ub4 a,b,c,d,e,f,g,h;

View File

@@ -32,10 +32,9 @@ typedef struct randctx randctx;
If (flag==TRUE), then use the contents of randrsl[0..RANDSIZ-1] as the seed.
------------------------------------------------------------------------------
*/
void randinit(/*_ randctx *r, word flag _*/);
void isaac(/*_ randctx *r _*/);
void randinit(randctx *r, word flag);
void isaac(randctx *r);
/*
------------------------------------------------------------------------------

View File

@@ -68,6 +68,7 @@ const char* nwipe_one_label = "Fill With Ones";
const char* nwipe_verify_zero_label = "Verify Zeros (0x00)";
const char* nwipe_verify_one_label = "Verify Ones (0xFF)";
const char* nwipe_is5enh_label = "HMG IS5 Enhanced";
const char* nwipe_bruce7_label = "Bruce Schneier 7-Pass";
const char* nwipe_unknown_label = "Unknown Method (FIXME)";
@@ -118,6 +119,10 @@ const char* nwipe_method_label( void* method )
{
return nwipe_is5enh_label;
}
if( method == &nwipe_bruce7 )
{
return nwipe_bruce7_label;
}
/* else */
return nwipe_unknown_label;
@@ -750,6 +755,50 @@ void* nwipe_random( void* ptr )
return NULL;
} /* nwipe_random */
void* nwipe_bruce7( void* ptr )
{
/**
* Bruce Schneier 7-Pass wiping method.
*
* Pass 1: Overwrite the drive with all ones (0xFF).
* Pass 2: Overwrite the drive with all zeroes (0x00).
* Pass 3-7: Overwrite the drive with five passes of random data.
*/
nwipe_context_t* c = (nwipe_context_t*) ptr;
/* Get current time at the start of the wipe */
time( &c->start_time );
/* Set wipe in progress flag for GUI */
c->wipe_status = 1;
/* Setup for Bruce Schneier 7-Pass method */
char onefill[1] = { '\xFF' };
char zerofill[1] = { '\x00' };
nwipe_pattern_t patterns[] = {
{ 1, &onefill[0] }, // Pass 1: Overwrite with ones
{ 1, &zerofill[0] }, // Pass 2: Overwrite with zeroes
{ -1, "" }, // Pass 3: Random data
{ -1, "" }, // Pass 4: Random data
{ -1, "" }, // Pass 5: Random data
{ -1, "" }, // Pass 6: Random data
{ -1, "" }, // Pass 7: Random data
{ 0, NULL } // Terminate pattern array
};
/* Run the Bruce Schneier 7-Pass method */
c->result = nwipe_runmethod( c, patterns );
/* Finished. Set the wipe_status flag so that the GUI knows */
c->wipe_status = 0;
/* Get current time at the end of the wipe */
time( &c->end_time );
return NULL;
}
int nwipe_runmethod( nwipe_context_t* c, nwipe_pattern_t* patterns )
{
/**

View File

@@ -54,6 +54,7 @@ void* nwipe_zero( void* ptr );
void* nwipe_one( void* ptr );
void* nwipe_verify_zero( void* ptr );
void* nwipe_verify_one( void* ptr );
void* nwipe_bruce7( void* ptr );
void calculate_round_size( nwipe_context_t* );

View File

@@ -684,6 +684,22 @@ void fix_endian_model_names( char* model )
{
swap_endian_flag = 1;
}
else
{
/* Sundisk - Sandisk SSD from Sun AXI */
if( !( strncmp( model_lower_case, "usdnsi k", 8 ) ) )
{
swap_endian_flag = 1;
}
else
{
/* Sandisk */
if( !( strncmp( model_lower_case, "asdnsi k", 8 ) ) )
{
swap_endian_flag = 1;
}
}
}
}
}
}

View File

@@ -386,6 +386,11 @@ int nwipe_options_parse( int argc, char** argv )
nwipe_options.method = &nwipe_is5enh;
break;
}
if( strcmp( optarg, "bruce7" ) == 0 )
{
nwipe_options.method = &nwipe_bruce7;
break;
}
/* Else we do not know this wipe method. */
fprintf( stderr, "Error: Unknown wipe method '%s'.\n", optarg );
@@ -605,37 +610,25 @@ void nwipe_options_log( void )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Mersenne Twister" );
}
else if( nwipe_options.prng == &nwipe_add_lagg_fibonacci_prng )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Lagged Fibonacci generator" );
}
else if( nwipe_options.prng == &nwipe_xoroshiro256_prng )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = XORoshiro-256" );
}
else if( nwipe_options.prng == &nwipe_isaac )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac" );
}
else if( nwipe_options.prng == &nwipe_isaac64 )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac64" );
}
else
{
if( nwipe_options.prng == &nwipe_add_lagg_fibonacci_prng )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Lagged Fibonacci generator (EXPERIMENTAL!)" );
}
else
{
if( nwipe_options.prng == &nwipe_xoroshiro256_prng )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = XORoshiro-256 (EXPERIMENTAL!)" );
}
else
{
if( nwipe_options.prng == &nwipe_isaac )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac" );
}
else
{
if( nwipe_options.prng == &nwipe_isaac64 )
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac64" );
}
else
{
nwipe_log( NWIPE_LOG_NOTICE, " prng = Undefined" );
}
}
}
}
nwipe_log( NWIPE_LOG_NOTICE, " prng = Undefined" );
}
nwipe_log( NWIPE_LOG_NOTICE, " method = %s", nwipe_method_label( nwipe_options.method ) );
@@ -710,11 +703,13 @@ void display_help()
puts( " one - Overwrite with ones (0xFF)" );
puts( " verify_zero - Verifies disk is zero filled" );
puts( " verify_one - Verifies disk is 0xFF filled" );
puts( " is5enh - HMG IS5 enhanced\n" );
puts( " is5enh - HMG IS5 enhanced\n" );
puts( " bruce7 - Schneier Bruce 7-pass mixed pattern\n" );
puts( " -l, --logfile=FILE Filename to log to. Default is STDOUT\n" );
puts( " -P, --PDFreportpath=PATH Path to write PDF reports to. Default is \".\"" );
puts( " If set to \"noPDF\" no PDF reports are written.\n" );
puts( " -p, --prng=METHOD PRNG option (mersenne|twister|isaac|isaac64|add_lagg_fibonacci_prng)\n" );
puts( " -p, --prng=METHOD PRNG option "
"(mersenne|twister|isaac|isaac64|add_lagg_fibonacci_prng|xoroshiro256_prng)\n" );
puts( " -q, --quiet Anonymize logs and the GUI by removing unique data, i.e." );
puts( " serial numbers, LU WWN Device ID, and SMBIOS/DMI data" );
puts( " XXXXXX = S/N exists, ????? = S/N not obtainable\n" );

View File

@@ -260,7 +260,7 @@ int nwipe_isaac64_read( NWIPE_PRNG_READ_SIGNATURE )
return 0;
}
/* EXPERIMENTAL implementation of Lagged Fibonacci generator a lot of random numbers */
/* Implementation of Lagged Fibonacci generator a lot of random numbers */
int nwipe_add_lagg_fibonacci_prng_init( NWIPE_PRNG_INIT_SIGNATURE )
{
if( *state == NULL )
@@ -274,7 +274,7 @@ int nwipe_add_lagg_fibonacci_prng_init( NWIPE_PRNG_INIT_SIGNATURE )
return 0;
}
/* EXPERIMENTAL implementation of XORoroshiro256 algorithm to provide high-quality, but a lot of random numbers */
/* Implementation of XORoroshiro256 algorithm to provide high-quality, but a lot of random numbers */
int nwipe_xoroshiro256_prng_init( NWIPE_PRNG_INIT_SIGNATURE )
{
nwipe_log( NWIPE_LOG_NOTICE, "Initialising XORoroshiro-256 PRNG" );

View File

@@ -4,7 +4,7 @@
* used by configure to dynamically assign those values
* to documentation files.
*/
const char* version_string = "0.38";
const char* version_string = "0.38.1";
const char* program_name = "nwipe";
const char* author_name = "Martijn van Brummelen";
const char* email_address = "git@brumit.nl";
@@ -15,4 +15,4 @@ Nick Law <shredos.eraser@gmail.com> (@PartialVolume) and others\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS\n\
FOR A PARTICULAR PURPOSE.\n";
const char* banner = "nwipe 0.38";
const char* banner = "nwipe 0.38.1";