move aes functions into internal namespace