Search code examples
encryptionencodingdecodingtext-decoding

I need to know how Strong is my Cipher Algorithm



I've created a Cipher Algorithm (in Python) which will Generate a Random String of 255 Characters - which is my Key for Encryption.
Example Encryption:

originalString = ‘A Quick Brown fox Jumps over a Lazy Dog!’
enCrypted_String = rrG1dcvuPvs2ada7kC6Ht6AlwwX1s8GcC7lG1wX1s8vuPvs2GrG1dc21RFL2R1RFL2lHt6Al11RFL2vuPvs2cyecQOR1RFL2yyN8OFvuPvs2xWvPBx6Ht6Al8wX1s8F1RFL2HHt6AlvuPvs2R1RFL2AHt6AleyecQO21RFL2vuPvs27cC7lGvuPvs2LwLMpP7cC7lG8yN8OFNyN8OFvuPvs2drG1dcR1RFL2QyecQOsuPvs2

It would be great if you can decrypt the String so that I can test the Durability of my Code and find the flaws in my algorithm.

Additional Information:

Length of String = 40
Length of Encrypted String = 240 (40 + 40*5)

Information on Private Key

Private Key = 255 Characters Long - representing 255 Characters of ASCII Table

The Algorithm is a Modification of Caesar's Cipher. In my algorithm, each character is replaced with the Character from the Private Key with additional five characters from the private key, i.e.

A = rrG1dc = r-rG1dc, where r = 65th Character of Private Key
a = 7cC7lG = 7-cC7lG, where 7 = 97th Character of Private Key

Let me know if you are able to break it how did you do it, else if any other information is required.
[Note: I'm not Providing the Private Key - as it is supposed to be kept Private!]

Example Encryption (for Decoding):

BaObwBRJ0kRd7cC7lG

Information: A String of 3 Characters - Containing Numbers and Letters.


Solution

  • Caesar cipher is about shifting, yours is a general substitution cipher. Representing the alphabet with 6-character groups does not add anything to security, there will be 256 of such groups, and cryptanalysis would start with collecting those and replacing them with numbers from 0...255 (much less in practice, since the analyst would have to work only with the symbols which actually appear in the ciphertext).

    Your 3 character text is safe of course, just not because the strong cipher, but the small amount of data which does not allow for statistical methods. However one can already tell you have encoded 3 different characters, something you could not tell with strong encryption.