Add ones 0xFF method.

This commit is contained in:
PartialVolume
2021-10-27 23:37:04 +01:00
parent 708c4e02c8
commit 8336653926
3 changed files with 82 additions and 20 deletions

View File

@@ -1975,34 +1975,38 @@ void nwipe_gui_method( void )
{
focus = 0;
}
if( nwipe_options.method == &nwipe_ops2 )
if( nwipe_options.method == &nwipe_one )
{
focus = 1;
}
if( nwipe_options.method == &nwipe_dodshort )
if( nwipe_options.method == &nwipe_ops2 )
{
focus = 2;
}
if( nwipe_options.method == &nwipe_dod522022m )
if( nwipe_options.method == &nwipe_dodshort )
{
focus = 3;
}
if( nwipe_options.method == &nwipe_gutmann )
if( nwipe_options.method == &nwipe_dod522022m )
{
focus = 4;
}
if( nwipe_options.method == &nwipe_random )
if( nwipe_options.method == &nwipe_gutmann )
{
focus = 5;
}
if( nwipe_options.method == &nwipe_verify )
if( nwipe_options.method == &nwipe_random )
{
focus = 6;
}
if( nwipe_options.method == &nwipe_is5enh )
if( nwipe_options.method == &nwipe_verify )
{
focus = 7;
}
if( nwipe_options.method == &nwipe_is5enh )
{
focus = 8;
}
do
{
@@ -2016,6 +2020,7 @@ void nwipe_gui_method( void )
/* Print the options. */
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_zero ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_one ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_ops2 ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_dodshort ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_dod522022m ) );
@@ -2049,6 +2054,20 @@ void nwipe_gui_method( void )
case 1:
mvwprintw( main_window, 2, tab2, "Security Level: high (1 pass)" );
mvwprintw( main_window, 4, tab2, "This method fills the device with ones. Note that the rounds " );
mvwprintw( main_window, 5, tab2, "option does not apply to this method. This method always runs " );
mvwprintw( main_window, 6, tab2, "one round. " );
mvwprintw( main_window, 7, tab2, " " );
mvwprintw( main_window, 8, tab2, "This method might be used when wiping a solid state drive if " );
mvwprintw( main_window, 9, tab2, "an additional level of security is required beyond using the " );
mvwprintw( main_window, 10, tab2, "drives internal secure erase features. Alternatively PRNG may " );
mvwprintw( main_window, 11, tab2, "be preferable. " );
break;
case 2:
mvwprintw( main_window, 2, tab2, "Security Level: higher (8 passes)" );
mvwprintw( main_window, 4, tab2, "The Royal Canadian Mounted Police Technical Security Standard " );
@@ -2060,7 +2079,7 @@ void nwipe_gui_method( void )
mvwprintw( main_window, 10, tab2, "is changed each round. " );
break;
case 2:
case 3:
mvwprintw( main_window, 2, tab2, "Security Level: higher (3 passes)" );
@@ -2073,7 +2092,7 @@ void nwipe_gui_method( void )
mvwprintw( main_window, 10, tab2, "Pass 3: A random number generated data stream " );
break;
case 3:
case 4:
mvwprintw( main_window, 2, tab2, "Security Level: higher (7 passes)" );
@@ -2089,7 +2108,7 @@ void nwipe_gui_method( void )
mvwprintw( main_window, 12, tab2, "Pass 7: A random number generated data stream " );
break;
case 4:
case 5:
mvwprintw( main_window, 2, tab2, "Security Level: Paranoid ! don't waste your time (35 passes)" );
@@ -2099,7 +2118,7 @@ void nwipe_gui_method( void )
mvwprintw( main_window, 7, tab2, "regards to modern hard disk drives. " );
break;
case 5:
case 6:
mvwprintw( main_window, 2, tab2, "Security Level: Depends on Rounds" );
@@ -2112,7 +2131,7 @@ void nwipe_gui_method( void )
mvwprintw( main_window, 10, tab2, "are increased." );
break;
case 6:
case 7:
mvwprintw( main_window, 2, tab2, "Security Level: Not applicable" );
@@ -2121,7 +2140,7 @@ void nwipe_gui_method( void )
break;
case 7:
case 8:
mvwprintw( main_window, 2, tab2, "Security Level: higher (3 passes)" );
@@ -2194,30 +2213,34 @@ void nwipe_gui_method( void )
break;
case 1:
nwipe_options.method = &nwipe_ops2;
nwipe_options.method = &nwipe_one;
break;
case 2:
nwipe_options.method = &nwipe_dodshort;
nwipe_options.method = &nwipe_ops2;
break;
case 3:
nwipe_options.method = &nwipe_dod522022m;
nwipe_options.method = &nwipe_dodshort;
break;
case 4:
nwipe_options.method = &nwipe_gutmann;
nwipe_options.method = &nwipe_dod522022m;
break;
case 5:
nwipe_options.method = &nwipe_random;
nwipe_options.method = &nwipe_gutmann;
break;
case 6:
nwipe_options.method = &nwipe_verify;
nwipe_options.method = &nwipe_random;
break;
case 7:
nwipe_options.method = &nwipe_verify;
break;
case 8:
nwipe_options.method = &nwipe_is5enh;
break;
}

View File

@@ -63,7 +63,8 @@ const char* nwipe_dodshort_label = "DoD Short";
const char* nwipe_gutmann_label = "Gutmann Wipe";
const char* nwipe_ops2_label = "RCMP TSSIT OPS-II";
const char* nwipe_random_label = "PRNG Stream";
const char* nwipe_zero_label = "Zero Fill";
const char* nwipe_zero_label = "Fill With Zeros";
const char* nwipe_one_label = "Fill With Ones";
const char* nwipe_verify_label = "Verify Blank";
const char* nwipe_is5enh_label = "HMG IS5 Enhanced";
@@ -100,6 +101,10 @@ const char* nwipe_method_label( void* method )
{
return nwipe_zero_label;
}
if( method == &nwipe_one )
{
return nwipe_one_label;
}
if( method == &nwipe_verify )
{
return nwipe_verify_label;
@@ -147,6 +152,39 @@ void* nwipe_zero( void* ptr )
return NULL;
} /* nwipe_zero */
void* nwipe_one( void* ptr )
{
/**
* Fill the device with ones.
*/
nwipe_context_t* c;
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 a zero-fill. */
char onefill[1] = { '\xFF' };
nwipe_pattern_t patterns[] = { { 1, &onefill[0] }, // pass 1: 1s
{ 0, NULL } };
/* Run the 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;
} /* nwipe_one */
void* nwipe_verify( void* ptr )
{
/**

View File

@@ -51,6 +51,7 @@ void* nwipe_ops2( void* ptr );
void* nwipe_is5enh( void* ptr );
void* nwipe_random( void* ptr );
void* nwipe_zero( void* ptr );
void* nwipe_one( void* ptr );
void* nwipe_verify( void* ptr );
void calculate_round_size( nwipe_context_t* );