1
$\begingroup$

Can anyone tell me how to crack the encryption of 8 bit algorithm, when you have some clue that CBC mode is used, but the algorithm is secret. You also have some encrypted data (chosen plain text), which belong from 0 to 256.

How can you crack the encryption in that case?

$\endgroup$
  • 1
    $\begingroup$ Even if the algorithm was public, there would be no guarantee that you have any chance of breaking it if it is a carefully-designed encryption scheme - so without both the algorithm and the private key, unless this is a flawed algorithm and this can be seen directly from the encryption of known plaintexts, there is no way you can break it. $\endgroup$ – Geoffroy Couteau Apr 19 '16 at 10:22
  • $\begingroup$ What do you mean by "8-bit encryption"? The block size? $\endgroup$ – CodesInChaos Apr 19 '16 at 10:27
  • 2
    $\begingroup$ Assuming the question is about an 8-bit unknown block cipher in CBC mode, hint: build a dictionary of input/output pairs for the block cipher. $\endgroup$ – fgrieu Apr 19 '16 at 11:35
  • $\begingroup$ @fgrieu, since you don't know the algorithm, you have to assume you can generate (e.g., via an oracle) enough input/output pairs to build that dictionary. $\endgroup$ – mikeazo Apr 19 '16 at 12:06
  • 1
    $\begingroup$ I'm assuming we know the operating mode (CBC), but nothing about the 8-bit block cipher (this might be what the question is about, or not). Then, the coupon collector problem tells us that we build the full dictionary with an average 1563 bytes of known plaintext (we have a useful dictionary much before that). As pointed by @mikeaso (I guess), we can reduce this with iteratively chosen plaintext (chosing the next byte of plaintext from the previous byte of ciphertext). $\endgroup$ – fgrieu Apr 19 '16 at 12:35
1
$\begingroup$

Assuming that there are no collisions and there exists a 1 to 1 bijection between input and output, you could construct and store a table of assignments on a single round of encryption for all 256 possible bytes regardless of the key size. From there you can extend this to subsequent rounds by simply XORing the result of the previous round to the next 8 bit block, and plugging this result into your table.

$\endgroup$
  • $\begingroup$ well let me explain what i have done. by applying chosen plain text i have some output(encrypted data) say in:123 --> o/p=245024211 from which i came to know o/p values are 0 to 256. so it is 8bit some how i also came to know about CBC mode. so i XORed ASCII value of 2nd input char. with 1st o/p value and i got intermediate value say i2 and same way i got i3. now i came to know o/p is (A)mod256=o/p i dint have A but i have o/p so i found list of possible A and Q by A=Q x N +R where R is our Output. from that A i found a where a= A-k, A x K^-1 and many possible operations Am i on right way? $\endgroup$ – cycypher Apr 21 '16 at 6:22
0
$\begingroup$

not possible if it's CBC hidden. Try using pairs and put them in dictionarys. Bruteforce is also a way but not answering the question properly.

$\endgroup$
  • $\begingroup$ what you mean by CBC hidden ? $\endgroup$ – cycypher Apr 21 '16 at 6:31
  • $\begingroup$ @cycypher I mean, if you dont have cöues that CBC mode has been used. $\endgroup$ – ioncodes Apr 21 '16 at 9:08
  • $\begingroup$ i have some hints that CBC is used.. As it is a crypto system for authentication. CBC use for integrity protection as well as use of time stamp as IV $\endgroup$ – cycypher Apr 21 '16 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.