Documentation ¶
Index ¶
- func FindFrequencyOfQthPassword(frequencyBlacklist map[string]int, q int) int
- func FindProbabilityOfQthPassword(frequencyBlacklist map[string]int, q int) float64
- func LoadBlacklist(filename string) []string
- func LoadFrequencyBlacklist(filename string, minPasswordLength int) map[string]int
- func PasswordProbability(password string, frequencies map[string]int) float64
- func TotalNumberOfPasswords(frequencies map[string]int) int
- type Checker
- func (checker *Checker) CalculateTypoProbability(correctionType string) float64
- func (checker *Checker) CheckAlways(submittedPassword string) []string
- func (checker *Checker) CheckBlacklist(submittedPassword string, blacklist []string) []string
- func (checker *Checker) CheckOptimal(submittedPassword string, frequencyBlacklist map[string]int, q int) []string
- type CombinationProbability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFrequencyOfQthPassword ¶
FindFrequencyOfQthPassword given the blacklist, find the probability of the qth password in the distribution
func FindProbabilityOfQthPassword ¶
FindProbabilityOfQthPassword given the blacklist, find the probability of the qth password in the distribution
func LoadBlacklist ¶
LoadBlacklist loads a file of high-probability password e.g. ./data/rockyou-1k.txt
func LoadFrequencyBlacklist ¶
LoadFrequencyBlacklist loads a file of frequency + high-probability password e.g. ./data/rockyou-1k-withcount.txt
func PasswordProbability ¶
PasswordProbability calculates the probability of a password in a list
func TotalNumberOfPasswords ¶
TotalNumberOfPasswords returns the total number of passwords
Types ¶
type Checker ¶
Checker represents a checker service...
func NewChecker ¶
NewChecker initialises the Checker
func (*Checker) CalculateTypoProbability ¶
CalculateTypoProbability calculate the probability that a correction is being used using typo frequencies from Chatterjee et al.
func (*Checker) CheckAlways ¶
CheckAlways checks the password and the passwords in the ball by using the given correctors
func (*Checker) CheckBlacklist ¶
CheckBlacklist uses a blacklist of high-probability passwords. It checks the password or any password in the ball only if it isn't in the blacklist
type CombinationProbability ¶
CombinationProbability is the aggregate probability of a set of passwords
func FindOptimalSubset ¶
func FindOptimalSubset(ballProbability map[string]float64, cutoff float64) CombinationProbability
FindOptimalSubset given the ball of a password, will solve a simple optimisation problem to find the set of password such that the total aggregate probability of the set is lower than that of the qth most probable password returns the set with the highest utility