A string has 9 characters split in 3 groups of 3 chars each, [(x,x,x),(x,x,x),(x,x,x)].
The text is encrypted using secret-key cryptography and the function that encrypts is a simple function that does XOR with an unknown key. We know that they secret-key is of length 3. For each group (x1,x2,x3) each value is XOR with the corresponded value (y1,y2,y3) of secret-key.
Edit: Forgot to mention that characters are limited to a range of [a,b,c,d,e,f,g,h].
I want to calculate how many times should I try in order to find the correct key to decipher the string. I am interested more in the process of finding it rather than the answer because this is a question for learning purpose.
My solution idea consists as below:
The key is of length 3, -,-,-. Each of the positions can take 8 possible values, and since there is not any condition that does not allow me to have a key of all same values eg: aaa or bbb, etc the number of combinations is $8^3=512$. To try deciphering the string I would need to test each group, so $3\,groups \, times\,512 = 1536$ is the total number of tries.
Does it make any sense I am messing up something?