abg man

An Easy Way to Generate Strong Passwords


The strength of passwords is becoming more important these days, as the means to do dictionary and brute force attacks becomes easier on faster processors. Using a long password might help but being able to remember it exactly and type it without mistakes is less likely as the password length grows.
One method of generating a long password, without storing it anywhere is to select a file (either binary or text), do a little bit of processing on it then force the resulting values into the ASCII range 32-127 and output them as characters. It sounds complex but it isn't.

The sample program generates 80 character passwords and copies them to the clipboard.
Here's a sample password:
a{24%01090>d0#HX'\nW70%^70#010^JP^P?ucrv!#&'?zaw]LTh*F/;6X!c,3uz@8fm:t9_$:jmm0H

Strong Password Generator - Using It

Click the Select File button and browse until you find a file. Press Ok. If it loads it correctly you should see the size, just to the right of the word "Offset" and the Generate button will become clickable. When you click it, you should see a very long password under the word "Password". This is copied to the clipboard automatically and you can then paste it into a password field etc.
The optional Modifer button lets you type in any string. this is repeatedly used to mask the bytes. You can also (optionally) select an offset into the selected file. This gives you different passwords as well. You will always get the same password for the same file, modifier and offset values. Remembering those three values, or just the filename if you accept the default blank modifer and 0 offset values is far easier than the very long password it generates.
The file is read into a TStringStream variable s (using a TFileStream). If an non zero offset is specified then the bytes start at the specified offset. After reading, the byte length is trimmed to 80 characters.
It then iterates through every character in the string, 'and'ing it with $7f (127) to clear the top bit and 'or'ing with a byte from the modifier string. If the resulting value is below 32 then it is ored with 32 to make it a printable character. After that it is copied to the Password string and then that is copied to the clipboard.


ADVERTISEMENT
Subscribe to this Blog via Email :

Would love to here from you...