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

Simple password entropy check CPU time approaches heat death of the universe #6

Closed
melezov opened this issue Feb 8, 2017 · 2 comments

Comments

@melezov
Copy link

melezov commented Feb 8, 2017

It seems that running it against relatively simple, albeit long password such as aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa seems to exceed what little CPU power we have here in our data centre, effectively making our system very secure by being very dead.

Is there anything that could we could do (configuration-wise) except slicing it up or taking a substring?

Example repro via standalone jar:

>java -jar nbvcxz-1.3.1.jar
Commands: estimate password (e); generate password (g); quit (q)
Please enter your command:
e
Please enter the password to estimate:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

The aaa example is just for the repro, in reality our password field (was) unbounded.

@Tostino
Copy link
Collaborator

Tostino commented Feb 9, 2017

Looking into it. I had tested with long passwords previously, there must have been a regression that didn't get caught in the unit tests.

Thank you for bringing it to my attention.

@Tostino
Copy link
Collaborator

Tostino commented Feb 9, 2017

Alright, this was fixed with something I was planning on implementing eventually, due to this issue being possible.

I implemented a timeout for the findBestMatches algorithm which can be configured. If it exceeds the time specified, it will fallback to the findGoodEnoughMatches algorithm which is much faster, but also less likely to find the optimal match combination.

Commit: a61cb5f

@Tostino Tostino closed this as completed Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants