Compact implementaion of AES algorithm