Patent ID: 8713328
Filing Date: 2014-04-29
Classification: G06F

Abstract:
1. A code conversion apparatus that is included in a storage and that encrypts and decrypts data stored in a disk drive in the storage that manages the data, the code conversion apparatus comprising: an encrypted-data storage unit that stores, in a code buffer in the storage, first encrypted data present in the disk drive, the encryption buffer being divided into a local area for storing therein unencrypted data as first local data and a mirror area for storing therein unencrypted data as first mirror data corresponding to second local data stored in a different encryption buffer; an unencrypted-data storage unit that stores, in an encryption buffer in the storage, first unencrypted data present in the disk drive; an encrypting unit that encrypts the first unencrypted data present in the encryption buffer to predetermined encrypted data; a decrypting unit that decrypts the first encrypted data present in the code buffer to second unencrypted data; a re-encrypting unit that decrypts the first encrypted data present in the code buffer to third unencrypted data and encrypts the third unencrypted data to second encrypted data different from the first encrypted data; a monitoring unit that monitors a progress of data including monitoring whether data is at least one of being encrypted and decrypted by any one of the encrypting unit, the decrypting unit, and the re-encrypting unit; and a read/write controlling unit that includes controlling read/write of data based on a read/write request based on the progress monitored by the monitoring unit, upon reception of the read/write request for requesting the disk drive to read and write data when the data is being encrypted and decrypted by any one of the encrypting unit, the decrypting unit, and the re-encrypting unit, wherein the read/write controlling unit includes, upon reception of the read/write request for requesting read of target data including data currently being decrypted, waiting completion of decryption of the data, dividing the target data into fourth encrypted data and sixth unencrypted data after the decryption of the data is completed, reading the fourth encrypted data and the sixth unencrypted data, decrypting the fourth encrypted data to seventh unencrypted data, combining the sixth unencrypted data and the seventh unencrypted data, and controlling reading of the combined data, the read/write controlling unit issues an instruction to write the first local data in the local area in a first encryption buffer and writes second mirror data corresponding to the first local data in a mirror area of a second encryption buffer, the encrypting unit, when a failure occurs in the first encryption buffer and the second mirror data corresponding to the first local data stored in the first encryption buffer is stored in the mirror area of the second encryption buffer, decrypts the second mirror data to the predetermined encrypted data and writes the predetermined encrypted data to the disk drive, the decrypting unit, when a failure occurs in the first encryption buffer and the second mirror data corresponding to the first local data stored in the first encryption buffer is stored in the mirror area of the second encryption buffer, writes the second mirror data to the disk drive, and the re-encrypting unit, when a failure occurs in the first encryption buffer and the second mirror data corresponding to the first local data stored in the first encryption buffer is stored in the mirror area of the second encryption buffer, encrypts the second mirror data to different encrypted data and writes the different encrypted data to the disk drive.