Adaptable AES implementation with power-gating support