views:

65

answers:

3

I am doing a security review on a system.

From one part of the system to another, information is sent using an encrypted string.

This string is over 400 characters long, but within it are 4 sets of 10 identical characters. I am assuming that the data that was encrypted also has this pattern, for example the word "parameters".

I have tested encrypting a string containing several identical strings with DES, but do not get the same pattern.

Question is: Is there an encryption method that would produce this result. Or have the parts been encrypted seperatly and conncatinated?

+3  A: 

An encryption system with short key length and no correlation between blocks (e.g. ECB mode) would encrypt short runs of identical plain text identically. It could also just be coincidence, of course.

Graham Lee
+1  A: 

What do you mean with "4 sets of 10 identical characters"? If you mean 4 identical substrings with length 10, it may be the Caesar cipher, which is totally unsecure, as it can be deciphered by a human in no time. Another possibility is the use of an XOR cipher with a bad chosen key.

swegi
Yes, it is 4 identical substrings. It is actually 2 of length 12 and 2 of length 21, but in all cases the first 10 are the same.
Shiraz Bhaiji
+2  A: 

If what you're seeing is real, it's mostly about encryption mode, not the cipher. Likely culprits are a block cipher in ECB mode (which is usually a bad idea), or the pseudo-"stream" cipher of XORing the plaintext with a short password string repeated over and over (in which case the odds of two copies of the same plaintext at random positions encoding to the same thing are 1 in passwordlength) this one is a really bad idea.

By the way, it's best to be clear what format you're looking at the data in. If it's hex, okay. If it's base64, you should decode it before you look at it -- identical strings won't always look identical after base64 encoding depending on their alignment to a 3-byte boundary.

And just for illustration, here's a discussion of ECB mode on Wikipedia including pictures of the entropy problem with ECB -- scroll down to the pictures of Tux.

hobbs
Thanks, it was when I did the urldecode that the pattern appeared.
Shiraz Bhaiji