diff --git a/man/stenc.1 b/man/stenc.1 index 4c0941f..984a751 100644 --- a/man/stenc.1 +++ b/man/stenc.1 @@ -27,7 +27,7 @@ Allows you to manage hardware encryption on SSP enabled tape devices (LTO4, LTO5 .SH OPTIONS .TP \fB\-g \fIlength\fR \fB\-k\fR \fB\fR [\fB\-kd\fR \fI\fR] -Generates a key file of \fIlength\fR (in bits) containing a random hexadecimal key. After entering this option, you will be required to press random keys followed by the enter key. This will seed the random number generator so that your key is more secure. Specify the file to save the key into with the -k option (you will need write permissions to that file location). Lastly you can enter an optional key description using the -kd flag (see \fIKEY DESCRIPTORS\fR). This key file can then be used with the \fB\-k\fR option. You should not generate a key file over an unsecured remote session. Typically, key files should be set to 256 bits (32 hexadecimal bytes), however your device may only support 128 bits. +Generates a key file of \fIlength\fR (in bits) containing a random hexadecimal key. After entering this option, you will be required to press random keys followed by the enter key. This will seed the random number generator so that your key is more secure. On systems with \fB/dev/random\fR, the key is automatically generated from the random content read from this file. Specify the file to save the key into with the -k option (you will need write permissions to that file location). Lastly you can enter an optional key description using the -kd flag (see \fIKEY DESCRIPTORS\fR). This key file can then be used with the \fB\-k\fR option. You should not generate a key file over an unsecured remote session. Typically, key files should be set to 256 bits (32 hexadecimal bytes), however your device may only support 128 bits. .TP \fB\-f\fR \fIdevice\fR diff --git a/src/main.cpp b/src/main.cpp index 6684bbf..6edaa62 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -550,21 +550,35 @@ std::string timestamp(){ string randomKey(int length) { - cout<<"Enter random keys on the keyboard to seed the generator."<(&rnd), 1); + retval <