Hello all

In a resent conversation about passwords and their strength a friend of mine told me how their passwords can not contain three sequential characters on a keyboard. At first I thought this was just another case of security gone mad. (The more you restrict users the easier attacks become - in this case you can immediately eliminate surrounding keys if you know one - but that's another debate)
However, I've become increasingly intrigued as to how this is done. I've tried searching for modules or keyboard maps, but still can't work out how it's done.
To make things worse, the app in question is web based and could be accessed from anywhere in the world and I'm fairly sure we aren't all using QWERTY US keyboards....
In short, please help me with this conceptually; How do I tell if three key pressed in sequence are next to each other on different keyboards?

Thanks a million,
Smaug.

Update:
Hi all,
Thanks for the insight. To be honest I have no idea if their method is 100% accurate, I just assumed it would be, and as for using cell phones, well I don't think they have ever thought about it!!
As for diagonal sequences, I would assume they check those too, but that makes it far more complex.
Thanks all for you explanations on this question. It seems that however this is done it requires you to know the keyboard layout as the starting point.
Is there any way to detect a users input locale using a CGI script? Perhaps that is where they start.
Thanks again!!

In reply to Keys beside keys on keyboards by Smaug

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.