V
V
vinograd192013-03-15 20:08:49
Passwords
vinograd19, 2013-03-15 20:08:49

Creating a password list?

I need to create 1000 one time passwords with 6 digits and a validation algorithm based on some key. How to do it?
A little more: there is, for example, the key `top_secret`, you can make passwords according to the principle md5(`top_secret`+`1`), md5(`top_secret`+`2`), etc. but in this case, to check the password, you need to check the database, or iterate over all md5(`top_secret`+`n`).
I would like there to be some simple principle for checking a password for validity of complexity O (1), and not O (N), where N is the number of passwords.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
Puma Thailand, 2013-03-15
@opium

Well, use not hashing, but encryption.

K
KoXGen, 2013-03-16
@KoXGen

If you check for validity only the password itself, then you can get by with a check digit.
We generate a password of 5 digits - 12345, add them up to 1 digit 1+2+3+4+5 = 15 = 1+5 = 6, the final password is 123456.
111115, 111126, 111137, 574108.
The check digit can be shifted anywhere, which reduces the risk that someone will come up with a password.

G
Gribozavr, 2013-03-16
@gribozavr

apg

R
relgames, 2013-03-17
@relgames

What's wrong with the base solution? I generated random passwords once, wrote them to a file, then you can check it even with grep. KISS and all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question