# Brute force attack on a block cipher with length n [duplicate]

Consider a block cipher whose block length is π. π = 2π is number of possibilities. Imagine we have π‘ plain text-cipher text pairs { ππ, πΆπ = πΈπΎ(ππ) } , where the key πΎ selects one of the π! Possible mappings.

Now, imagine you want to brute force this encryption algorithm for the key. In each try, you generate the test key πΎβ² and check whether πΆπ = πΈ(πΎβ²,ππ); i=1,β¦,t. If πΎβ² maps ππ to its proper πΆπ, we have an evidence that πΎβ² = πΎ. However, it could be the case that πΈπΎ(.) and πΈπΎβ²(.) exactly map the π‘ given plain-texts to the same set of cipher-texts but map the other inputs differently.
a) whatβs the probability that πΈπΎ(.) and πΈπΎβ²(.) are distinct mappings? b) whatβs the probability that πΈπΎ(.) and πΈπΎβ²(.) agree on another π‘β² plain-text cipher-text pairs where 0 β€ π‘β² β€ π β π‘?

How can I solve this problem?

• looks a bit like a homework assignment, what have you tried? Nov 26, 2020 at 23:28
• Be specific about what you have tried and what you do not understand. Show the effort you have made by describing the exact point or points that have held you up. Nov 27, 2020 at 14:33
• While the problem statement in Probability of false positive key matching two plaintext/ciphertext pairs is with specific numbers, that's actually the same problem. Also, the notation there is correct, when here it is not (π = 2π where $N=2^n$ applies). And, there the question is presented as personal research with some effort shown, when here we have a straight dump.
– fgrieu
Nov 27, 2020 at 15:00