High-order countermeasures for AES and DES