Do you register a lot of accounts on Internet? Do you use a lot of different passwords? Or you use a same password for all accounts? If you use a lot of different passwords, you should have the problem to memorize the passwords or generate the passwords. Then, you should use KeePass.

But I have another problem, I do not want to store all my passwords in the comptuer. So, I need to write some of them down. However, write them down as a plain passwords is not secure. When I go through an article, “How Code Breakers Work”, I have some idea about storing my passwords.

I wrote a simple algorithm to encipher the password into another form, and using the same method to decipher the enciphered password. The algorithm is simple that one can do it without using a computer. Yet calculating manually is quite exhaustive. That is why I wrote the program.

Firstly, assuming all the passwords are the ASCII codes in the range of 0-9, A-Z, and a-z. Then we need to have a master key, which I use the term “cipher key”. The cipher key should also in the range of 0-9, A-Z, and a-z. Then, each character will be given a value, from 0 to 61. The values 0-9 are given to the character 0-9, 10-35 are given to A-Z, and 36-61 are given to a-z.

How the cipher key works in my algorithm? If a cipher key is “1”, and the password is “A”, then encipher will be an addition to the password, the result will be “B”. However, decipher will be a subtraction of the password, if the enciphered password is “B”, and the cipher key is “1”, the result will be “A”.

The cipher key will be repeated to the length of the password. For example, if the cipher key is “12”, and the password is “abcde”, then the cipher key will be lengthen to “12121”. Noted that, if the cipher key is “0” or “0000…”, the result will be the same.

What happen if the enciphered value exceeds 61? The value will be started from 0 again. That means the value 62 will be converted to 0 and so on.

An example of the algorithm:
cipher key: “good”
result: “ZsgWObU”

So, I can write the result to some where else.

﻿You can download the program from here. It should be run in console (as the command-line). The source code is available also.

### 9 Responses to “Password Cipher”

1. guest says :

I came across your program on sourceforge. I tried it but it did not seem to work correctly. After entering the cipher key and password, the program closed. I went through your source code and I think you should a getch() after here:

printf(“You can write it down if you want for the use in future.\n”);

• allencch says :

Thank you for your suggestion. I will modify it based on your suggestion.

2. abhinav8 says :

iam new to open source programs,i want to participate in ur project.will u please tell what will i have to do and how i should start…

• allencch says :

Hi abhinav8, I am happy to know that. If you are willing to participate, then you can register an account at sourceforge.net. Then I can add you to the project. But I would like to inform you that, I have no further planning to the project Password Cipher in the current stage. However, if you have any idea of contribution of the project, I will be very happy for your contribution.

3. T says :

ciphers only work if they are randomly generated – otherwise a skilled hacker can reverse engineer your algorithm use a set of common passwords to hack your passwords. Sorry – this technique isn’t safe.

• allencch says :

Thanks for your comment. I made this cipher is only to encipher the password. Thus, I didn’t consider about the hacking issue. This is because, sometimes we might still need to write down a password at somewhere, in my opinion, this method will help.

4. armaan g says :

what is the cipher for the word ‘password’

• allencch says :

the cipher “key” is needed first. then only can compute.