# How is key length of feistel cipher calculated?

In Feitsel Algorithim

If our block size is n, then our key length would be n x 2^n .

But this does not make sense for me. For example: Let's assume that we have 4 bit block size. If our block size is 4, how can the key length be 64 bit?

• The key size is largely independent of the block size, this also holds for Feistel-ciphers. For example Twofish was a Feistel cipher and has 128bit block size and 128, 192 and 256 bit key size support.
– SEJPM
Oct 4 '16 at 18:58
• okay, Let's assume that we have a 20 bits plain text and we want to encrypt it. Because of 4-bit block size we have 5 different blocks. We take the first block which is 4-bit and our key which is 64-bit. How can we use 64-bit key to encrypt 4 bit plain text( one block ) Oct 4 '16 at 19:06
• you could use different parts of the key each round or combine certain key bits together for each round.
– SEJPM
Oct 4 '16 at 19:09
• "If our block size is n, then our key length would be X 2^n ", according to this, if n is 4, then the key length is 2 ^ 4 (4 bits), not 2 ^ 64 (64 bits), right? I don't see where your 64 bit key comes from. Oct 4 '16 at 19:11
• @EllaRose yes, I am sorry I put the formula wrong, and I fixed it ( n times 2 the power of n) Oct 4 '16 at 19:12