Encryption through multiplication of encoded key Yesterday I finished programming my own encryption program. It is using an input and a key. Here are all the steps it is going through. For an example, let say the input is "Hello" and the key is "Hi"


You take the input and convert it into binary:


01001000 01100101 01101100 01101100 01101111


You make this Binary string into one long string: 

0100100001100101011011000110110001101111
You convert this long binary number into a decimal number:

0100100001100101011011000110110001101111 = 310939249775
You do the same 3 steps above with the key. So the key "Hi" in Decimal is:

18537
You now take the length of the key, in this 2 because "Hi" has 2 characters.
You multiply the two decimal value, and multiply that by the length of the key:

310939249775*18537*2 = 11527761746158350
You lastly convert this big number into Base36(0-9 a-z). This is the final output:

35i90mxoaa6


Now this is how my encryption program works. You can reverse this my dividing the numbers. If someone only has the output but not the key, he has no way to get to the original message right? Also, if this doesn't exist, can I name this the way I want?
It is insecure in the sense that anybody with a calculator can reverse it (and a large set of people without one).

According to the Kerckhoff principle you should tell everybody the algorithm. So there is no security there.

After that an attacker will receive multiple ciphertext (ciphertext only attack). This attacker will quickly find a common divisor for the ciphertext. This common divisor is the key.

Furthermore, there are special values in your plaintext. In principle you don't want to have these in a cryptographic algorithm. Say for instance that you send a single space. In that case you would send bit string 00100000. As you can see there is only one bit set. Multiplication will result in a binary representation of the key "Hi", shifted 5 bits to the left. So an attacker can simply read the key straight from memory. If you can think of such a value, then your cipher is already considered broken.

Finally, a good cipher is a random permutation; a 1:1 mapping of the key to the ciphertext. That's the case in your algorithm, but the permutation is from $N$ to a set $key \times N$. Now you would have to encode this ciphertext efficiently or you end up with very large ciphertext values. This is why most cryptography uses modular arithmetic and XOR (which can be thought of as addition modulus 2).