An FPGA implementation of the advanced encryption standard with support for counter and feedback modes