JP5017136B2 - Encryption / decryption device for hard disk drive and hard disk drive device - Google Patents

Encryption / decryption device for hard disk drive and hard disk drive device Download PDF

Info

Publication number
JP5017136B2
JP5017136B2 JP2008029420A JP2008029420A JP5017136B2 JP 5017136 B2 JP5017136 B2 JP 5017136B2 JP 2008029420 A JP2008029420 A JP 2008029420A JP 2008029420 A JP2008029420 A JP 2008029420A JP 5017136 B2 JP5017136 B2 JP 5017136B2
Authority
JP
Japan
Prior art keywords
data
disk drive
hard disk
address
encryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008029420A
Other languages
Japanese (ja)
Other versions
JP2009187646A (en
Inventor
匡史 堤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Document Solutions Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyocera Document Solutions Inc filed Critical Kyocera Document Solutions Inc
Priority to JP2008029420A priority Critical patent/JP5017136B2/en
Publication of JP2009187646A publication Critical patent/JP2009187646A/en
Application granted granted Critical
Publication of JP5017136B2 publication Critical patent/JP5017136B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ハードディスクドライブ用の暗号化復号化装置、及びハードディスクドライブ装置に関する。   The present invention relates to an encryption / decryption device for a hard disk drive and a hard disk drive device.

データをブロック単位で暗号化する暗号化方式であって、先頭データを暗号化する際に初期ベクトル(IV)を使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式として、AES(Advanced Encryption Standard)のCBC(Cipher Block Chaining)モードが知られている。   This is an encryption method that encrypts data in units of blocks, and uses the initial vector (IV) when encrypting the top data, and for data other than the top data, the data immediately before that data is used. As a block encryption method for performing encryption, an AES (Advanced Encryption Standard) CBC (Cipher Block Chaining) mode is known.

AESのCBCモードでは、データブロックの先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化されているので、データを復号化する際も、データブロック単位で先頭から順に復号化しなければ、正しくデータを復号化できない。   In the AES CBC mode, data other than the head data of the data block is encrypted using the data immediately before the data. Therefore, even when data is decrypted, the data block unit is in order from the head. Without decryption, data cannot be decrypted correctly.

ハードディスクドライブに記憶するデータファイルをAESのCBCモードで暗号化する場合、ファイル単位で初期ベクトルを設定すると、ファイルの先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化されているので、データを復号化する際も、ファイル単位で先頭から順に復号化しなければ、正しくデータを復号化できない。   When encrypting a data file stored in the hard disk drive in the AES CBC mode, if an initial vector is set for each file, the data other than the head data of the file is encrypted using the data immediately before that data. Therefore, even when data is decrypted, data cannot be decrypted correctly unless it is decrypted in order from the top in file units.

しかし、ハードディスクドライブを使用する場合、ファイル中の特定箇所のデータを抜き出してアクセスしたい場合がある。そこで、ハードディスクドライブに記憶させるデータを暗号化、及び復号化する方法として、ハードディスクドライブのセクタ毎に初期ベクトルを設定し、AESのCBCモードで暗号化、及び復号化する方法が知られている(例えば、特許文献1参照。)。   However, when using a hard disk drive, there are cases where it is desired to extract and access data at a specific location in a file. Therefore, as a method for encrypting and decrypting data to be stored in the hard disk drive, a method is known in which an initial vector is set for each sector of the hard disk drive, and encryption and decryption are performed in the AES CBC mode ( For example, see Patent Document 1.)

特許文献1に記載の技術では、セクタ毎に設定された初期ベクトルによって暗号化されたデータを読み出す際に、読み出したいセクタを指定し、当該セクタに設定された初期ベクトルで復号化することで、AESのCBCモードで暗号化されたデータにセクタ単位でアクセスすることが可能になっている。
特開2007−183514号公報
In the technique described in Patent Literature 1, when data encrypted by an initial vector set for each sector is read, a sector to be read is designated, and decryption is performed using the initial vector set for the sector. Data encrypted in the AES CBC mode can be accessed in units of sectors.
JP 2007-183514 A

ところで、SATAのNCQに対応するハードディスクドライブは、32個のコマンドをキューイングするバッファを備えており、複数のコマンドがキューイングされると、アクセス効率が高まるように、ハードディスクドライブ側で勝手にコマンドの実行順序を変更する。各コマンドは、アクセスするセクタ番号を指定しているので、コマンドの実行順序が変更されると、外部から指示したコマンドのセクタ順番と、実際にハードディスクドライブでアクセスが実行されるセクタの順番とが異なってしまう。   By the way, the hard disk drive corresponding to the NCQ of SATA has a buffer for queuing 32 commands. When a plurality of commands are queued, the hard disk drive side automatically issues commands so that the access efficiency is improved. Change the execution order. Since each command specifies the sector number to be accessed, when the command execution order is changed, the sector order of the command instructed from the outside and the order of sectors actually accessed by the hard disk drive are changed. It will be different.

例えば、セクタ0,1,2,3の順に、ハードディスクドライブへ書き込みコマンドを送信すると、ハードディスクドライブでは、例えばセクタ2,1,0,3というように、書き込み実行順序が変更される。そして、このデータを読み出すために、再びセクタ0,1,2,3の順に、ハードディスクドライブへ読み出しコマンドを送信すると、ハードディスクドライブでは、例えばセクタ1,0,3,2の順に読み出しが実行され、読み出しコマンドで指示したセクタ番号順とは異なる順番でデータが読み出されることとなる。   For example, when a write command is transmitted to the hard disk drive in the order of sectors 0, 1, 2, and 3, the write execution order is changed to, for example, sectors 2, 1, 0, and 3 in the hard disk drive. In order to read out this data, when a read command is transmitted to the hard disk drive again in the order of sectors 0, 1, 2, and 3, the hard disk drive reads out data in the order of sectors 1, 0, 3, and 2, for example. Data is read in an order different from the sector number order specified by the read command.

このような、SATAのNCQに対応するハードディスクドライブを用いて、例えば特許文献1に記載の技術を用いて、AESのCBCモードのように、先頭データを暗号化する際に初期ベクトル(IV)を使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式を用いて暗号化したデータを記憶させようとすると、以下のような不都合が生じる。   Using such a hard disk drive corresponding to SATA NCQ, for example, using the technique described in Patent Document 1, the initial vector (IV) is set when encrypting the head data as in the AES CBC mode. If the data other than the head data is stored using the block encryption method in which the data immediately before the data is encrypted, the following inconvenience is caused. Arise.

例えば、セクタ0,1,2,3の順に、ハードディスクドライブへ書き込みコマンドを送信すると、ハードディスクドライブでは、例えばセクタ2,1,0,3というように、書き込み実行順序が変更され、メモリからセクタ2,1,0,3に対応するデータがこの順に読み出されて、ハードディスクドライブへ転送される。   For example, when a write command is transmitted to the hard disk drive in the order of sectors 0, 1, 2, and 3, the hard disk drive changes the write execution order, for example, sector 2, 1, 0, and 3 from the memory to the sector 2 , 1, 0, 3 are read in this order and transferred to the hard disk drive.

このとき、ハードディスクドライブの外部に設けられた暗号化装置によって、メモリからハードディスクドライブへ転送されるデータを上述のブロック暗号化方式で暗号化しようとしても、ハードディスクドライブに入力されたコマンドのセクタ番号順と、メモリからハードディスクドライブへ転送されるデータに対応するセクタ番号順とが異なってしまうため、セクタ毎に設定された初期ベクトルを転送データに正しく対応させることができなくなる結果、正しく暗号化することができないという不都合があった。   At this time, even if an encryption device provided outside the hard disk drive attempts to encrypt data transferred from the memory to the hard disk drive using the block encryption method described above, the command is input in the sector number order. And the sector number order corresponding to the data transferred from the memory to the hard disk drive will be different, so that the initial vector set for each sector cannot be correctly associated with the transfer data, and as a result, it is encrypted correctly. There was an inconvenience that it was not possible.

そして、このようにしてハードディスクドライブに記憶されたデータを読み出すときにも、書き込み時と同様読み出されるセクタ順がハードディスクドライブにより勝手に変更されてしまうために、ハードディスクドライブからメモリへ転送されるデータに、セクタ毎に設定された初期ベクトルを正しく対応させることができなくなる結果、正しく復号化することができないという不都合があった。   Even when reading data stored in the hard disk drive in this way, the read-out sector order is changed arbitrarily by the hard disk drive as in the case of writing, so the data transferred from the hard disk drive to the memory is changed. As a result, it becomes impossible to correctly correspond to the initial vector set for each sector. As a result, there is a disadvantage that decoding cannot be performed correctly.

本発明は、このような事情に鑑みて為された発明であり、データを記憶するメモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共にキューイングされたコマンドの実行順序を決定するハードディスクドライブへデータを記憶させる際に、データをブロック単位で暗号化するに際して、先頭データを暗号化するときに初期ベクトルを使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式を用いて、暗号化及び復号化を行うことができるハードディスクドライブ用の暗号化復号化装置、及びハードディスクドライブ装置を提供することを目的とする。   The present invention has been made in view of such circumstances, and queues a plurality of commands that request data transfer with a memory that stores data, and sets the execution order of the queued commands. When storing data in the hard disk drive to be determined, when encrypting the data in block units, the initial vector is used when encrypting the top data, and for data other than the top data, the data immediately before the data is used. An object of the present invention is to provide an encryption / decryption device for a hard disk drive and a hard disk drive device that can perform encryption and decryption using a block encryption method that performs encryption using data.

本発明に係るハードディスクドライブ用の暗号化復号化装置は、メモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共に、キューイングされたコマンドの実行順序を決定するハードディスクドライブ用の暗号化復号化装置であって、前記ハードディスクドライブにキューイングされた複数のコマンドに対応して、各コマンドが指定する、前記ハードディスクドライブのセクタアドレスを示すセクタアドレス情報と、前記メモリにおける前記転送を要求するデータのアドレス範囲とを対応付けて記憶する情報テーブルと、前記ハードディスクドライブからのアクセス要求を受け付けて、前記メモリをアクセスするためのアドレスを出力する制御部と、前記情報テーブルを参照して前記制御部から出力されたアドレスを含む前記アドレス範囲を探索し、当該探し出されたアドレス範囲と対応するセクタアドレス情報に基づきセクタアドレスを取得するセクタアドレス取得部と、前記セクタアドレス取得部によって取得されたセクタアドレスに基づいて、前記初期ベクトルを生成する初期ベクトル生成部と、データをブロック単位で暗号化するに際して、先頭データを暗号化するときに前記初期ベクトル生成部で生成された初期ベクトルを使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式によって、前記メモリから前記ハードディスクドライブへ転送されるデータを暗号化する暗号化部と、前記ブロック暗号化方式により暗号化されたデータを、前記初期ベクトル生成部で生成された初期ベクトルを用いて、前記ハードディスクドライブから前記メモリへ転送される際に復号化する復号化部とを備える。   An encryption / decryption device for a hard disk drive according to the present invention queues a plurality of commands for requesting data transfer with a memory and determines an execution order of the queued commands. An encryption / decryption device, corresponding to a plurality of commands queued in the hard disk drive, sector address information indicating a sector address of the hard disk drive specified by each command, and the transfer in the memory An information table that stores the address range of the requested data in association with each other, a control unit that receives an access request from the hard disk drive and outputs an address for accessing the memory, and the information table The address output from the control unit A sector address acquisition unit that searches the address range and acquires a sector address based on sector address information corresponding to the found address range, and on the basis of the sector address acquired by the sector address acquisition unit, An initial vector generation unit that generates an initial vector and an initial vector generated by the initial vector generation unit when encrypting the head data when encrypting the data in units of blocks. Is an encryption unit that encrypts data transferred from the memory to the hard disk drive by a block encryption method that encrypts data using the previous data, and an encryption method that uses the block encryption method. The converted data is converted into an initial vector generated by the initial vector generation unit. Using Le, and a decoding unit for decoding as it is transferred from the hard disk drive to the memory.

この構成によれば、制御部によって、ハードディスクドライブからのアクセス要求に応じてメモリをアクセスするためのアドレスが出力される。そして、セクタアドレス取得部によって、制御部から出力されたアドレスを含んで情報テーブルに記憶されているアドレス範囲が探索され、当該探し出されたアドレス範囲と対応して情報テーブルに記憶されているセクタアドレス情報に基づきセクタアドレスが取得される。さらに、初期ベクトル生成部によって、セクタアドレス取得部で取得されたセクタアドレスに基づいて、初期ベクトルが生成されて暗号化部と復号化部とへ供給される。この場合、ハードディスクドライブにおいてキューイングされたコマンドの実行順序が変更された場合であっても、メモリをアクセスするために実際に出力されたアドレスに基づいて初期ベクトルが生成され、暗号化部においてこの初期ベクトルを用いて暗号化が行われ、復号化部においてこの初期ベクトルを用いて復号化が行われるので、データを記憶するメモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共にキューイングされたコマンドの実行順序を決定するハードディスクドライブへデータを記憶させる際に、データをブロック単位で暗号化するに際して、先頭データを暗号化するときに初期ベクトルを使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式を用いて、暗号化及び復号化を行うことができる。   According to this configuration, the control unit outputs an address for accessing the memory in response to an access request from the hard disk drive. Then, the address range stored in the information table including the address output from the control unit is searched by the sector address acquisition unit, and the sector stored in the information table corresponding to the found address range A sector address is acquired based on the address information. Further, an initial vector is generated by the initial vector generation unit based on the sector address acquired by the sector address acquisition unit and supplied to the encryption unit and the decryption unit. In this case, even if the execution order of the commands queued in the hard disk drive is changed, an initial vector is generated based on the address actually output to access the memory, and this is performed in the encryption unit. Encryption is performed using the initial vector, and decryption is performed using the initial vector in the decryption unit. Therefore, a plurality of commands for requesting data transfer to and from the memory storing the data are queued. When the data is stored in the hard disk drive that determines the execution order of the commands queued together with the data, the initial vector is used when encrypting the head data when the data is encrypted in units of blocks. Data is encrypted using the previous data. Using click encryption method, it is possible to perform encryption and decryption.

また、前記情報テーブルは、前記データのアドレス範囲を、前記メモリにおける前記転送を要求するデータの先頭アドレスと、前記転送を要求するデータのサイズとして記憶し、前記セクタアドレス取得部は、前記制御部から出力されたアドレスが前記先頭アドレス以上であって、かつ前記先頭アドレスと前記データのサイズとを加算したアドレスに満たない条件を満たすアドレス範囲を探索することが好ましい。   The information table stores the address range of the data as a start address of the data requesting the transfer in the memory and a size of the data requesting the transfer, and the sector address acquisition unit includes the control unit It is preferable to search for an address range that satisfies the condition that the address output from is greater than or equal to the start address and does not satisfy the address obtained by adding the start address and the data size.

この構成によれば、情報テーブルには、データのアドレス範囲が、メモリにおける転送を要求するデータの先頭アドレスと、転送を要求するデータのサイズとして記憶されている。そして、セクタアドレス取得部は、制御部から出力されたアドレスが先頭アドレス以上であって、かつ先頭アドレスとデータのサイズとを加算したアドレスに満たない条件を満たすアドレス範囲を探索することによって、制御部から出力されたアドレスを含んで情報テーブルに記憶されているアドレス範囲を探し出すことができる。   According to this configuration, the address range of data is stored in the information table as the start address of the data requesting transfer in the memory and the size of the data requesting transfer. Then, the sector address acquisition unit performs control by searching for an address range in which the address output from the control unit is equal to or more than the start address and satisfies the condition that does not satisfy the address obtained by adding the start address and the data size. The address range stored in the information table including the address output from the section can be found.

また、前記情報テーブルは、さらに、前記セクタアドレス情報として、前記各コマンドが指定するセクタアドレスの先頭を記憶し、前記セクタアドレス取得部は、前記制御部から出力されたアドレスと、前記情報テーブルにおいて前記探し出されたアドレス範囲と対応付けて記憶されている先頭アドレスとの差を前記ハードディスクドライブのセクタサイズで除した値を、前記情報テーブルにおいて前記探し出されたアドレス範囲と対応付けて記憶されているセクタアドレス情報に加算することにより、前記セクタアドレスを算出することが好ましい。   In addition, the information table further stores, as the sector address information, the head of a sector address specified by each command, and the sector address acquisition unit includes an address output from the control unit and an information table. A value obtained by dividing the difference between the head address stored in association with the found address range by the sector size of the hard disk drive is stored in association with the found address range in the information table. Preferably, the sector address is calculated by adding to the existing sector address information.

この構成によれば、情報テーブルには、さらに、セクタアドレス情報として、各コマンドが指定するセクタアドレスの先頭が記憶されている。そして、セクタアドレス取得部は、制御部から出力されたアドレスと、情報テーブルにおいて前記探し出されたアドレス範囲と対応付けて記憶されている先頭アドレスとの差をハードディスクドライブのセクタサイズで除した値を、情報テーブルにおいて前記探し出されたアドレス範囲と対応付けて記憶されているセクタアドレス情報に加算することにより、制御部から出力されたアドレスに対応するセクタアドレスを算出することができる。   According to this configuration, the information table further stores the head of the sector address specified by each command as sector address information. The sector address acquisition unit is a value obtained by dividing the difference between the address output from the control unit and the head address stored in association with the address range found in the information table by the sector size of the hard disk drive. Is added to the sector address information stored in association with the found address range in the information table, whereby the sector address corresponding to the address output from the control unit can be calculated.

また、前記ハードディスクドライブは、SATA(Serial Advanced Technology Attachment)のNCQ(Native Command Queuing)に対応することが好ましい。   The hard disk drive preferably corresponds to NCQ (Native Command Queuing) of SATA (Serial Advanced Technology Attachment).

この構成によれば、SATAのNCQに対応するハードディスクドライブへデータを記憶させる際に、データをブロック単位で暗号化するに際して、先頭データを暗号化するときに初期ベクトルを使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式を用いて、暗号化及び復号化を行うことができる。   According to this configuration, when data is stored in a hard disk drive corresponding to NCQ of SATA, when encrypting data in units of blocks, the initial vector is used when encrypting the top data, and other than the top data Data can be encrypted and decrypted using a block encryption method in which data is encrypted using data immediately before the data.

また、前記ブロック暗号化方式は、AES(Advanced Encryption Standard)のCBC(Cipher Block Chaining)モードであることが好ましい。   The block encryption method is preferably an AES (Advanced Encryption Standard) CBC (Cipher Block Chaining) mode.

この構成によれば、データを記憶するメモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共にキューイングされたコマンドの実行順序を決定するハードディスクドライブへデータを記憶させる際に、AESのCBCモードを用いて、暗号化及び復号化を行うことができる。   According to this configuration, when queuing a plurality of commands that request data transfer with a memory that stores data and determining the execution order of the queued commands, the data is stored in the hard disk drive. Encryption and decryption can be performed using the AES CBC mode.

また、本発明に係るハードディスクドライブ装置は、上述のハードディスクドライブ用の暗号化復号化装置と、メモリと、前記メモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共に、キューイングされたコマンドの実行順序を決定するハードディスクドライブとを備える。   The hard disk drive device according to the present invention queues the encryption / decryption device for the hard disk drive described above, a memory, and a plurality of commands requesting data transfer between the memory and the queuing And a hard disk drive for determining the execution order of the executed commands.

この構成によれば、データを記憶するメモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共にキューイングされたコマンドの実行順序を決定するハードディスクドライブへデータを記憶させる際に、データをブロック単位で暗号化するに際して、先頭データを暗号化するときに初期ベクトルを使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式を用いて、暗号化及び復号化を行うことができる。   According to this configuration, when queuing a plurality of commands that request data transfer with a memory that stores data and determining the execution order of the queued commands, the data is stored in the hard disk drive. When encrypting data in units of blocks, block encryption that uses an initial vector when encrypting the top data, and encrypts data other than the top data using the data immediately before the data Encryption and decryption can be performed using the method.

このような構成のハードディスクドライブ用の暗号化復号化装置、及びハードディスクドライブ装置は、データを記憶するメモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共にキューイングされたコマンドの実行順序を決定するハードディスクドライブへデータを記憶させる際に、データをブロック単位で暗号化するに際して、先頭データを暗号化するときに初期ベクトルを使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式を用いて、暗号化及び復号化を行うことができる。   The hard disk drive encryption / decryption device and hard disk drive device configured as described above queue a plurality of commands that request data transfer with a memory that stores data, and When storing data in the hard disk drive that determines the execution order, when encrypting data in units of blocks, the initial vector is used when encrypting the top data, and for data other than the top data, Encryption and decryption can be performed using a block encryption method that performs encryption using the previous data.

以下、本発明に係る実施形態を図面に基づいて説明する。なお、各図において同一の符号を付した構成は、同一の構成であることを示し、その説明を省略する。図1は、本発明の一実施形態に係るハードディスクドライブ用の暗号化復号化装置を備えるハードディスクドライブ装置の構成の一例を示すブロック図である。   Embodiments according to the present invention will be described below with reference to the drawings. In addition, the structure which attached | subjected the same code | symbol in each figure shows that it is the same structure, The description is abbreviate | omitted. FIG. 1 is a block diagram showing an example of a configuration of a hard disk drive device including an encryption / decryption device for a hard disk drive according to an embodiment of the present invention.

図1に示すハードディスクドライブ装置1は、暗号化復号化装置2と、ハードディスクドライブ(HDD)3と、メモリ4とを備えている。そして、ハードディスクドライブ装置1は、CPU(Central Processing Unit)100と接続されている。CPU100は、ハードディスクドライブ装置1にアクセスする装置側のCPUである。   A hard disk drive device 1 shown in FIG. 1 includes an encryption / decryption device 2, a hard disk drive (HDD) 3, and a memory 4. The hard disk drive device 1 is connected to a CPU (Central Processing Unit) 100. The CPU 100 is a CPU on the device side that accesses the hard disk drive device 1.

暗号化復号化装置2は、例えばASIC(Application Specific Integrated Circuit)を用いて構成されており、暗号化部5、復号化部6、初期ベクトル供給部7、SATAホストコントローラ(制御部)8、及び暗号鍵記憶部9を備えている。なお、暗号化復号化装置2と共にメモリ4も含めてASIC化されていてもよい。   The encryption / decryption device 2 is configured using, for example, an ASIC (Application Specific Integrated Circuit), and includes an encryption unit 5, a decryption unit 6, an initial vector supply unit 7, a SATA host controller (control unit) 8, and An encryption key storage unit 9 is provided. The ASIC including the memory 4 together with the encryption / decryption device 2 may be used.

ハードディスクドライブ3は、例えばSATAのNCQをサポートするハードディスクドライブであり、メモリとの間でのデータ転送を要求する32個のコマンドをキューイングし、ディスクへのアクセス効率がよくなるようにキューイングされたコマンドの実行順序を決定して実行する。ハードディスクドライブ3は、コマンドを実行してメモリとの間でデータ転送を行うときは、SATAホストコントローラ8へメモリアクセス要求を出力することにより、SATAホストコントローラ8を介してメモリアクセスを実行するようになっている。   The hard disk drive 3 is a hard disk drive that supports SATA NCQ, for example, and queues 32 commands for requesting data transfer to and from the memory so that the disk access efficiency is improved. Determine the command execution order and execute it. The hard disk drive 3 executes a memory access via the SATA host controller 8 by outputting a memory access request to the SATA host controller 8 when executing a command and transferring data to and from the memory. It has become.

SATAホストコントローラ8は、例えばSATAのAHCI(Advanced Host Controller Interface)規約に則って構成されている。そして、SATAホストコントローラ8は、CPU100からのアクセス要求に応じて、ハードディスクドライブ3へコマンドを送信する。また、SATAホストコントローラ8は、ハードディスクドライブ3からメモリアクセス要求を受け付けると、当該要求に応じてメモリアドレスaddr(アドレス)や制御信号をメモリ4へ出力し、メモリ4からのデータの読み出しやメモリ4へのデータの書き込みを行う。   The SATA host controller 8 is configured in accordance with, for example, the SATA AHCI (Advanced Host Controller Interface) protocol. Then, the SATA host controller 8 transmits a command to the hard disk drive 3 in response to an access request from the CPU 100. When the SATA host controller 8 receives a memory access request from the hard disk drive 3, the SATA host controller 8 outputs a memory address addr (address) or a control signal to the memory 4 in response to the request, and reads data from the memory 4 or the memory 4. Write data to.

暗号鍵記憶部9は、例えばRAM(Random Access Memory)やレジスタ等の記憶手段によって構成されており、暗号化及び復号化に用いる暗号鍵が、予め記憶されている。   The encryption key storage unit 9 is configured by storage means such as a RAM (Random Access Memory) or a register, for example, and an encryption key used for encryption and decryption is stored in advance.

暗号化部5は、メモリ4とSATAホストコントローラ8との間に設けられている。そして、暗号化部5は、暗号鍵記憶部9に記憶されている暗号鍵と、初期ベクトル供給部7で生成された初期ベクトルとに基づいて、SATAホストコントローラ8から出力されたメモリアドレスaddrに応じてメモリ4からSATAホストコントローラ8へ転送されるデータ41を、リアルタイムで暗号化して暗号化データ51としてSATAホストコントローラ8へ出力する。暗号化部5は、ブロック暗号化方式として、例えばAESのCBCモードを用いるようになっている。   The encryption unit 5 is provided between the memory 4 and the SATA host controller 8. Then, the encryption unit 5 determines the memory address addr output from the SATA host controller 8 based on the encryption key stored in the encryption key storage unit 9 and the initial vector generated by the initial vector supply unit 7. In response, the data 41 transferred from the memory 4 to the SATA host controller 8 is encrypted in real time and output to the SATA host controller 8 as encrypted data 51. The encryption unit 5 uses, for example, AES CBC mode as a block encryption method.

復号化部6は、SATAホストコントローラ8とメモリ4との間に設けられている。そして、復号化部6は、SATAホストコントローラ8から出力されたメモリアドレスaddrに書き込むべく、SATAホストコントローラ8から出力された暗号化データ81を、暗号鍵記憶部9に記憶されている暗号鍵と、初期ベクトル供給部7で生成された初期ベクトルとに基づいてリアルタイムに復号化し、復号化データ61としてメモリ4へ出力する。   The decryption unit 6 is provided between the SATA host controller 8 and the memory 4. Then, the decryption unit 6 writes the encrypted data 81 output from the SATA host controller 8 and the encryption key stored in the encryption key storage unit 9 in order to write to the memory address addr output from the SATA host controller 8. The data is decoded in real time based on the initial vector generated by the initial vector supply unit 7 and output to the memory 4 as decoded data 61.

復号化部6は、暗号化部5と同じ暗号化方式を用いて復号化を行う。なお、暗号化部5及び復号化部6は、AESのCBCモードを用いる例に限られず、データをブロック単位で暗号化する暗号化方式であって、先頭データを暗号化する際に初期ベクトルを使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式を用いるものであればよい。   The decryption unit 6 performs decryption using the same encryption method as that of the encryption unit 5. Note that the encryption unit 5 and the decryption unit 6 are not limited to the example using the AES CBC mode, and are encryption methods for encrypting data in units of blocks. Any data other than the head data may be used as long as it uses a block encryption method in which encryption is performed using data immediately before the data.

初期ベクトル供給部7は、例えば種々の論理回路や順序回路等を用いて構成されている。図2は、図1に示す初期ベクトル供給部7の構成の一例を示すブロック図である。図2に示す初期ベクトル供給部7は、例えば、コマンド判定部71、セクタアドレス算出部72、初期ベクトル生成部73、及び情報テーブル74を備えている。   The initial vector supply unit 7 is configured using, for example, various logic circuits and sequential circuits. FIG. 2 is a block diagram showing an example of the configuration of the initial vector supply unit 7 shown in FIG. The initial vector supply unit 7 illustrated in FIG. 2 includes, for example, a command determination unit 71, a sector address calculation unit 72, an initial vector generation unit 73, and an information table 74.

情報テーブル74は、ハードディスクドライブ3でキューイングされる32個のコマンドに対応する32個のコマンド情報を、0〜31のコマンド番号を付して記憶する。具体的には、初期ベクトル供給部7は、CPU100からのSATAホストコントローラ8へのアクセス要求を監視し、アクセス要求に応じてSATAホストコントローラ8からハードディスクドライブ3へ出力されるコマンドに対応するコマンド情報を、情報テーブル74として記憶する。   The information table 74 stores 32 pieces of command information corresponding to 32 commands queued in the hard disk drive 3 with command numbers of 0 to 31. Specifically, the initial vector supply unit 7 monitors an access request from the CPU 100 to the SATA host controller 8, and command information corresponding to a command output from the SATA host controller 8 to the hard disk drive 3 in response to the access request. Is stored as an information table 74.

情報テーブル74に記憶される各コマンド情報は、各々、コマンドI(Iはコマンド番号)が存在するか否かを示す情報であるExist[I]と、アクセスを要求するハードディスクドライブ3のセクタアドレスの先頭を示す情報であるStart_LBA[I]と、メモリ4における転送データ領域の先頭アドレスを示す情報であるStart_Address[I]と、転送データのセクタサイズを示す情報であるSector_Size[I]とを含んでいる。   Each command information stored in the information table 74 includes Exist [I] indicating whether or not the command I (I is a command number) exists, and the sector address of the hard disk drive 3 that requests access. It includes Start_LBA [I] which is information indicating the start, Start_Address [I] which is information indicating the start address of the transfer data area in the memory 4, and Sector_Size [I] which is information indicating the sector size of the transfer data. Yes.

この場合、Start_LBA[I]とStart_Address[I]とでセクタアドレス情報の一例が構成され、Start_Address[I]とSector_Size[I](データのサイズ)とで、アドレス範囲の一例が構成されている。   In this case, an example of sector address information is configured by Start_LBA [I] and Start_Address [I], and an example of an address range is configured by Start_Address [I] and Sector_Size [I] (data size).

コマンド判定部71は、情報テーブル74を参照して、SATAホストコントローラ8からメモリをアクセスすべく出力されたメモリアドレスaddrを含むアドレス範囲を探索し、当該アドレス範囲を指定するコマンド情報のコマンド番号Iを取得する。   The command determination unit 71 searches the address range including the memory address addr output to access the memory from the SATA host controller 8 with reference to the information table 74, and command number I of command information specifying the address range. To get.

セクタアドレス算出部72は、コマンド判定部71により取得されたコマンド番号Iの、Start_LBA[I]とStart_Address[I]とに基づいて、転送データのセクタアドレスLBAを算出する。   The sector address calculation unit 72 calculates the sector address LBA of the transfer data based on Start_LBA [I] and Start_Address [I] of the command number I acquired by the command determination unit 71.

この場合、コマンド判定部71とセクタアドレス算出部72とで、セクタアドレス取得部の一例が構成されている。   In this case, the command determination unit 71 and the sector address calculation unit 72 constitute an example of a sector address acquisition unit.

初期ベクトル生成部73は、セクタアドレス算出部72により算出されたセクタアドレスLBAに、所定の演算処理、例えば排他的論理和演算等の演算処理を施して、初期ベクトルIVを生成し、暗号化部5、及び復号化部6へ供給する。これにより、暗号強度を向上させる。なお、初期ベクトル生成部73は、セクタアドレスLBAを、そのまま初期ベクトルIVとして出力する構成としてもよい。   The initial vector generation unit 73 performs predetermined arithmetic processing such as exclusive OR operation on the sector address LBA calculated by the sector address calculation unit 72 to generate an initial vector IV, and the encryption unit 5 and the decoding unit 6. Thereby, the encryption strength is improved. Note that the initial vector generation unit 73 may output the sector address LBA as it is as the initial vector IV.

次に、上述のように構成された暗号化復号化装置2、及びハードディスクドライブ装置1の動作について説明する。まず、ハードディスクドライブ装置1へのデータ書き込みを行う場合、CPU100からSATAホストコントローラ8へ、メモリ4からハードディスクドライブ3へのデータ転送を要求する複数のアクセス要求があると、SATAホストコントローラ8によって、SATAのAHCI規約に従って、当該アクセス要求に応じた複数のコマンドがハードディスクドライブ3へ送信される。そうすると、ハードディスクドライブ3において、当該複数のコマンドがキューイングされる。   Next, operations of the encryption / decryption device 2 and the hard disk drive device 1 configured as described above will be described. First, when writing data to the hard disk drive device 1, if there are a plurality of access requests for requesting data transfer from the CPU 100 to the SATA host controller 8 and from the memory 4 to the hard disk drive 3, the SATA host controller 8 causes the SATA host controller 8 to A plurality of commands corresponding to the access request are transmitted to the hard disk drive 3 in accordance with the AHCI protocol. Then, the plurality of commands are queued in the hard disk drive 3.

このとき、初期ベクトル供給部7によって、CPU100からのアクセス要求に基づいて、情報テーブル74が生成される。   At this time, the information vector 74 is generated by the initial vector supply unit 7 based on the access request from the CPU 100.

次に、ハードディスクドライブ3によって、ディスクへのアクセス効率がよくなるように、キューイングされたコマンドの実行順序が決定されて、当該決定された実行順にコマンドが実行される。そして、ハードディスクドライブ3からSATAホストコントローラ8へ、実行されたコマンドに応じたメモリアクセス要求が送信される。   Next, the execution order of the queued commands is determined by the hard disk drive 3 so that the access efficiency to the disk is improved, and the commands are executed in the determined execution order. Then, a memory access request corresponding to the executed command is transmitted from the hard disk drive 3 to the SATA host controller 8.

そうすると、SATAホストコントローラ8から、当該メモリアクセス要求に応じたメモリアドレスaddrがメモリ4へ送信される。このとき、このメモリアドレスaddrが初期ベクトル供給部7によって取得され、初期ベクトル供給部7で初期ベクトルIVが生成されて暗号化部5、及び復号化部6へ出力される。   Then, the memory address addr corresponding to the memory access request is transmitted from the SATA host controller 8 to the memory 4. At this time, the memory address addr is acquired by the initial vector supply unit 7, and the initial vector supply unit 7 generates the initial vector IV and outputs it to the encryption unit 5 and the decryption unit 6.

図3は、図2に示す初期ベクトル供給部7の動作の一例を示すフローチャートである。まず、コマンド判定部71によって、メモリアドレスaddrが取得される。そして、コマンド判定部71は、情報テーブル74に記憶されている各コマンド情報におけるStart_Address[I]と、Sector_Size[I]とに基づいて、下記の式(1)を満たすコマンド番号Iを探索する(ステップS1)。   FIG. 3 is a flowchart showing an example of the operation of the initial vector supply unit 7 shown in FIG. First, the memory address addr is acquired by the command determination unit 71. Then, the command determination unit 71 searches for a command number I satisfying the following expression (1) based on Start_Address [I] and Sector_Size [I] in each command information stored in the information table 74 ( Step S1).

Start_Address[I] ≦ Addr < (Start_Address[I] + Sector_Size[I] × 512) ・・・(1)
式(1)は、ハードディスクドライブ3の1セクタが512Byteである場合の例を示している。そして、コマンド判定部71は、このようにして探索されたコマンド番号Iを、該当コマンド番号Isとして取得する(ステップS2)。
Start_Address [I] ≦ Addr <(Start_Address [I] + Sector_Size [I] × 512) (1)
Expression (1) shows an example in which one sector of the hard disk drive 3 is 512 bytes. And the command determination part 71 acquires the command number I searched in this way as applicable command number Is (step S2).

次に、セクタアドレス算出部72は、該当コマンド番号Isに基づいて、下記の式(2)によって、セクタアドレスLBAを算出する。   Next, the sector address calculation unit 72 calculates the sector address LBA by the following equation (2) based on the corresponding command number Is.

LBA=Start_LBA[Is]+(Addr − Start_Address[Is]/512) ・・・(2)
式(2)は、ハードディスクドライブ3の1セクタが512Byteである場合の例を示している。
LBA = Start_LBA [Is] + (Addr−Start_Address [Is] / 512) (2)
Expression (2) shows an example in which one sector of the hard disk drive 3 is 512 bytes.

次に、初期ベクトル生成部73によって、予め設定された所定の演算処理Make_Ivが、LBAに施されて、初期ベクトルIVが生成され(ステップS4)、初期ベクトルIVが、暗号化部5及び復号化部6へ出力される(ステップS5)。   Next, a predetermined arithmetic processing Make_Iv set in advance is applied to the LBA by the initial vector generation unit 73 to generate an initial vector IV (step S4), and the initial vector IV is encrypted with the encryption unit 5 and decrypted. Is output to the unit 6 (step S5).

そうすると、暗号化部5は、SATAホストコントローラ8からのメモリアドレスaddrに応じてメモリ4から出力されたデータ41を、初期ベクトル生成部73から出力された初期ベクトルIVと、暗号鍵記憶部9に記憶されている暗号鍵とに基づいて、AESのCBCモードで暗号化して暗号化データ51としてSATAホストコントローラ8へ出力する。SATAホストコントローラ8は、暗号化データ51をハードディスクドライブ3へ出力して記憶させる。   Then, the encryption unit 5 stores the data 41 output from the memory 4 in response to the memory address addr from the SATA host controller 8 in the initial vector IV output from the initial vector generation unit 73 and the encryption key storage unit 9. Based on the stored encryption key, encryption is performed in the AES CBC mode, and the encrypted data 51 is output to the SATA host controller 8. The SATA host controller 8 outputs the encrypted data 51 to the hard disk drive 3 and stores it.

この場合、ハードディスクドライブ3におけるSATAのNCQによって、コマンドの実行順序が変更された場合であっても、初期ベクトル生成部73によって、実際にアクセスされるメモリアドレスaddrに基づき正しい初期ベクトルIVが生成され、この正しい初期ベクトルIVに基づき、暗号化部5による暗号化が実行されるので、正しくAESのCBCモードで暗号化された暗号化データ51を、ハードディスクドライブ3に記憶させることができる。   In this case, even when the command execution order is changed by the SATA NCQ in the hard disk drive 3, the initial vector generation unit 73 generates the correct initial vector IV based on the memory address addr that is actually accessed. Since the encryption by the encryption unit 5 is executed based on the correct initial vector IV, the encrypted data 51 correctly encrypted in the AES CBC mode can be stored in the hard disk drive 3.

次に、ハードディスクドライブ3に記憶された暗号化データを読み出す場合、CPU100からSATAホストコントローラ8へ、ハードディスクドライブ3からメモリ4へのデータ転送を要求する複数のアクセス要求があると、SATAホストコントローラ8によって、SATAのAHCI規約に従って、当該アクセス要求に応じた複数のコマンドがハードディスクドライブ3へ送信される。そうすると、ハードディスクドライブ3において、当該複数のコマンドがキューイングされる。   Next, when reading the encrypted data stored in the hard disk drive 3, if there are a plurality of access requests for requesting data transfer from the CPU 100 to the SATA host controller 8 and from the hard disk drive 3 to the memory 4, the SATA host controller 8. Accordingly, a plurality of commands corresponding to the access request are transmitted to the hard disk drive 3 in accordance with the SATA AHCI protocol. Then, the plurality of commands are queued in the hard disk drive 3.

このとき、初期ベクトル供給部7によって、CPU100からのアクセス要求に基づいて、情報テーブル74が生成される。   At this time, the information vector 74 is generated by the initial vector supply unit 7 based on the access request from the CPU 100.

次に、ハードディスクドライブ3によって、ディスクへのアクセス効率がよくなるようにキューイングされたコマンドの実行順序が決定されて、当該決定された実行順にコマンドが実行される。そして、ハードディスクドライブ3からSATAホストコントローラ8へ、実行されたコマンドに応じたメモリ書き込み要求と、ハードディスクドライブ3から読み出された暗号化データ81とが出力される。   Next, the execution order of the commands queued so as to improve the access efficiency to the disk is determined by the hard disk drive 3, and the commands are executed in the determined execution order. Then, a memory write request corresponding to the executed command and encrypted data 81 read from the hard disk drive 3 are output from the hard disk drive 3 to the SATA host controller 8.

そうすると、SATAホストコントローラ8から、当該メモリアクセス要求に応じた書き込みアドレスを示すメモリアドレスaddrがメモリ4へ送信されると共に、暗号化データ81が復号化部6へ出力される。このとき、このメモリアドレスaddrが初期ベクトル供給部7によって取得され、上述のハードディスクドライブ3へのデータ書き込みの場合と同様に、ステップS1〜S5の動作によって、初期ベクトル供給部7で初期ベクトルIVが生成されて暗号化部5、及び復号化部6へ出力される。   Then, the memory address addr indicating the write address corresponding to the memory access request is transmitted from the SATA host controller 8 to the memory 4 and the encrypted data 81 is output to the decryption unit 6. At this time, the memory address addr is acquired by the initial vector supply unit 7, and the initial vector IV is generated by the initial vector supply unit 7 by the operations in steps S 1 to S 5, as in the case of writing data to the hard disk drive 3 described above. It is generated and output to the encryption unit 5 and the decryption unit 6.

そうすると、復号化部6は、SATAホストコントローラ8からメモリアドレスaddrと共に出力された暗号化データ81を、初期ベクトル生成部73から出力された初期ベクトルIVと、暗号鍵記憶部9に記憶されている暗号鍵とに基づいて、AESのCBCモードで復号化して復号化データ61としてメモリ4へ出力して記憶させる。   Then, the decryption unit 6 stores the encrypted data 81 output from the SATA host controller 8 together with the memory address addr in the initial vector IV output from the initial vector generation unit 73 and the encryption key storage unit 9. Based on the encryption key, decryption is performed in the AES CBC mode, and the decrypted data 61 is output to the memory 4 for storage.

この場合、ハードディスクドライブ3におけるSATAのNCQによって、コマンドの実行順序が変更された場合であっても、初期ベクトル生成部73によって、実際にアクセスされるメモリアドレスaddrに基づき正しい初期ベクトルIVが生成され、この正しい初期ベクトルIVに基づき、復号化部6による復号化が実行されるので、正しくAESのCBCモードで復号化された復号化データ61を、メモリ4に記憶させることができる。   In this case, even when the command execution order is changed by the SATA NCQ in the hard disk drive 3, the initial vector generation unit 73 generates the correct initial vector IV based on the memory address addr that is actually accessed. Since the decoding unit 6 performs decoding based on the correct initial vector IV, the decoded data 61 correctly decoded in the AES CBC mode can be stored in the memory 4.

以上のように、図1に記載の暗号化復号化装置2を用いたハードディスクドライブ装置1によれば、SATAのNCQを実行するハードディスクドライブ3へ、AESのCBCモードを用いて暗号化されたデータをリアルタイムで正しく記憶させ、リアルタイムで正しく復号化して読み出すことができる。   As described above, according to the hard disk drive device 1 using the encryption / decryption device 2 shown in FIG. 1, data encrypted using the AES CBC mode to the hard disk drive 3 that executes SATA NCQ. Can be stored correctly in real time, and can be correctly decoded and read out in real time.

本発明の一実施形態に係るハードディスクドライブ用の暗号化復号化装置を備えるハードディスクドライブ装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a hard-disk drive apparatus provided with the encryption / decryption apparatus for hard-disk drives which concerns on one Embodiment of this invention. 図1に示す初期ベクトル供給部の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the initial vector supply part shown in FIG. 図2に示す初期ベクトル供給部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the initial vector supply part shown in FIG.

符号の説明Explanation of symbols

1 ハードディスクドライブ装置
2 暗号化復号化装置
3 ハードディスクドライブ
4 メモリ
5 暗号化部
6 復号化部
7 初期ベクトル供給部
8 ホストコントローラ
9 暗号鍵記憶部
71 コマンド判定部
72 セクタアドレス算出部
73 初期ベクトル生成部
74 情報テーブル
I コマンド番号
IV 初期ベクトル
LBA セクタアドレス
addr メモリアドレス
DESCRIPTION OF SYMBOLS 1 Hard disk drive apparatus 2 Encryption / decryption apparatus 3 Hard disk drive 4 Memory 5 Encryption part 6 Decryption part 7 Initial vector supply part 8 Host controller 9 Encryption key memory | storage part 71 Command determination part 72 Sector address calculation part 73 Initial vector generation part 73 74 Information table I Command number IV Initial vector LBA Sector address addr Memory address

Claims (4)

メモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共に、キューイングされたコマンドの実行順序を決定するハードディスクドライブ用の暗号化復号化装置であって、
前記ハードディスクドライブにキューイングされた複数のコマンドに対応して、各コマンドが指定する、前記ハードディスクドライブのセクタアドレスを示すセクタアドレス情報と、前記メモリにおける前記転送を要求するデータのアドレス範囲とを対応付けて記憶する情報テーブルと、
前記ハードディスクドライブからのアクセス要求を受け付けて、前記メモリをアクセスするためのアドレスを出力する制御部と、
前記情報テーブルを参照して前記制御部から出力されたアドレスを含む前記アドレス範囲を探索し、当該探し出されたアドレス範囲と対応するセクタアドレス情報に基づきセクタアドレスを取得するセクタアドレス取得部と、
前記セクタアドレス取得部によって取得されたセクタアドレスに基づいて、前記初期ベクトルを生成する初期ベクトル生成部と、
データをブロック単位で暗号化するに際して、先頭データを暗号化するときに前記初期ベクトル生成部で生成された初期ベクトルを使用し、先頭データ以外のデータについては当該データの一つ前のデータを使用して暗号化を行うブロック暗号化方式によって、前記メモリから前記ハードディスクドライブへ転送されるデータを暗号化する暗号化部と、
前記ブロック暗号化方式により暗号化されたデータを、前記初期ベクトル生成部で生成された初期ベクトルを用いて、前記ハードディスクドライブから前記メモリへ転送される際に復号化する復号化部とを備え
前記情報テーブルは、
前記データのアドレス範囲を、前記メモリにおける前記転送を要求するデータの先頭アドレスと、前記転送を要求するデータのサイズとして記憶し、
前記セクタアドレス取得部は、
前記制御部から出力されたアドレスが前記先頭アドレス以上であって、かつ前記先頭アドレスと前記データのサイズとを加算したアドレスに満たない条件を満たすアドレス範囲を探索し、
前記情報テーブルは、
さらに、前記セクタアドレス情報として、前記各コマンドが指定するセクタアドレスの先頭を記憶し、
前記セクタアドレス取得部は、
前記制御部から出力されたアドレスと、前記情報テーブルにおいて前記探し出されたアドレス範囲と対応付けて記憶されている先頭アドレスとの差を前記ハードディスクドライブのセクタサイズで除した値を、前記情報テーブルにおいて前記探し出されたアドレス範囲と対応付けて記憶されているセクタアドレス情報に加算することにより、前記セクタアドレスを算出すること
を特徴とするハードディスクドライブ用の暗号化復号化装置。
An encryption / decryption device for a hard disk drive for queuing a plurality of commands for requesting data transfer to and from a memory and determining an execution order of the queued commands,
Corresponding to a plurality of commands queued to the hard disk drive, sector address information indicating a sector address of the hard disk drive specified by each command and an address range of data requesting the transfer in the memory An information table to be stored,
A control unit that receives an access request from the hard disk drive and outputs an address for accessing the memory;
A sector address acquisition unit that searches the address range including the address output from the control unit with reference to the information table, and acquires a sector address based on sector address information corresponding to the found address range;
An initial vector generation unit that generates the initial vector based on the sector address acquired by the sector address acquisition unit;
When encrypting data in units of blocks, the initial vector generated by the initial vector generation unit is used when encrypting the top data, and the data immediately before the data is used for data other than the top data An encryption unit that encrypts data transferred from the memory to the hard disk drive by a block encryption method that performs encryption.
A decryption unit that decrypts the data encrypted by the block encryption method when transferred from the hard disk drive to the memory using the initial vector generated by the initial vector generation unit ;
The information table is
Storing the address range of the data as the start address of the data requesting the transfer in the memory and the size of the data requesting the transfer;
The sector address acquisition unit
The address output from the control unit is greater than or equal to the start address and searches for an address range that satisfies a condition that does not satisfy the address obtained by adding the start address and the data size,
The information table is
Further, as the sector address information, the head of the sector address specified by each command is stored,
The sector address acquisition unit
A value obtained by dividing the difference between the address output from the control unit and the head address stored in association with the address range found in the information table by the sector size of the hard disk drive, An encryption / decryption device for a hard disk drive , wherein the sector address is calculated by adding to the sector address information stored in association with the found address range .
前記ハードディスクドライブは、
SATA(Serial Advanced Technology Attachment)のNCQ(Native Command Queuing)に対応すること
を特徴とする請求項記載のハードディスクドライブ用の暗号化復号化装置。
The hard disk drive is
SATA (Serial Advanced Technology Attachment) of NCQ encryption decoding apparatus for a hard disk drive of claim 1, wherein the corresponding (Native Command Queuing).
前記ブロック暗号化方式は、
AES(Advanced Encryption Standard)のCBC(Cipher Block Chaining)モードであること
を特徴とする請求項1又は2に記載のハードディスクドライブ用の暗号化復号化装置。
The block encryption method is:
The encryption / decryption device for a hard disk drive according to claim 1 or 2 , wherein the encryption / decryption device is a CBC (Cipher Block Chaining) mode of AES (Advanced Encryption Standard).
請求項1〜のいずれかに記載のハードディスクドライブ用の暗号化復号化装置と、
メモリと、
前記メモリとの間でのデータ転送を要求する複数のコマンドをキューイングすると共に、キューイングされたコマンドの実行順序を決定するハードディスクドライブと
を備えることを特徴とするハードディスクドライブ装置。
An encryption / decryption device for a hard disk drive according to any one of claims 1 to 3 ,
Memory,
A hard disk drive device comprising: a hard disk drive that queues a plurality of commands for requesting data transfer to and from the memory and determines an execution order of the queued commands.
JP2008029420A 2008-02-08 2008-02-08 Encryption / decryption device for hard disk drive and hard disk drive device Expired - Fee Related JP5017136B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008029420A JP5017136B2 (en) 2008-02-08 2008-02-08 Encryption / decryption device for hard disk drive and hard disk drive device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008029420A JP5017136B2 (en) 2008-02-08 2008-02-08 Encryption / decryption device for hard disk drive and hard disk drive device

Publications (2)

Publication Number Publication Date
JP2009187646A JP2009187646A (en) 2009-08-20
JP5017136B2 true JP5017136B2 (en) 2012-09-05

Family

ID=41070709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008029420A Expired - Fee Related JP5017136B2 (en) 2008-02-08 2008-02-08 Encryption / decryption device for hard disk drive and hard disk drive device

Country Status (1)

Country Link
JP (1) JP5017136B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5216719B2 (en) * 2009-08-27 2013-06-19 京セラドキュメントソリューションズ株式会社 Information processing apparatus and control apparatus
JP5481354B2 (en) * 2010-11-18 2014-04-23 京セラドキュメントソリューションズ株式会社 Information processing device
JP5524122B2 (en) * 2011-04-06 2014-06-18 京セラドキュメントソリューションズ株式会社 Information processing apparatus and information processing method
JP5524127B2 (en) * 2011-04-27 2014-06-18 京セラドキュメントソリューションズ株式会社 Information processing apparatus and information processing method
CN106850221B (en) * 2017-04-10 2019-11-08 四川阵风科技有限公司 Information encryption and decryption method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005215729A (en) * 2004-01-27 2005-08-11 Hitachi Global Storage Technologies Netherlands Bv Data transmission control method and storage device
JP2006139459A (en) * 2004-11-11 2006-06-01 Hitachi Global Storage Technologies Netherlands Bv Media drive and power saving method thereof
JP4853026B2 (en) * 2006-01-10 2012-01-11 富士ゼロックス株式会社 Information processing apparatus and program
JP2008017250A (en) * 2006-07-07 2008-01-24 Seiko Epson Corp Data transfer controller and electronic device
JP2008292852A (en) * 2007-05-25 2008-12-04 Hitachi Ltd Disk array controller, disk array control method and storage system

Also Published As

Publication number Publication date
JP2009187646A (en) 2009-08-20

Similar Documents

Publication Publication Date Title
JP5648209B2 (en) Storage system having encryption key selection device and encryption key selection method
JP5032647B2 (en) Data storage device, control device, and encryption method
EP3355232B1 (en) Input/output data encryption
JP5134894B2 (en) Storage apparatus and encryption key changing method
JP2012028860A (en) Recording device, controller and recording device control method
US20110264925A1 (en) Securing data on a self-encrypting storage device
JP2010020753A (en) Method of installing initial boot image, method of updating initial boot image, and storage device
JP5017136B2 (en) Encryption / decryption device for hard disk drive and hard disk drive device
JP2008052360A (en) Storage device and write execution program
US9323943B2 (en) Decrypt and encrypt data of storage device
JP5118494B2 (en) Memory system having in-stream data encryption / decryption function
KR101496975B1 (en) Solid-state-disk and input/output method thereof
JP4798672B2 (en) Magnetic disk unit
JP2009111687A (en) Storage device, and encrypted data processing method
JP2008524969A5 (en)
JP2012243381A (en) Data storage device, and storage control device and method
US20050259458A1 (en) Method and system of encrypting/decrypting data stored in one or more storage devices
US20100241870A1 (en) Control device, storage device, data leakage preventing method
JP2010256652A (en) Cryptographic processing apparatus and method for storage medium
JP5481354B2 (en) Information processing device
JP2010129128A (en) Storage apparatus, and data writing method
US10929030B2 (en) Computer and control method
JP2007336446A (en) Data encryption apparatus
JP2009175880A (en) Information processing apparatus and program
JP4853026B2 (en) Information processing apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120221

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120420

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120515

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120611

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150615

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5017136

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees