Cryptography - AES and DES S-boxes -


i working on cryptology revision exercises university (in preparation exam) , question has me puzzled:

most block cipher implementations treat s-boxes lookup tables. des uses 8 s-boxes each take in 6 bits , output 4 bits. aes uses 1 s-box takes in 8 bits , outputs 8 bits. how storage required in each case?

i... have no idea? i'm not sure question asking. feel may missing concept storage , s-boxes?

if shed light on this, great! thanks.

seems bit of strange question, here's how think i'd approach it:

if implemented lookup-table, it's array "lookup" being indexing array.

the number of array elements must therefore correspond number of distinct values input can take, e.g. if s-box input 8-bit, there 28 = 256 possible input values.

the size of array elements correspond number of output bits. now, can't define arrays elements smaller 8-bits (1 byte), we'll presume it's possible encode outputs such can construct array no "wasted" space (as occur if had store say, 4-bit value in 8-bit array element).

with in mind should able calculate storage follows:

storage (in bytes) = number of s-boxes x 2number of input bits x (number of output bits / 8)

so:

des = 8 x 26 x (4 / 8) = 256 bytes
aes = 1 x 28 x (8 / 8) = 256 bytes

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -