Password Cribs using "Decimal XOR": AWC and SWB
In the digital age, most of us have to use and remember many passwords with differing requirements. We have passwords for email access, passwords for bank accounts, passwords for different forums, passwords for intranets at work, etc. Sometimes it is tempting to keep a "cheat sheet" to jog our memory; however, this can be risky. However, there is a simple method that is relatively secure. The pseudo-code for an easy to implement program that can handle passwords as long as 15 characters is as follows:
(1) Enter a "Master" sentence at least 30 characters long. You MUST remember this sentence so that you can re-enter later when needed. To reuse it, it has to be duplicated again EXACTLY for this algorithm to work. On your crib sheet, you can write a crib for the sentence (but DO NOT write the sentence). For my example, I will use the sentence as follows:
Mary had a little lamb, little
That is exactly 30 characters long, so I can stop there. My crib could be: "Mary" or "Lamb Song". In practice, don't make it this easy. Be more vague, i.e., "Elvis" or "Poem".
(2) Convert this "Master" sentence into it's ASCII Numbers and Store this in a String with NO spaces between the numbers. For this example the ASCII characters are:
77.97.114.121.32.104.97.100.32.97.32.108.105.116.116.108.101.32.108.97.109.98.44.32.108.105.116.116.108.101
and the String is:
779711412132104971003297321081051161161081013210897109984432108105116116108101
(3) Supposed that your password is: bob+maria&billy (See AWC.gif screen shot)
Convert this password into ASCII Numbers, with delimiters between each number as follows:
98.111.98.43.109.97.114.105.97.38.98.105.108.108.121 (The delimiters can be a space or even a comma - it doesn't matter.)
(4) Put the ASCII string of the "Master" Sentence on TOP with the delimited ASCII password underneath lined up on the left and wherever there is a number under a number, ADD WITHOUT ANY CARRY:
(See the attached screen shot: AWC.gif) Notice that the "Master" sentence is truncated because this is all I need for this password. This will give you the encrypted crib for the above password.
(5) To restore to the original password, put the delimited crib on TOP and the ASCII of the "Master" Sentence underneath lined up on the left and wherever there is a number under a number, SUBTRACT WITHOUT ANY BORROWING. This will restore the ASCII of the password, which can then be converted back into the Characters.
(See the attached screen shot: SWB.gif)
Notice the similarity between binary XOR and decimal AWC (Add Without carry) and SWB (Subtract without borrowing). The only difference is that in binary only there is exact symmetry for AWC and SWB, but there is NOT exact symmetry in decimal which is why the positions have to be reversed when using decimal AWC and SWB:
A B A XOR B A AWC and SWB B
1 1 0 0
0 1 1 1
1 0 1 1
0 0 0 0
The program I wrote does all of this automatically, with my delimiter as a space. After the "Master" sentence is entered, my program performs two (2) filtering tests to determine automatically what to do with the Numbers and/or Password entered with a "walk-through", character by character, of the string:
If ANY character is OTHER THAN a number or a space (my delimiter): AWC
JUMP to the Add Without Carry procedure since it MUST be a password.
If ANY character is a space (my delimiter): SWB
JUMP to the Subtract Without Borrowing procedure since it MUST be Numbers and Spaces only.
Any string that has made it to here MUST be ONLY a number: AWC
JUMP to the Add without Carry procedure.
Notice on the screen shots that I have a choice to hide the "Master" sentence after entering it (with astericks). This allows me to leave the program running in the background to AWC and SWB anytime throughout the day without my "Master" sentence displayed.
