Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

algorithm problem in sofware project

poochonpoochon Posts: 1Member
hey dudes
we're in a middle of a software project, and we got stuck somewhere. in this part we should do something like this:
1. get a rule that looks like !0-4?2-4@@ that defines a password structure, and a dictionary filename
2. break the rule into parts, !0-4 ?2-4 @ @
each part represents an other rule- let's say !0-4 means the first part of the password should contain between 0 and 4 english chars, ?2-4 means that the second part should contain between 2 and 4 general chars (including %,^ etc), and @ means that we receive a word from a dictionary, so let's say the dictionary has the words "abc" and "asd", a good password (that fits in the rule) is alpha%&abcasd, because we can divide it into alph a%& abc asd and it fits the rule.
3. we get an int n (and here's the hard part), we want to generate the n'th password, so that for different n's we'll get different results. in other words, there is a 1 to 1 correspondence between the n's and the passwords generated by the rule.
the problem is that we can get rules like !0-2!0-2, and then the password aa can be generated in 3 different ways- (aa)(), ()(aa), (a)(a). this ofc gets even more complex for longer and more complex rules.

i'd be glad if someone could help us out here...we're really stuck :

Comments

  • bubbatremellbubbatremell Posts: 39Member
    1. Can you designate a special character as "non-password"? If you could, then you could insert between elements in your password for uniqueness. Like, if * was non-password, then your example becomes
    aa (or aa*), a*a, aa (or *aa, one of them has to have a star).

    2. Can you programmatically restrict possible sequences of password keys? If you could do that, then you wouldn't have to worry about !0-2!0-2 coming up because, per your new definition, it doesn't form a valid password.

    3. I suppose you could say that, for every character, it has a "follow" character. If you generate some character A as the middle part of a rule, and B is A's follow character, then B cannot come after A. However, if you generate A at the end of a rule, B must be the first character in A. Then, every time you see a follow character, you know you have started a new word. I don't know the full rule scheme you are working with, but it stands to reason that some characters might need more than one follow character. Also, it lowers the security of your passwords.
Sign In or Register to comment.