# [RC5] 40 bit encryption

John Campbell jcampbel at lynn.ci-n.com
Fri Mar 15 19:51:23 EST 2002

```On Fri, 15 Mar 2002, Don Cohen wrote:
>
> Not quit,  you chose 2^40 as the number of keys in forty bit encription
> (which would be a 1 followed by 39 0's).

No... 2^40 is a 1 followed by 40 0s (assuming you're talking binary
representation).

> The correct number of keys is
> 2^41 - 1
>
How do you figure?

One-bit encryption has 2^1 (2) keys: 0 or 1.

Two-bit encryption has 2^2 (4) keys: 00, 01, 10, or 11.

Three-bit encryption has 2^3 (8) keys: 000, 001, 010, 011, 100, 101,
110, or 111.

Four-bit encryption has 2^4 (16) keys: 0000, 0001, 0010, 0011, 0100,
0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, or 1111.

And so it goes, up to 40-bit encryption, which has 2^40 keys, which
I am not going to list all of, because 1,099,511,627,776 keys would make
this email far too large.

---
John Campbell
jcampbel at lynn.ci-n.com

QotD:  The chances of getting eaten up by a lion on Main Street aren't
one in a million, but once would be enough.

--
To unsubscribe, send 'unsubscribe rc5' to majordomo at lists.distributed.net
rc5-digest subscribers replace rc5 with rc5-digest

```