A data encryption/decryption circuit is presented that can be implemented in a
field programmable gate array. First and second logic components are provided which
are controlled by first and second control signal to direct data between memory
and a data processing core (e.g., a DES or TDES processing core). In a ECB mode
of operation, the logic components simply pass the data from the memory to the
data processing core and from the data processing core to the memory. In CBC mode,
the data from the memory is XORed with data from the appropriate data processing
core in the first logic component during an encryption operation, and in the second
logic component during a decryption operation.