In encryption we take a particular key(lets say it K and key size is 64bit),then using that key we will encrypt the
for this process it will take T time.
in decryption also, usng that particular right key(K), it will take T time
but we dont know what particular key is used while encryption.
in order to find out the right key, we are using brute force attack.
in brute force attack we are going to generate every possible key with key size.
now we will compare every key with the original key(k), it it matches then that is
the right key.
in some other cases, we generate every possible key with key size and then
we decrypt the message with every key. now we will compare with the original message.
if it matches, that only the key.
in some other cases, we dont even know the key and original message. in that case
after decrypting with every possible key, we will see which one is the best solution, then we fix the key.
but the problem is we need to check with every possible keys.
here we are using 64 bit,so the possible keys are 2^64.
Now for each key in the possible keys(that is 2^64) we have to decrypt the message.
for decrypting it take T time as said.
there are 2^64 keys, so T*(2^64) time will take in brute force attack.
if the length of the key is doubled, that is 64*2 = 128 bit, then the time required to decrypt will also
because the possible keys are now 2^128. and for each key the time required to decrypt is T,
so the final time requried is T*(2^128)