A system, method and data storage device for encrypting data to provide
at-rest data encryption of data in the data storage device. The system
includes a compression engine for receiving a host data stream packet and
selectively generating a compressed data packet, and an encryption engine
in electronic communication with the compression engine for receiving an
unencrypted data packet from the compression engine. The unencrypted data
packet comprises the compressed data packet when the compression engine
generates the compressed data packet. The unencrypted data packet
comprises the host data packet when the compression engine does not
generate the compressed data packet. The encryption engine generates an
encrypted data packet having an encrypted component corresponding to the
unencrypted data packet and a set of meta data indicative of one or more
characteristic of the encrypted data packet.