主权项 |
1. A memory data protection apparatus comprising:
a storage device, embedded in a chip electrically coupled to an external memory, for storing an offset value, a signature and a key; a cipher, electrically coupled to the storage device and the external memory, for receiving the key, wherein the cipher comprises:
an encrypter, receiving an original data and a certified data, and encrypting the original data and the certified data according to the key so as to output an encrypted data and an encrypted certified data to the external memory; anda decrypter, reading the encrypted data and the encrypted certified data stored in the external memory, and decrypting the encrypted data and the encrypted certified data according to the key so as to output a decrypted data and the certified data; a validator electrically coupled to the storage device, receiving the signature, the offset value and the certified data, and determining an access limit of the external memory by validating the certified data with the signature and the offset value; and a controller including a boot code, the controller executing the boot code for checking whether the storage device is written or not via validator, and writing the offset value, the signature and the key into the storage device when the storage device is not written, wherein the validator compares the certified data transmitted from a host with the signature and the offset value, and when the certified data conforms to the signature and the offset value, the boot code is executed to clean contents of the external memory and store the certified data and the original data transmitted from the host into the external memory, wherein the validator compares the certified data with the signature and the offset value, so as to determine the access limit of the external memory, wherein the memory data protection apparatus accesses the external memory according to the access limit. |