Tuesday, March 12, 2019

AES vrs DES overhead

AES and DES are two known symmetric crypto ciphers. 

All variant  of  AES  are  built on 128bit blocks or 16bits. So any information encrypted will be padded out to this value. This can not be eliminated.

 by using unix   dd and openssl we can  witness this behavior in a simple demo 

I've crafted  4 files each named simply as "   1byte 2byte2 15byte and 16byte " 


e.g 

   dd if=/dev/random of=./1byte bs=1 count=1 
   dd if=/dev/random of=./2byte bs=2 count=1    
   dd if=/dev/random of=./15byte bs=15 count=1 
   dd if=/dev/random of=./16byte bs=16 count=1 

We also  used openssl with aes and then des for encryption and finally 2 other  cbc ciphers


e.g 

  openssl  des-cbc -in 1byte -out 1byte.des
  openssl  aes-128-cbc -in 2byte -out 2byte.aes

Take notice of the  resulting files





And to  even confused you even more some standards use a smaller block size. Take the same 1 2 15 16 byte files and now we encrypted them with CAST and IDEAL. These are 64bit blocksizes



So remember that the over head with any encryption will have some  type of overhead for the padding




NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o
        /  \

No comments:

Post a Comment