public class ShannonEntropy extends Object implements Entropy
Modifier and Type | Field and Description |
---|---|
static double |
FIRST_PHASE_BONUS
Entropy bonus of the first phase.
|
static int |
FIRST_PHASE_LENGTH
Length of the first phase.
|
static double |
SECOND_PHASE_BONUS
Entropy bonus of the second phase.
|
static int |
SECOND_PHASE_LENGTH
Length of the second phase.
|
static int[] |
SHANNON_COMPOSITION_SIEVE
Array used for determining composition "bonus" for calculating the Shannon entropy estimate.
|
static int[] |
SHANNON_DICTIONARY_SIEVE
Array used for determining dictionary entropy "bonus" for calculating the Shannon entropy estimate.
|
static double |
THIRD_PHASE_BONUS
Entropy bonus of the third phase.
|
static int |
THIRD_PHASE_LENGTH
Length of the second phase.
|
Constructor and Description |
---|
ShannonEntropy(boolean dictionaryCheck,
boolean compositionCheck,
int pwordSize)
Creates a new shannon entropy estimate.
|
Modifier and Type | Method and Description |
---|---|
double |
estimate()
Returns the entropy bits of a user selected password.
|
public static final int FIRST_PHASE_LENGTH
public static final int SECOND_PHASE_LENGTH
public static final int THIRD_PHASE_LENGTH
public static final double FIRST_PHASE_BONUS
public static final double SECOND_PHASE_BONUS
public static final double THIRD_PHASE_BONUS
public static final int[] SHANNON_DICTIONARY_SIEVE
public static final int[] SHANNON_COMPOSITION_SIEVE
public ShannonEntropy(boolean dictionaryCheck, boolean compositionCheck, int pwordSize)
dictionaryCheck
- whether or not a common passwords dictionary is checked against the password (50,000
dictionary words are recommended)compositionCheck
- whether or not at least 1 uppercase and special/symbol character is enforced (not
using common substitutions such as s to $ are recommended)pwordSize
- size of the passwordpublic double estimate()
Copyright © 2003-2024 Virginia Tech. All Rights Reserved.