Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature for version 1.3.4 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# RandPassGenerator
RandPassGenerator 1.3.3

RandPassGenerator 1.3.4

The RandPassGenerator Java application is a simple command-line utility for generating random passwords, passphrases, and raw keys. It is designed very conservatively to ensure that the random values it provides offer full cryptographic strength requested by the user.

Expand All @@ -12,7 +13,7 @@ Go to the directory containing build.xml, and run ant as shown below.

ant jar

This will create build/jar/PassGenerator.jar. Copy the jar file to somewhere convenient where you want to generate passwords or passphrases.
This will create `build/jar/PassGenerator.jar`. Copy the jar file to somewhere convenient where you want to generate passwords or passphrases.

cp build/jar/PassGenerator.jar $HOME

Expand All @@ -28,39 +29,43 @@ The RandPassGenerator can run from a terminal or console. The command-line synta

### Options

-v {Print verbose messages during operation, in addition to logging}
`-v` {Print verbose messages during operation, in addition to logging}

`-str S` {Use generation strength of S bits (default: 160)}

-str S {Use generation strength of S bits (default: 160)}
`-pw N` {Generate N random password of the specified strength}

-pw N {Generate N random password of the specified strength}
`-pp N` {Generate N random passphrases of the specified strength}

-pp N {Generate N random passphrases of the specified strength}
`-k N` {Generate N random keys of the specified strength}

-k N {Generate N random keys of the specified strength}
`-un N` {Generate N random usernames from the prefix list}

-enc {Encrypt generated random key using a random password that is at least a 16 characters (256-bit AES) and write to file named the Key ID (KEY_ID.enc). A prompt for a random password to us will appear. Users should generate a random password to use for encryption prior to generating keys. ("java -jar PassGenerator.jar -pw 1 -str 96" will generate a 16 character password).}
`-enc` {Encrypt generated random key using a random password that is at least a 16 characters (256-bit AES) and write to file named the Key ID (KEY_ID.enc). A prompt for a random password to us will appear. Users should generate a random password to use for encryption prior to generating keys. ("java -jar PassGenerator.jar -pw 1 -str 96" will generate a 16 character password).}

-decrypt {Decrypt encrypted key file using a random password that is at least a 16 characters and save as text file (KEY_ID_decrypted.txt). A prompt for the name of the encrypted file to decrypt will appear, then a prompt for the random password to use will appear.}
`-decrypt` {Decrypt encrypted key file using a random password that is at least a 16 characters and save as text file (KEY_ID_decrypted.txt). A prompt for the name of the encrypted file to decrypt will appear, then a prompt for the random password to use will appear.}

Unusual options:

-pplen M {When generating passphrases, longest word should be M letters long (minimum value of M is 3)}
`-pplen M` {When generating passphrases, longest word should be M letters long (minimum value of M is 3)}

-ppurl U {Use the URL U to load words for passphrase (default: use internal list)}
`-ppurl U` {Use the URL U to load words for passphrase (default: use internal list)}

-pwcs P {Use character pattern P for characters to use in passwords (lowercase, uppercase, number, special character, or combination)}
`-unurl U` {Use the URL U to load prefix for username (default: use internal list)}

-pwcustom F {Use the specified file F as the source of a custom character set; F must be readable}
`-pwcs P` {Use character pattern P for characters to use in passwords (lowercase, uppercase, number, special character, or combination)}

-log F {Log all operations to the log file F (default: ./randpass.log)}
`-pwcustom F` {Use the specified file F as the source of a custom character set; F must be readable}

-out F {Write output to file F (default: writes to stdout)}
`-log F` {Log all operations to the log file F (default: ./randpass.log)}

-c N {Format output passwords and keys in chunks of N characters}
`-out F` {Write output to file F (default: writes to stdout)}

-sep S {For chunk formatting, use S as the separator (default: -)}
`-c N` {Format output passwords and keys in chunks of N characters}

-rcc N {For passphrases - impose random camel-case; randomly uppercase the first N letters (default: 0)}
`-sep S` {For chunk formatting, use S as the separator (default: -)}

`-rcc N` {For passphrases - impose random camel-case; randomly uppercase the first N letters (default: 0)}

At least one of the options -pw, -pp, or -k must be supplied. The keys, passwords, or passphrases produced by RandPassGenerator will be written to the standard output (stdout), so they can easily be redirected to a file. The -out option can also be used to write the output to a file. All messages are written to the standard error (stderr).

Expand Down Expand Up @@ -115,6 +120,7 @@ Example 8: generate 6 passphrases at strength ~100, but using base strength of 9


### Design Information

The foundation of RandPassGenerator is an implementation of the NIST SP800-90 Hash DRBG. It uses entropy, carefully gathered from system sources, to generate quality random output. The internal strength of the DRBG is 192 bits, according to NIST SP800-57, using the SHA-384 algorithm. In accordance with SP800-90, the DRBG is seeded with at least 888 bits of high quality entropy from entropy sources prior to any operation.

This implementation uses the seed mechanism of the Java SecureRandom class for gathering entropy. This implementation performs self-tests at every execution, so that users can be confident that no library problems have affected operation. Two kinds of self-tests are performed:
Expand Down
14 changes: 8 additions & 6 deletions RandPassGenerator/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CHANGES FROM 1.0.1 TO 1.1.0


* Added static method to AbstractDRBG to correctly convert from an unsigned
Java BigInteger to a byte array.
Java BigInteger to a byte array.
Then applied this method everywhere.
Also changed construction of all BigIntegers to ensure they were created
as unsigned when being constructed from a byte array.
Expand All @@ -15,7 +15,7 @@ Then applied this method everywhere.


* Added code to CharacterSet to reset the internal random number buffer when
character set is rebuilt. This was unnecessary, since the buffer 16-bit
character set is rebuilt. This was unnecessary, since the buffer 16-bit
integer contents are independent of character set, but the reviewers specified
it should be done.

Expand Down Expand Up @@ -102,7 +102,7 @@ CHANGES FROM 1.1.3 to 1.1.4
* Enforced de-duped character set for all operations, including
generation, in gen/CharacterSet.java, i.a.w. recommendations from
the reviewers.


* Minor changes to README.txt file.

Expand All @@ -119,13 +119,13 @@ CHANGES FROM 1.1.4 to 1.1.5

CHANGES FROM 1.1.5 to 1.2
*Updated code in RandPassGenerator and RandManager classes to disable saving of entropy to a file at shutdown. Instead of saving entropy to a file during shutdown for later use as the nonce entropy source or using the system time when an entropy file doesn't exist, the same entropy source as the primary entropy input for the DRBG seed is used for the nonce. SP800-90A 8.6.7 states nonce should be a random value with at least (security_strength/2) bits of entropy and the value could be acquired from the same source and at the same time as the entropy input.
*Added Key ID Generator to RandPassGenerator class for key accounting. It generates a KeyID for generated keys using first 64-bits of a hash of the key and current date (YYYYMMDD_hhmmssH1H2H3H4H5H6H7H8H9H10H11H12H13H14H15H16).
*Added Key ID Generator to RandPassGenerator class for key accounting. It generates a KeyID for generated keys using first 64-bits of a hash of the key and current date (YYYYMMDD_hhmmssH1H2H3H4H5H6H7H8H9H10H11H12H13H14H15H16).
*Added key generation transaction log to RandPassGenerator class.
*Added FileEncryption and FileDecryption utilities to allow for output files containing keys to be encrypted and unencrypted using AES and a random password.
*Added FileEncryption and FileDecryption utilities to allow for output files containing keys to be encrypted and unencrypted using AES and a random password.
*Updated README.txt file.

CHANGES FROM 1.2 to 1.3
*Added KeyWrapper and KeyUnwrapper utilities to allow for output files containing keys to be encrypted and unencrypted using AES Key Wrap (NIST SP 800-38F/RFC 3394) and a random password. DPKDF2 is used in these classes as specified in NIST SP 800-132 to derive a 256-bit key encryption key (KEK) from a user inputted random password.
*Added KeyWrapper and KeyUnwrapper utilities to allow for output files containing keys to be encrypted and unencrypted using AES Key Wrap (NIST SP 800-38F/RFC 3394) and a random password. DPKDF2 is used in these classes as specified in NIST SP 800-132 to derive a 256-bit key encryption key (KEK) from a user inputted random password.
*Removed FileEncryption and FileDecryption utilities.
*Updated README.txt file.

Expand All @@ -141,3 +141,5 @@ CHANGES FROM 1.3.2 to 1.3.3
* Improved efficiency of the WordSet random word generation process
* Added the custom character set feature, -pwcustom

CHANGES FROM 1.3.3 to 1.3.4
* Added the username generation feature, -un, -unurl
Loading