Quoting from https://en.wikipedia.org/wiki/Key_size
With a key of length n bits, there are 2n possible keys. This number grows very rapidly as n increases. The large number of operations (2128) required to try all possible 128-bit keys is widely considered out of reach for conventional digital computing techniques for the foreseeable future.
Why is the formula 2 to the power of (whatever the key size might be)?
0or1. So on one bit you can have 1^2 = 2 combinations which is0and1. On two bits, you can have 2^2 = 4 combinations00,01,10,11. And then on 3 bits you can have 2^3 = 8 -000,001,010,011,100,101,110,111. – Aria Aug 01 '16 at 20:19