Pages

Monday, November 25, 2013

Code 61 : Multiplicative Cipher

Multiplicative Cipher

Principle

Each character of the used alphabet is assigned to a value. If the alphabet of capital letters A-Z is used, this assignment results:
ABCDEFGHIJKLM
0123456789101112
             
NOPQRSTUVWXYZ
13141516171819202122232425
Now a key between 1 and 26 is chosen. Each character in the message is multiplied with this key. For illustration purposes we use the message "GEHEIMNIS" and the key 3. The first character G corresponds to the six. 6*3=18. The 18th character in the used alphabet corresponds to the S. The first character in the ciphertext therefore would be S. The remaining characters are encoded in the same way.
For the M, 12*3=36 would result. Since 36 is greater than the length of the used alphabet, 36 modulo 26 = 10 is calculated. This corresponds to the K. If "GEHEIMNIS" would be completely encoded by this procedure, the ciphertext would be: "SMVMYKNYC".

Security

Each character from the plaintext is always mapped to the same character in the ciphertext as in the Caesar cipher. Even though this cipher seems to be more complex than the Caesar cipher, it is not more secure. It is actually less secure than the Caesar cipher because the number of possible keys is smaller.

Details


If 2 would be used as key, then C=2 -> 2*2 = 4 -> so the character C is encoded as an E.
Analogous, P=15 -> 15*2 = 30 -> 30 modulo 26 = 4 -> the character P would also be encoded as an E.
Therefore, it is not possible to determine if an E in a ciphertext corresponds to a C or a P. In order to achieve a unique matching only keys that are co-prime to the length of the alphabet can be used. For an alphabet length of 26 this corresponds to 12 keys: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23 and 25.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.