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

Add ability to run in fixed-time #83

Open
Tostino opened this issue Jan 31, 2023 · 3 comments
Open

Add ability to run in fixed-time #83

Tostino opened this issue Jan 31, 2023 · 3 comments

Comments

@Tostino
Copy link
Collaborator

Tostino commented Jan 31, 2023

We should have the ability to run the estimate method within a fixed timeframe.

If the algorithms within fail to calculate within the specified timeframe, we should still return a Result that contains a Match that specifies that this was timed out and the password will be rejected for that reason.

This should allow safer use within backend systems regardless of algorithmic complexity vulnerabilities existing with certain inputs.

@MrWook
Copy link

MrWook commented Apr 16, 2023

Shouldn't it return a full score for the password if the password strength check takes too long to calculate the strength of the password ?
Shouldn't this password be pretty strong?

@Tostino
Copy link
Collaborator Author

Tostino commented Apr 16, 2023

It could be, or it could be a payload that is intended to exploit the algorithm in a complexity attack. I was erring on the side of caution here, but it could be argued either way.

@MrWook
Copy link

MrWook commented Apr 17, 2023

If the payload is intended to exploit the algorithm wouldn't it be a safe password too?
Something like

const zxcvbn = require("zxcvbn");
attackStr = '\x00\x00' + ('\x00'.repeat(54773)) + '\n'
zxcvbn(attackStr)

From dropbox/zxcvbn#327 would i consider safe with 54775 characters and i guess others are also more about large strings than short ones

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