An apparatus and a method in a data processing system are provided for insuring
the security of data accessed from removable media. Normal virus scanning occurs
after data is loaded into the main memory, but infection by a virus may have already
occurred by this time. Therefore, it would be beneficial to check for possible
virus infection before the data is transferred to main memory. A security key is
read from the removable media. As encrypted data is read from the device, it is
decrypted using the security key and then re-encrypted using the same security
key to produce new data. The original data is accepted and sent to main memory
if it is identical to the new data produced by decryption and re-encryption. If
the two sets of data are not identical, then the data transmission from the device
is aborted and all data on the removable media is rejected. The decryption/re-encryption
checking is performed in hardware and so it can occur in real time. This hardware
could be on the device controller, a separate security card, the mother board,
or anywhere along the data path from the device controller to the main memory.