5

plaintext: CANDY VERY CRANBERRY

ciphertext: TXOtWjYhVk 8&O$4AmSA


plaintext: http

ciphertext: cZf.


plaintext: http

ciphertext: r5Hz


  • This is definitely somehow decodable from ciphertext.

  • The ciphertext is always the same length as the plaintext.

  • Frequency of letters in the ciphertext doesn't match the plaintext.

  • The available charset seems to be upper and lower case alpha, plus .&-,%!$ and maybe others among the printable characters of utf-8.

HamZa
  • 1,370
  • 1
  • 15
  • 19
  • 2
    For all we know, it could be a one-time pad. A good cipher should produce output indistinguishable from random data, so if it's something good, we don't have any way of telling what this is. The only real clue you gave is the default output format that it uses (or I guess that's what it's formatted in) and that input and output are the same length (which still can be almost anything). – Luc May 19 '13 at 01:17
  • what other useful info could i figure out to help discover what it is? – princessbubblebutt May 19 '13 at 01:50
  • It could be one of [these](http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher) with an extended charset. – Manishearth May 19 '13 at 02:32
  • Also, you have given two different outputs for the same `http` input – Manishearth May 19 '13 at 02:33
  • @Manishearth - I could be Vigenère cipher, but then a number of distinct shifted alphabets (supporting key length also of such length) would have to be equal or greater than 28, otherwise it would still produce a distinct repetition. For example, taking the Wikipedia example for a spin, the plaintext `ATTACKATDAWN` and ciphertext `LXFOPVEFRNHR` would result in letter shifts of `11,4,-14,14,13,11,4,-14,14,13,-15,4` in UTF-8 character space, clearly indicating key length of 5 (Wiki used a key `LEMON` in the example) and letter space of 26 (shift of first and first before last character). – TildalWave May 21 '13 at 13:55
  • @TildalWave: No, it need not be: Like I mentioned, it would have an extended charset. Until we have a notion of an assigned number for each letter and character, we don't know if there is a loop in the above example or not. – Manishearth May 21 '13 at 13:57
  • @Manishearth - Oh sure, I'm not trying to prove anything here, I'm just killing time before lunch, like proper geeks like me do. :) – TildalWave May 21 '13 at 13:59
  • @TildalWave: Ah lol. I spend like 15 minutes on a JS console with this cipher. using ASCII as a base didn't work, neither did some other reshufflings. Then I have up :P – Manishearth May 21 '13 at 14:03

1 Answers1

13

This could be encrypted with any key length that is equal or longer than 28 characters (sum of lengths of ciphertext you provided) and as such unsolvable. The character variation between the plaintext CANDY VERY CRANBERRYhttphttp and its ciphertext TXOtWjYhVk 8&O$4AmSAcZf.r5Hz is:

17,23,1,48,-2,74,3,35,4,18,0,-11,-44,14,-42,-14,-4,27,1,-24,-5,-26,-14,-66,10,-63,-44,10

or visually in a scatter plot:

               Scatter plot

I don't see any pattern in it. The encryption is obviously not a simple letter substitution, otherwise same plaintext characters would translate into same ciphertext characters. The function could still be a simple modulo n + shift k though. For example, using n of 32 and k of -80, the key (or rather the first 28 characters of a key of unknown length) could be:

agQ`NZSSTbPED^FBLkQ8K6BNZ1DZ

Or agQXNrSsTbPEL^NBLkQ8K6B6Z9LZ with 40 -80 respecitvely. Of course, there are countless values of n and k that produce 28 printable character strings, and we can't say for sure only printable characters are accepted for the key either, or indeed that this is the encryption method used. Scatter plot suggests good randomness, which doesn't exclude advanced encryption algorithms such as AES, but nether it does a running key cipher or, as @Luc mentiones in the comments, one-time pad where the key used is at least as big as plaintext.

Your question is thus - with the data you provided being insufficient to detect any patterns or repetition - unsolvable.

TildalWave
  • 10,801
  • 11
  • 45
  • 84