JP4853026B2 - Information processing apparatus and program - Google Patents

Information processing apparatus and program Download PDF

Info

Publication number
JP4853026B2
JP4853026B2 JP2006003034A JP2006003034A JP4853026B2 JP 4853026 B2 JP4853026 B2 JP 4853026B2 JP 2006003034 A JP2006003034 A JP 2006003034A JP 2006003034 A JP2006003034 A JP 2006003034A JP 4853026 B2 JP4853026 B2 JP 4853026B2
Authority
JP
Japan
Prior art keywords
block
file
initial vector
encryption
storage unit
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
JP2006003034A
Other languages
Japanese (ja)
Other versions
JP2007183514A (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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2006003034A priority Critical patent/JP4853026B2/en
Publication of JP2007183514A publication Critical patent/JP2007183514A/en
Application granted granted Critical
Publication of JP4853026B2 publication Critical patent/JP4853026B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、情報処理装置及びプログラムに係り、特に、ファイルをブロック暗号化して記憶する情報処理装置及びプログラムに関する。   The present invention relates to an information processing apparatus and a program, and more particularly, to an information processing apparatus and a program that store a block-encrypted file.

従来、ファイルを暗号化する方式として、ファイルをブロック毎に暗号化するブロック暗号化方式が採用されており、ここでブロック暗号アルゴリズムとして、米国標準技術局(NIST)によって選定された米国政府標準暗号AES(Advanced Encryption Standard)が知られている。   Conventionally, as a method for encrypting a file, a block encryption method for encrypting a file for each block has been adopted, and a US government standard encryption selected by the National Institute of Standards and Technology (NIST) as a block encryption algorithm here. AES (Advanced Encryption Standard) is known.

例えば、AESのモードのひとつであるCBC(Cipher Block Chaining)モードは、平文ブロックと直前ブロックの暗号文ブロックとの排他的論理和を取ることで、ブロックごとに同じ平文ブロックが連続した場合でも異なる暗号文ブロックを生成することが可能なモードである。この場合、ファイルの最初のブロックにおいては、直前ブロックの暗号文ブロックが存在しないため、別途初期ベクトル(IV)を設定している。   For example, the CBC (Cipher Block Chaining) mode, which is one of the AES modes, is different even when the same plaintext block is consecutive for each block by taking the exclusive OR of the plaintext block and the ciphertext block of the previous block. In this mode, a ciphertext block can be generated. In this case, since the ciphertext block of the immediately preceding block does not exist in the first block of the file, an initial vector (IV) is set separately.

この初期ベクトルをファイル単位で予め格納しておいて、データを暗号化する際には、初期ベクトルをファイルごとに変更しながら暗号化してHDDに格納するブロック暗号化方法が知られている(特許文献1)。
特開2002−42424
A block encryption method is known in which the initial vector is stored in advance in units of files, and when the data is encrypted, the initial vector is encrypted while being changed for each file and stored in the HDD (patent). Reference 1).
JP2002-42424

しかしながら、特許文献1に記載のブロック暗号化方法では、初期ベクトルをファイル単位に格納し、ファイル単位でブロック暗号化を行っているので、HDDに格納されたファイル中の特定箇所のデータのみ抜き出して読み出すことができず、アクセス時間が増大してしまう、という問題がある。仮に特定箇所のデータのみを読み出すことができるようにする場合は、予めその単位でファイルを構成する必要があり、ファイルごとの初期ベクトルの数が増加して、初期ベクトルを格納する領域が増加してしまう、という問題がある。   However, in the block encryption method described in Patent Document 1, since the initial vector is stored in units of files and block encryption is performed in units of files, only the data at a specific location in the file stored in the HDD is extracted. There is a problem in that it cannot be read and the access time increases. If only specific location data can be read out, it is necessary to configure a file in that unit in advance, increasing the number of initial vectors for each file and increasing the area for storing the initial vectors. There is a problem that.

本発明は、上記の問題点を解決するためになされたもので、暗号化されたファイル途中のデータのみを高速に取り出すことができ、かつ、初期ベクトルの格納領域の増加を抑止できる情報処理装置及びプログラムを提供することを目的とする。   The present invention has been made to solve the above-described problem, and is an information processing apparatus that can extract only data in the middle of an encrypted file at high speed and can suppress an increase in the storage area of the initial vector. And to provide a program.

上記の目的を達成するために第1の発明に係る情報処理装置は、ファイルを所定の記憶単位に分割して記憶するためのファイル記憶手段と、ファイルを所定のブロック単位に暗号化するブロック暗号化においてファイル毎に用いるための第1の初期ベクトルを複数記憶する初期ベクトル記憶手段と、ファイルに用いられる第1の初期ベクトルを所定の規則に基づいて変更することにより、該ファイルの前記ブロック暗号化において前記所定の記憶単位毎に用いるための第2の初期ベクトルを前記所定の記憶単位毎に生成する初期ベクトル生成手段と、入力されたファイルを前記所定の記憶単位に分割したときの前記所定の記憶単位における先頭ブロックをブロック暗号化する場合には、前記初期ベクトル生成手段によって生成された第2の初期ベクトル、該先頭ブロックの平文ブロック、及び暗号化鍵に基づいて、該先頭ブロックをブロック暗号化し、前記所定の記憶単位における先頭ブロックでないブロックをブロック暗号化する場合には、該ブロックの直前のブロックをブロック暗号化した暗号文ブロック、該ブロックの平文ブロック、及び前記暗号化鍵に基づいて、該ブロックをブロック暗号化する暗号化手段と、前記暗号化手段によってブロック暗号化されたファイルを前記ファイル記憶手段に記憶させる記憶制御手段とを含んで構成されている。 In order to achieve the above object, an information processing apparatus according to a first invention comprises file storage means for storing a file by dividing the file into predetermined storage units, and block encryption for encrypting the files in predetermined block units. Initial vector storage means for storing a plurality of first initial vectors to be used for each file in the conversion, and changing the first initial vector used for the file based on a predetermined rule, whereby the block cipher of the file Initial vector generating means for generating a second initial vector for each predetermined storage unit for use in each predetermined storage unit, and the predetermined when the input file is divided into the predetermined storage units When the first block in the storage unit is block-encrypted, the second initial value generated by the initial vector generating means is used. Vector, plaintext block of the first block, on the basis of the及beauty encryption key, the first block is block encryption, a block not the head block in the predetermined storage unit in the case of block encryption is just before the block A block ciphertext block obtained by block-encrypting the block, an encryption means for block-encrypting the block based on the plaintext block of the block, and the encryption key, and a file encrypted by the encryption means. Storage control means for storing in the file storage means.

また、第2の発明に係るプログラムは、コンピュータを、ファイルを所定の記憶単位に分割して記憶するためのファイル記憶手段、ファイルを所定のブロック単位に暗号化するブロック暗号化においてファイル毎に用いるための第1の初期ベクトルを複数記憶する初期ベクトル記憶手段、ファイルに用いられる第1の初期ベクトルを所定の規則に基づいて変更することにより、該ファイルの前記ブロック暗号化において前記所定の記憶単位毎に用いるための第2の初期ベクトルを前記所定の記憶単位毎に生成する初期ベクトル生成手段、入力されたファイルを前記所定の記憶単位に分割したときの前記所定の記憶単位における先頭ブロックをブロック暗号化する場合には、前記初期ベクトル生成手段によって生成された第2の初期ベクトル、該先頭ブロックの平文ブロック、及び暗号化鍵に基づいて、該先頭ブロックをブロック暗号化し、前記所定の記憶単位における先頭ブロックでないブロックをブロック暗号化する場合には、該ブロックの直前のブロックをブロック暗号化した暗号文ブロック、該ブロックの平文ブロック、及び前記暗号化鍵に基づいて、該ブロックをブロック暗号化する暗号化手段、及び前記暗号化手段によってブロック暗号化されたファイルを前記ファイル記憶手段に記憶させる記憶制御手段として機能させることを特徴としている。 A program according to the second invention uses a computer for each file in a file storage means for storing a file by dividing the file into predetermined storage units, and block encryption for encrypting the file into predetermined block units. Initial vector storage means for storing a plurality of first initial vectors for use in the block encryption of the file by changing the first initial vector used for the file based on a predetermined rule. Initial vector generation means for generating a second initial vector for each predetermined storage unit, and blocks the first block in the predetermined storage unit when the input file is divided into the predetermined storage units When encrypting, the second initial vector generated by the initial vector generating means, Plaintext block of the first block, on the basis of the及beauty encryption key, the first block is block encryption, in the case of block encryption block not the head block in the predetermined storage unit, the immediately preceding block of the block A block-encrypted ciphertext block, a plaintext block of the block, and an encryption means for block-encrypting the block based on the encryption key, and a file block-encrypted by the encryption means as the file storage It is characterized by functioning as storage control means for storing in the means.

第1の発明及び第2の発明によれば、入力されたファイルを所定の記憶単位に分割したときの所定の記憶単位における先頭ブロックをブロック暗号化する場合には、初期ベクトル生成手段によって、このファイルに用いられる第1の初期ベクトルを所定の規則に基づいて変更することにより、このファイルのブロック暗号化において所定の記憶単位毎に用いるための第2の初期ベクトルを生成し、暗号化手段によって、初期ベクトル生成手段によって生成された第2の初期ベクトル、この先頭ブロックの平文ブロック、及び暗号化鍵に基づいて、この先頭ブロックをブロック暗号化する。   According to the first invention and the second invention, when the first block in a predetermined storage unit when the input file is divided into the predetermined storage unit is block-encrypted, the initial vector generating means By changing the first initial vector used for the file based on a predetermined rule, a second initial vector to be used for each predetermined storage unit in the block encryption of this file is generated, and the encryption means The head block is block-encrypted based on the second initial vector generated by the initial vector generating means, the plaintext block of the head block, and the encryption key.

また、所定の記憶単位における先頭ブロックでないブロックをブロック暗号化する場合には、暗号化手段によって、このブロックの直前のブロックをブロック暗号化した暗号文ブロック、このブロックの平文ブロック、及び暗号化鍵に基づいて、このブロックをブロック暗号化する。   When a block that is not the first block in a predetermined storage unit is block-encrypted, the ciphertext block obtained by block-encrypting the block immediately before this block by the encryption means, the plaintext block of this block, and the encryption key This block is block-encrypted based on

そして、記憶制御手段によって、暗号化手段によってブロック暗号化されたファイルをファイル記憶手段に記憶させる。   Then, the file that has been block encrypted by the encryption means is stored in the file storage means by the storage control means.

従って、所定の記憶単位毎の第2の初期ベクトルを用いて所定の記憶単位毎にブロック暗号化を行うことにより、暗号化されたファイル途中のデータのみを所定の記憶単位毎に高速に取り出すことができ、また、所定の記憶単位毎に用いられる第2の初期ベクトルを、ファイル毎に用いられる第1の初期ベクトルを変更して生成することにより、初期ベクトルの格納領域の増加を抑止することができる。   Therefore, by performing block encryption for each predetermined storage unit using the second initial vector for each predetermined storage unit, only the data in the middle of the encrypted file is retrieved at high speed for each predetermined storage unit. In addition, the second initial vector used for each predetermined storage unit is generated by changing the first initial vector used for each file, thereby suppressing an increase in the storage area of the initial vector. Can do.

また、第1の発明に係る情報処理装置は、ファイル記憶手段に記憶されたファイルを所定の記憶単位に分割したときの所定の記憶単位における先頭ブロックをブロック復号化する場合には、初期ベクトル生成手段によって生成された第2の初期ベクトル、この先頭ブロックの暗号文ブロック、及び暗号化鍵に基づいて、この先頭ブロックをブロック復号化し、所定の記憶単位における先頭ブロックでないブロックをブロック復号化する場合には、このブロックの直前のブロックをブロック暗号化した暗号文ブロック、このブロックの暗号文ブロック、及び暗号化鍵に基づいて、このブロックをブロック復号化する復号化手段を更に含み、初期ベクトル生成手段は、ファイルに用いられた第1の初期ベクトルを所定の規則に基づいて変更することにより、このファイルのブロック復号化において所定の記憶単位毎に用いるための第2の初期ベクトルを所定の記憶単位毎に生成することができる。これにより、ブロック暗号化されて記憶されたファイルをブロック復号化して取り出すときに、取り出すデータがファイル途中のデータであっても、初期ベクトル生成手段によって生成された第2の初期ベクトルを用いて、ファイル途中のデータのみを所定の記憶単位毎に復号化して取り出すことができる。   In addition, the information processing apparatus according to the first aspect of the present invention generates an initial vector when block decoding a head block in a predetermined storage unit when a file stored in the file storage unit is divided into predetermined storage units. When the first block is decrypted based on the second initial vector generated by the means, the ciphertext block of the first block, and the encryption key, and the block that is not the first block in a predetermined storage unit is block-decrypted Includes a ciphertext block obtained by block-encrypting the block immediately before this block, a ciphertext block of this block, and a decryption means for block-decrypting this block based on the encryption key, and generating an initial vector The means changes the first initial vector used for the file based on a predetermined rule. Accordingly, it is possible to generate a second initial vector for use in predetermined storage unit in block decoding of the file for each predetermined unit of storage. Thereby, when the block-encrypted and stored file is extracted by block decryption, even if the data to be extracted is data in the middle of the file, the second initial vector generated by the initial vector generating means is used. Only data in the middle of the file can be decoded and extracted for each predetermined storage unit.

また、第1の発明に係る暗号化手段は、入力されたファイルの先頭ブロックをブロック暗号化する場合には、初期ベクトル記憶手段に記憶された第1の初期ベクトル、この先頭ブロックの平文ブロック、及び所定の暗号化鍵に基づいて、この先頭ブロックをブロック暗号化することができる。   Further, the encryption means according to the first invention, when block encryption of the head block of the input file, the first initial vector stored in the initial vector storage means, the plaintext block of this head block, Based on a predetermined encryption key, the head block can be block-encrypted.

また、この情報処理装置は、ファイル記憶手段に記憶されたファイルの先頭ブロックをブロック復号化する場合には、このファイルに用いられた第1の初期ベクトル、この先頭ブロックの暗号文ブロック、及び暗号化鍵に基づいて、この先頭ブロックをブロック復号化し、ファイルを所定の記憶単位に分割したときの所定の記憶単位における先頭ブロックをブロック復号化する場合には、初期ベクトル生成手段によって生成された第2の初期ベクトル、この先頭ブロックの暗号文ブロック、及び暗号化鍵に基づいて、この先頭ブロックをブロック復号化し、ファイルのブロックでなく、かつ、所定の記憶単位における先頭ブロックでないブロックをブロック復号化する場合には、このブロックの直前のブロックをブロック暗号化した暗号文ブロック、このブロックの暗号文ブロック、及び暗号化鍵に基づいて、このブロックをブロック復号化する復号化手段を更に含み、初期ベクトル生成手段は、ファイルに用いられた第1の初期ベクトルを所定の規則に基づいて変更することにより、このファイルの前記ブロック復号化において所定の記憶単位毎に用いるための第2の初期ベクトルを所定の記憶単位毎に生成することができる。   In addition, when the information processing apparatus performs block decryption on the first block of the file stored in the file storage means, the first initial vector used for the file, the ciphertext block of the first block, and the encryption When block decoding is performed on the head block based on the encryption key and the head block in the predetermined storage unit when the file is divided into the predetermined storage unit is block-decoded, the first block generated by the initial vector generation means is used. Based on the initial vector of 2, the ciphertext block of the head block, and the encryption key, the head block is block-decrypted, and the block that is not the file block and is not the head block in the predetermined storage unit is block-decrypted If this is the case, the ciphertext block in which the block immediately before this block is encrypted And a decryption unit for performing block decryption on the block based on the ciphertext block of the block and the encryption key, and the initial vector generation unit is configured to determine the first initial vector used for the file in advance. Thus, the second initial vector to be used for each predetermined storage unit in the block decoding of this file can be generated for each predetermined storage unit.

また、上記の所定の記憶単位を、ファイル記憶手段の論理アドレス分割単位とすることができる。   The predetermined storage unit can be a logical address division unit of the file storage means.

また、上記のファイル記憶手段はハードディスクであって、所定の記憶単位を、ハードディスクのセクタ単位とすることができる。   The file storage means is a hard disk, and a predetermined storage unit can be a sector unit of the hard disk.

以上説明したように、本発明の情報処理装置及びプログラムによれば、所定の記憶単位毎の第2の初期ベクトルを用いて所定の記憶単位毎にブロック暗号化を行うことにより、暗号化されたファイル途中のデータのみを所定の記憶単位毎に高速に取り出すことができ、また、所定の記憶単位毎に用いられる第2の初期ベクトルを、第1の初期ベクトルに基づいて生成することにより、初期ベクトルの格納領域の増加を抑止することができる、という効果が得られる。   As described above, according to the information processing apparatus and program of the present invention, encryption is performed by performing block encryption for each predetermined storage unit using the second initial vector for each predetermined storage unit. Only the data in the middle of the file can be retrieved at high speed for each predetermined storage unit, and the second initial vector used for each predetermined storage unit is generated based on the first initial vector, so that the initial An effect is obtained that an increase in the storage area of the vector can be suppressed.

以下、本発明の実施の形態について図面を参照して説明する。なお、本実施の形態では、複写機に本発明を適用した場合について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In this embodiment, a case where the present invention is applied to a copying machine will be described.

図1に示すように、本発明の第1の実施の形態に係る複写機10は、各種プログラムやパラメータ等が記憶されたROM12、各種プログラムを実行するCPU14、CPU14による各種プログラムの実行時におけるワークエリア等として用いられるRAM16、画像ファイルなどを暗号化及び復号化するためのデータ処理装置18、及びこれらを相互に接続するためのバス20が設けられている。   As shown in FIG. 1, the copying machine 10 according to the first embodiment of the present invention includes a ROM 12 that stores various programs, parameters, and the like, a CPU 14 that executes various programs, and a work performed when the CPU 14 executes various programs. A RAM 16 used as an area, a data processing device 18 for encrypting and decrypting image files, and a bus 20 for connecting them to each other are provided.

また、データ処理装置18には、暗号化された画像ファイルなどを記憶するためのHDD22が接続されている。HDD22の記録領域は、セクタ単位(例えば512Byte)で分割されており、画像ファイルは複数のセクタに分割されて記憶されるようになっている。なお、画像ファイルは、単一セクタに記憶されるサイズでも複数セクタに記憶されるサイズでもよい。また、画像ファイル毎にセクタ数が異なっていてもよい。   The data processing device 18 is connected to an HDD 22 for storing an encrypted image file. The recording area of the HDD 22 is divided in units of sectors (for example, 512 bytes), and the image file is divided into a plurality of sectors and stored. The image file may have a size stored in a single sector or a size stored in a plurality of sectors. The number of sectors may be different for each image file.

また、複写機10には、さらに、原稿を読みとって画像ファイルを生成するスキャナ24と、画像ファイルに基づいて感光体に静電潜像を記録し、静電潜像をモノクロトナーまたはカラートナーを用いて現像し、現像した画像を記録用紙に転写して出力する印字部26と、複写機10の各種処理を指示するための操作ボタンや操作パネルからなる操作パネル部28とが設けられており、これらもバス20に接続されている。   The copying machine 10 further includes a scanner 24 that reads an original to generate an image file, and records an electrostatic latent image on a photoconductor based on the image file, and the electrostatic latent image is printed with monochrome toner or color toner. There are provided a printing unit 26 that develops and develops the image, transfers the developed image to a recording sheet, and outputs, and an operation panel unit 28 including operation buttons and an operation panel for instructing various processes of the copying machine 10. These are also connected to the bus 20.

また、図2に示すように、データ処理装置18には、バス20との入出力を制御するためのバスインタフェース30と、画像ファイルの暗号化及び復号化に用いるための初期ベクトルを格納するための初期ベクトル格納メモリ32と、初期ベクトル格納メモリ32に格納されている初期ベクトルを変更する初期ベクトル変更部34と、暗号化及び復号化に用いる共通鍵を格納した共通鍵格納メモリ36と、画像ファイルを暗号化する暗号化部38と、HDD22との入出力を制御するためのHDDインタフェースとが設けられている。なお、暗号化部38は、HDD22から読み出した画像ファイルを復号化する機能も備えている。   Further, as shown in FIG. 2, the data processing device 18 stores a bus interface 30 for controlling input / output with the bus 20 and an initial vector used for encryption and decryption of an image file. Initial vector storage memory 32, initial vector change unit 34 for changing the initial vector stored in initial vector storage memory 32, common key storage memory 36 storing a common key used for encryption and decryption, image An encryption unit 38 for encrypting the file and an HDD interface for controlling input / output with the HDD 22 are provided. The encryption unit 38 also has a function of decrypting the image file read from the HDD 22.

なお、データ処理装置18の各部の機能は、例えば回路(LSIチップ)によって実現されるように実装されている。   The functions of each unit of the data processing device 18 are mounted so as to be realized by, for example, a circuit (LSI chip).

なお、複写機10は、従来公知のプリンタやスキャナの一般的な構成や機能を備えていればよく、複写機10の他の構成や一般的な機能について、詳細な説明を省略する。   Note that the copying machine 10 only needs to have a general configuration and functions of a conventionally known printer and scanner, and detailed description of other configurations and general functions of the copying machine 10 is omitted.

次に、データ処理装置18の暗号化部38で行われる暗号化及び復号化の方式について図3を用いて説明する。   Next, encryption and decryption methods performed by the encryption unit 38 of the data processing device 18 will be described with reference to FIG.

本実施形態における暗号化及び復号化は、ファイルをブロック単位に分けて行うブロック暗号化方式及びブロック復号化方式を採用しており、まず、ファイルの先頭ブロックについては、先頭ブロックの平文ブロックP1と初期ベクトルIVとについて、ビット毎に排他的論理和(XOR)を演算し、その演算結果を共通鍵Kによって暗号化して(E)、暗号文ブロックC1を生成する。そして、次のブロックについて、平文ブロックP2と直前ブロックの暗号文ブロックC1とに対して排他的論理和(XOR)演算し、その演算結果を共通鍵Kによって暗号化して(E)して暗号文ブロックC2を生成し、次のブロック以降についても同様に暗号化を行う。   The encryption and decryption in the present embodiment employs a block encryption method and a block decryption method in which a file is divided into block units. First, with respect to the first block of the file, the plaintext block P1 of the first block and For the initial vector IV, an exclusive OR (XOR) is calculated for each bit, and the operation result is encrypted with the common key K (E) to generate a ciphertext block C1. Then, for the next block, an exclusive OR (XOR) operation is performed on the plaintext block P2 and the ciphertext block C1 of the immediately preceding block, and the operation result is encrypted with the common key K (E) to obtain a ciphertext. Block C2 is generated, and encryption is similarly performed for the subsequent blocks.

また、復号化する場合には、ファイルの先頭ブロックについては、暗号文ブロックC1を共通鍵Kで復号化し、その復号結果と初期ベクトルIVとの排他的論理和(XOR)を演算して、平文ブロックP1を生成する。そして、次のブロックについては、暗号文ブロックC2を共通鍵Kで復号化し、その復号結果と直前ブロックの暗号文ブロックC1との排他的論理和(XOR)を演算して、平文ブロックP2を生成し、次のブロック以降についても同様に復号化を行う。   In the case of decryption, for the first block of the file, the ciphertext block C1 is decrypted with the common key K, the exclusive OR (XOR) of the decryption result and the initial vector IV is calculated, and the plaintext A block P1 is generated. For the next block, the ciphertext block C2 is decrypted with the common key K, and an exclusive OR (XOR) between the decryption result and the ciphertext block C1 of the immediately preceding block is calculated to generate a plaintext block P2. The decoding is performed in the same manner for the subsequent blocks.

次に、第1の実施の形態の作用について説明する。なお、画像ファイルをブロック暗号化してHDD22に記憶させる場合を例に説明する。   Next, the operation of the first embodiment will be described. An example in which an image file is block-encrypted and stored in the HDD 22 will be described as an example.

まず、ユーザによって、複写機10のスキャナ24の原稿読取位置に原稿がセットされ、ユーザが操作パネル部28を操作して、原稿の読取処理が指示されると、スキャナ24によって原稿が読み取られ、原稿を示す画像ファイルが生成される。   First, when a user sets a document at a document reading position of the scanner 24 of the copying machine 10 and the user operates the operation panel unit 28 to instruct a document reading process, the document is read by the scanner 24. An image file indicating the document is generated.

そして、データ処理装置18では、図4に示す暗号化処理ルーチンが実行される。   Then, the data processing device 18 executes the encryption processing routine shown in FIG.

まず、ステップ100において、画像ファイルが入力されたか否かが判定され、スキャナ24によって生成された画像ファイルが、バス20を介して入力されると、ステップ100からステップ102へ進み、画像ファイルの先頭ブロックを暗号化対象ブロックに設定する。   First, in step 100, it is determined whether an image file has been input. When the image file generated by the scanner 24 is input via the bus 20, the process proceeds from step 100 to step 102, where the head of the image file is entered. Set the block to be encrypted.

そして、ステップ104において、暗号化対象ブロックが、セクタ単位における先頭ブロックであるか否かを判定し、画像ファイルの先頭ブロック(先頭セクタの先頭ブロック)であるか、又は、画像ファイルをセクタ単位に分割した場合の何れかのセクタの先頭ブロックである場合には、ステップ106において、暗号化対象ブロックが画像ファイルの先頭ブロックであるか否かを判定し、画像ファイルの先頭ブロックである場合には、ステップ108において、初期ベクトル格納メモリ32から初期ベクトルを読み込んで、ステップ112へ移行する。一方、ステップ106において、暗号化対象ブロックが画像ファイルの途中のセクタの先頭ブロックであると、ステップ110において、初期ベクトル変更部34によって、ステップ108で読み込まれた初期ベクトルを所定の規則に基づいて変更して、新たに初期ベクトルを生成し、ステップ112へ移行する。   In step 104, it is determined whether or not the encryption target block is the first block in the sector unit, and it is the first block of the image file (first block in the first sector), or the image file is converted into the sector unit. If it is the first block of any sector when divided, it is determined in step 106 whether or not the encryption target block is the first block of the image file. In step 108, the initial vector is read from the initial vector storage memory 32, and the process proceeds to step 112. On the other hand, if the block to be encrypted is the first block of a sector in the middle of the image file in step 106, the initial vector read in step 108 by the initial vector changing unit 34 is determined based on a predetermined rule in step 110. Change to generate a new initial vector and proceed to step 112.

なお、新たな初期ベクトルの生成方法としては、例えば、前のセクタにおける初期ベクトルを所定量増加させる方法を用いればよく(又は、読み込まれた初期ベクトルを所定量のセクタ数倍だけ増加させる方法)、または他の公知の方法を用いればよい。また、この生成方法は、秘密に定義されている。   As a method for generating a new initial vector, for example, a method of increasing the initial vector in the previous sector by a predetermined amount may be used (or a method of increasing the read initial vector by a predetermined number of sectors). Or other known methods may be used. This generation method is secretly defined.

ステップ112では、読み込まれた初期ベクトル又は生成された初期ベクトルを暗号化における直前ブロックの暗号文ブロックとして設定し、ステップ114で、図3で説明したブロック暗号化処理を行い、ステップ116において、HDDインタフェース40によって、生成された暗号文ブロックをHDD22に記憶させる。   In step 112, the read initial vector or the generated initial vector is set as the ciphertext block of the immediately preceding block in the encryption, and in step 114, the block encryption processing described in FIG. 3 is performed. The generated ciphertext block is stored in the HDD 22 by the interface 40.

また、ステップ104において、暗号化対象ブロックが、画像ファイルにおける先頭ブロックでもなく、また、画像ファイルをセクタ単位に分割した場合のいずれのセクタの先頭ブロックでもない場合には、ステップ114へ移行し、ステップ114で、図3で説明したように、直前のブロックの暗号文ブロックを用いてブロック暗号化処理を行う。   If the encryption target block is not the first block in the image file in step 104 and is not the first block of any sector when the image file is divided into sectors, the process proceeds to step 114. In step 114, as described in FIG. 3, block encryption processing is performed using the ciphertext block of the immediately preceding block.

ステップ118では、暗号化対象ブロックが、画像ファイルの最終ブロックであるか否かを判定し、画像ファイルにおいて、ブロック暗号化処理が行われていないブロックがある場合には、ステップ120において、画像ファイルにおける次のブロックを、暗号化対象ブロックに設定し、ステップ104へ戻り、次のブロックに対して、上記のステップ104〜ステップ118を行う。一方、画像ファイルの全てのブロックについて、ブロック暗号化処理が行われ、暗号文ブロックがHDD22に記憶された場合には、暗号化処理ルーチンを終了する。   In step 118, it is determined whether the encryption target block is the last block of the image file. If there is a block that has not been subjected to block encryption processing in the image file, in step 120, the image file is checked. The next block in is set as an encryption target block, and the process returns to step 104, and the above steps 104 to 118 are performed on the next block. On the other hand, when the block encryption process is performed for all the blocks of the image file and the ciphertext block is stored in the HDD 22, the encryption process routine is terminated.

上記のようにブロック暗号化処理が行われると、図5に示すように、HDD22における画像ファイルAが記憶されている先頭セクタには、初期ベクトル格納メモリ32から読み出した初期ベクトルAを用いてブロック暗号化された暗号文ブロックが記憶され、2番目のセクタ及び3番目のセクタの各々については、初期ベクトルAを変更して生成された初期ベクトルA2、A3を用いてブロック暗号化された暗号文ブロックが記憶される。また、他の画像ファイルBについては、先頭セクタには、初期ベクトル格納メモリ32から読み出した初期ベクトルBを用いてブロック暗号化された暗号文ブロックが記憶され、続くセクタには、初期ベクトルBを変更して生成された初期ベクトルB2、B3を用いてブロック暗号化された暗号文ブロックが記憶される。   When the block encryption processing is performed as described above, as shown in FIG. 5, the initial sector A read out from the initial vector storage memory 32 is used as the head sector in which the image file A in the HDD 22 is stored. The encrypted ciphertext block is stored, and for each of the second sector and the third sector, the ciphertext block-encrypted using the initial vectors A2 and A3 generated by changing the initial vector A The block is stored. For the other image file B, a ciphertext block that is block-encrypted using the initial vector B read from the initial vector storage memory 32 is stored in the first sector, and the initial vector B is stored in the subsequent sector. A ciphertext block that is block-encrypted using the initial vectors B2 and B3 generated by the change is stored.

また、HDD22から画像ファイルAの先頭セクタが取り出される場合には、初期ベクトル格納メモリ32の初期ベクトルAを用いてブロック復号化して、復号化された平文ブロックが取り出される。   When the head sector of the image file A is extracted from the HDD 22, block decoding is performed using the initial vector A of the initial vector storage memory 32, and the decrypted plaintext block is extracted.

また、HDD22から画像ファイルAの2番目のセクタ又は3番目のセクタのみが取り出される場合には、初期ベクトル格納メモリ32の初期ベクトルAを変更した初期ベクトルA2、又はA3を生成して、生成した初期ベクトルA2又はA3を用いてブロック復号化して、復号化された平文ブロックが取り出される。なお、先頭セクタに画像ファイルAを記憶する際に行われるブロック暗号化で用いられる初期ベクトルAと、先頭セクタから画像ファイルAを取り出す際に行われるブロック復号化で用いられる初期ベクトルAとは同一であり、また、2番目のセクタ及び3番目のセクタの各々に画像ファイルAを記憶する際に行われるブロック暗号化で用いられる初期ベクトルA2、A3と、2番目のセクタ及び3番目のセクタの各々から画像ファイルAを取り出す際に行われるブロック復号化で用いられる初期ベクトルA2、A3とは同一となっている。   When only the second sector or the third sector of the image file A is extracted from the HDD 22, the initial vector A2 or A3 obtained by changing the initial vector A of the initial vector storage memory 32 is generated and generated. Block decryption is performed using the initial vector A2 or A3, and a decrypted plaintext block is extracted. Note that the initial vector A used in block encryption performed when the image file A is stored in the head sector is the same as the initial vector A used in block decryption performed when the image file A is extracted from the head sector. The initial vectors A2 and A3 used in block encryption performed when the image file A is stored in each of the second sector and the third sector, and the second sector and the third sector The initial vectors A2 and A3 used in block decoding performed when the image file A is extracted from each are the same.

以上説明したように、第1の実施の形態に係る複写機によれば、セクタ単位毎の初期ベクトルを用いてセクタ単位毎にブロック暗号化を行うことにより、暗号化されたファイル途中のデータのみをセクタ単位で高速に取り出すことができ、また、セクタ単位毎に用いられる初期ベクトルを、ファイル毎に用いられる初期ベクトルを変更して生成することにより、初期ベクトルの格納領域の増加を抑止することができる。   As described above, according to the copying machine according to the first embodiment, by performing block encryption for each sector unit using the initial vector for each sector unit, only the data in the middle of the encrypted file is stored. Can be extracted at high speed in units of sectors, and the initial vector used for each sector is generated by changing the initial vector used for each file, thereby suppressing an increase in the storage area of the initial vector. Can do.

また、ブロック暗号化されて記憶されたファイルをブロック復号化して取り出すときに、取り出すデータがファイル途中のデータであっても、生成された初期ベクトルを用いて、ファイル途中のデータのみをセクタ単位毎に復号化して取り出すことができる。   In addition, when a block-encrypted and stored file is extracted by block decryption, even if the data to be extracted is data in the middle of the file, only the data in the middle of the file is obtained for each sector using the generated initial vector. Can be decrypted and extracted.

また、直前のブロックの暗号文ブロックを用いてブロック暗号化を行うため、ブロック暗号化において、ブロック毎に暗号化鍵と平文ブロックが同じであっても同じ暗号文ブロックが生成されないため、セキュリティを向上させることができる。   In addition, since block encryption is performed using the ciphertext block of the immediately preceding block, even if the encryption key and plaintext block are the same for each block, the same ciphertext block is not generated for each block. Can be improved.

また、セクタ毎に初期ベクトルを変更できるため、複数セクタに記憶される内容が同一であっても、異なる暗号文ブロックとなるため、解読されにくい。   In addition, since the initial vector can be changed for each sector, even if the contents stored in a plurality of sectors are the same, the ciphertext blocks are different, so that it is difficult to decipher.

また、画像ファイルのサイズをセクタ単位で自由に変更することができ、ファイル管理が容易となる。   Further, the size of the image file can be freely changed in units of sectors, and file management becomes easy.

また、ファイル途中のデータのみをセクタ単位で取り出し可能なため、例えば不連続なアドレスからの連続読み出しも可能となる。   Further, since only the data in the middle of the file can be taken out in units of sectors, for example, continuous reading from discontinuous addresses is possible.

なお、本実施の形態では、LSIチップに暗号化及び復号化を行う機能を実装した場合を例に説明したが、これに限定されるものではなく、暗号化及び復号化を行う機能を実現したプログラムを予め記憶し、CPUによってこのプログラムを実行して、上述した暗号化及び復号化を行うようにしてもよい。   In this embodiment, the case where functions for performing encryption and decryption are mounted on an LSI chip has been described as an example. However, the present invention is not limited to this, and functions for performing encryption and decryption are realized. The program may be stored in advance and executed by the CPU to perform the above-described encryption and decryption.

また、ファイルの先頭ブロックをブロック暗号化するときには、記憶された初期ベクトルをそのまま用いる場合を例に説明したが、ファイルの先頭ブロックについても、他のセクタと同様に、記憶された初期ベクトルを変更して新たに生成された初期ベクトルを用いてブロック暗号化するようにしてもよい。その場合には、ファイルの先頭ブロックについてブロック復号化する際にも、記憶された初期ベクトルを変更して生成した初期ベクトルを用いてブロック復号化するようにすればよい。   Also, when block encryption is performed on the first block of the file, the stored initial vector is used as an example. However, the stored initial vector is also changed for the first block of the file as with other sectors. Then, block encryption may be performed using the newly generated initial vector. In that case, when performing block decoding on the first block of the file, block decoding may be performed using the initial vector generated by changing the stored initial vector.

また、画像ファイルをHDDに記憶する場合を例に説明したが、他の記憶媒体に画像ファイルを記憶するようにしてもよい。この場合には、記憶媒体の論理アドレス分割単位に画像ファイルを分割して記憶し、初期ベクトルを論理アドレス分割単位毎に生成するようにすればよい。   Further, although the case where the image file is stored in the HDD has been described as an example, the image file may be stored in another storage medium. In this case, the image file may be divided and stored in logical address division units of the storage medium, and an initial vector may be generated for each logical address division unit.

次に、本発明の第2の実施の形態に係る画像処理装置について説明する。なお、第1の実施の形態と同一の構成、作用については、第1の実施の形態と同一符号を付してその説明を省略する。   Next, an image processing apparatus according to the second embodiment of the present invention will be described. In addition, about the structure and effect | action same as 1st Embodiment, the same code | symbol as 1st Embodiment is attached | subjected and the description is abbreviate | omitted.

第2の実施の形態では、共通の初期ベクトルとブロック暗号化した暗号文ブロックを記憶させるセクタのアドレスとに基づいて初期ベクトルを生成し、生成した初期ベクトルを用いて、セクタ毎にブロック暗号化処理を行う点が第1の実施の形態と異なっている。   In the second embodiment, an initial vector is generated based on a common initial vector and an address of a sector that stores a block-encrypted ciphertext block, and block encryption is performed for each sector using the generated initial vector. The difference from the first embodiment is that processing is performed.

図6に示すように、第2の実施の形態に係る複写機のデータ処理装置128には、画像ファイルのブロック暗号化においてセクタ毎に用いられる初期ベクトルを生成する基となる共通初期ベクトルを格納する共通初期ベクトル格納メモリ130と、HDD22のセクタアドレスを格納するアドレス格納メモリ132と、共通初期ベクトル格納メモリ130に格納された共通初期ベクトル及びアドレス格納メモリ132に格納されたセクタアドレスに基づいて、画像ファイルのブロック暗号化において、セクタ毎に用いられる初期ベクトルを生成する初期ベクトル生成部134と、バスインタフェース30と、共通鍵格納メモリ36と、暗号化部38と、HDDインタフェース40とが設けられている。これらの各部の機能は、例えば、LSIチップの機能として実装されている。   As shown in FIG. 6, the data processing device 128 of the copier according to the second embodiment stores a common initial vector that is a basis for generating an initial vector used for each sector in block encryption of an image file. Based on the common initial vector storage memory 130, the address storage memory 132 for storing the sector address of the HDD 22, the common initial vector stored in the common initial vector storage memory 130, and the sector address stored in the address storage memory 132. In block encryption of an image file, an initial vector generation unit 134 that generates an initial vector used for each sector, a bus interface 30, a common key storage memory 36, an encryption unit 38, and an HDD interface 40 are provided. ing. The functions of these units are implemented as LSI chip functions, for example.

なお、第2の実施の形態に係る複写機の他の構成は、第1の実施の形態と同様なので、説明を省略する。   Since the other configuration of the copying machine according to the second embodiment is the same as that of the first embodiment, description thereof is omitted.

第2の実施の形態に係る暗号化処理ルーチンについて図7を用いて説明する。   An encryption processing routine according to the second embodiment will be described with reference to FIG.

まず、ステップ100において、画像ファイルが入力されたか否かが判定され、スキャナ24によって生成された画像ファイルが、バス20を介して入力されると、ステップ100からステップ102へ進み、画像ファイルの先頭ブロックを暗号化対象ブロックに設定する。   First, in step 100, it is determined whether an image file has been input. When the image file generated by the scanner 24 is input via the bus 20, the process proceeds from step 100 to step 102, where the head of the image file is entered. Set the block to be encrypted.

そして、ステップ200において、共通初期ベクトル格納メモリ130に格納された共通初期ベクトルを読み込み、ステップ104において、暗号化対象ブロックが、ファイルをセクタ単位に分割した場合におけるセクタの先頭ブロックであるか否かを判定し、画像ファイルをセクタ単位に分割した場合の何れかのセクタの先頭ブロックである場合には、ステップ202において、暗号化対象ブロックのセクタが記憶されるHDD22のセクタアドレスをアドレス格納メモリ132から読み込み、共通初期ベクトルとセクタアドレスとに基づいて、初期ベクトルを生成する。   In step 200, the common initial vector stored in the common initial vector storage memory 130 is read. In step 104, whether the encryption target block is the head block of the sector when the file is divided into sectors. If it is the first block of any sector when the image file is divided into sectors, in step 202, the sector address of the HDD 22 in which the sector of the block to be encrypted is stored is stored in the address storage memory 132. The initial vector is generated based on the common initial vector and the sector address.

なお、初期ベクトルを生成する方法としては、例えば、図8に示すように、共通初期ベクトルとセクタアドレスとのビット毎の排他的論理和(XOR)を演算して、演算結果を初期ベクトルとして生成する方法とすればよい。または、所定のビットの並び替えにより初期ベクトルを生成する方法でもよく、また、他の公知の方法でもよい。   As an initial vector generation method, for example, as shown in FIG. 8, the bitwise exclusive OR (XOR) of the common initial vector and the sector address is calculated, and the calculation result is generated as the initial vector. It should be the method to do. Alternatively, a method of generating an initial vector by rearranging predetermined bits may be used, or another known method may be used.

そして、ステップ204では、ステップ202で生成された初期ベクトルを暗号化における直前ブロックの暗号文ブロックとして設定し、ステップ114で、図3で説明したブロック暗号化処理を行い、ステップ116において、HDDインタフェース40によって、暗号文ブロックをHDD22に記憶させる。   In step 204, the initial vector generated in step 202 is set as the ciphertext block of the immediately preceding block in the encryption. In step 114, the block encryption process described with reference to FIG. 3 is performed. The ciphertext block is stored in the HDD 22 by 40.

一方、ステップ104で、暗号化対象ブロックが、画像ファイルをセクタ単位に分割した場合の何れのセクタの先頭ブロックでもない場合には、ステップ114へ移行し、ステップ114で、図3で説明したように、直前のブロックの暗号文ブロックを用いてブロック暗号化処理を行う。   On the other hand, if the block to be encrypted is not the first block of any sector when the image file is divided into sectors in step 104, the process proceeds to step 114, and in step 114, as described in FIG. In addition, block encryption processing is performed using the ciphertext block of the immediately preceding block.

ステップ118では、暗号化対象ブロックが、画像ファイルの最終ブロックであるか否かを判定し、ブロック暗号化処理が行われていないブロックがある場合には、ステップ120において、画像ファイルにおける次のブロックを、暗号化対象ブロックに設定し、ステップ104へ戻るが、一方、画像ファイルの全てのブロックについて、ブロック暗号化処理が行われた場合には、暗号化処理ルーチンを終了する。   In step 118, it is determined whether or not the encryption target block is the final block of the image file. If there is a block that has not been subjected to block encryption processing, in step 120, the next block in the image file is determined. Is set to the encryption target block, and the process returns to step 104. On the other hand, if the block encryption process has been performed for all the blocks of the image file, the encryption process routine is terminated.

上記のようにブロック暗号化処理が行われると、図9に示すように、HDD22における画像ファイルAが記憶されている先頭セクタには、共通初期ベクトルと先頭セクタのセクタアドレスとに基づいて生成された初期ベクトルを用いてブロック暗号化された暗号文ブロックが記憶され、2番目のセクタ及び3番目のセクタの各々については、共通初期ベクトルと各々のセクタアドレスとに基づいて生成された初期ベクトルを用いてブロック暗号化された暗号文ブロックが記憶される。また、他の画像ファイルBについても、同様に、共通初期ベクトルとセクタアドレスとに基づいて生成された初期ベクトルを用いてブロック暗号化された暗号文ブロックが記憶される。   When the block encryption process is performed as described above, as shown in FIG. 9, the head sector storing the image file A in the HDD 22 is generated based on the common initial vector and the sector address of the head sector. A ciphertext block block-encrypted using the initial vector is stored, and for each of the second sector and the third sector, an initial vector generated based on the common initial vector and each sector address is stored. The ciphertext block that has been block-encrypted by use is stored. Similarly, for the other image file B, a ciphertext block that is block-encrypted using the initial vector generated based on the common initial vector and the sector address is stored.

また、HDD22から画像ファイルAの先頭セクタが取り出される場合には、共通初期ベクトルと先頭セクタのセクタアドレスとに基づいて生成された初期ベクトルを用いて復号化して、復号化された平文ブロックが取り出される。   When the first sector of the image file A is extracted from the HDD 22, the decrypted plaintext block is extracted using the initial vector generated based on the common initial vector and the sector address of the first sector. It is.

また、HDD22から画像ファイルAの2番目のセクタ又は3番目のセクタのみが取り出される場合には、共通初期ベクトルと各々のセクタアドレスとに基づいて生成された初期ベクトルを用いて復号化して、復号化された平文ブロックが取り出される。   Further, when only the second sector or the third sector of the image file A is extracted from the HDD 22, the decoding is performed by using the initial vector generated based on the common initial vector and each sector address. The converted plaintext block is taken out.

以上説明したように、第2の実施の形態に係る複写機によれば、セクタ単位毎の初期ベクトルを用いてセクタ単位毎にブロック暗号化を行うことにより、暗号化されたファイル途中のデータのみをセクタ単位毎に高速に取り出すことができ、また、セクタ単位毎に用いられる初期ベクトルを、共通初期ベクトル及びセクタアドレスに基づいて生成することにより、初期ベクトルの格納領域の増加を抑止することができる。また、共通初期ベクトルを用いて、初期ベクトルを生成するようにすることにより、共通初期ベクトルのみを格納しておくだけでよいため、初期ベクトルの格納領域を大幅に削減することができる。   As described above, according to the copying machine according to the second embodiment, by performing block encryption for each sector unit using the initial vector for each sector unit, only the data in the middle of the encrypted file is stored. Can be extracted at high speed for each sector unit, and the initial vector used for each sector unit is generated based on the common initial vector and the sector address, thereby suppressing an increase in the storage area of the initial vector. it can. Also, by generating the initial vector using the common initial vector, it is only necessary to store the common initial vector, so that the storage area of the initial vector can be greatly reduced.

また、ブロック暗号化されて記憶されたファイルをブロック復号化して取り出すときに、取り出すデータがファイル途中のデータであっても、生成された第2の初期ベクトルを用いて、ファイル途中のデータのみをセクタ単位毎に復号化して取り出すことができる。   In addition, when a block-encrypted and stored file is extracted by block decryption, even if the data to be extracted is data in the middle of the file, only the data in the middle of the file is obtained using the generated second initial vector. Decoding can be performed for each sector.

なお、本実施の形態では、LSIチップに暗号化及び復号化を行う機能を実装した場合を例に説明したが、これに限定されるものではなく、暗号化及び復号化を行う機能を実現したプログラムを予め記憶し、CPUによってこのプログラムを実行して、上述した暗号化及び復号化を行うようにしてもよい。   In this embodiment, the case where functions for performing encryption and decryption are mounted on an LSI chip has been described as an example. However, the present invention is not limited to this, and functions for performing encryption and decryption are realized. The program may be stored in advance and executed by the CPU to perform the above-described encryption and decryption.

本発明の第1の実施の形態に係る複写機の構成を示す概略図である。1 is a schematic diagram showing a configuration of a copier according to a first embodiment of the present invention. 本発明の第1の実施の形態に係るデータ処理装置の機能を示すブロック図である。It is a block diagram which shows the function of the data processor which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るデータ処理装置におけるブロック暗号化及びブロック復号化を説明するための図である。It is a figure for demonstrating block encryption and block decryption in the data processor which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るデータ処理装置において実行される暗号化処理ルーチンの内容を示すフローチャートである。It is a flowchart which shows the content of the encryption process routine performed in the data processor which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るHDDに記憶された画像ファイルの様子を示すイメージ図である。It is an image figure which shows the mode of the image file memorize | stored in HDD concerning the 1st Embodiment of this invention. 本発明の第2の実施の形態に係るデータ処理装置の機能を示すブロック図である。It is a block diagram which shows the function of the data processor which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るデータ処理装置において実行される暗号化処理ルーチンの内容を示すフローチャートである。It is a flowchart which shows the content of the encryption process routine performed in the data processor which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るデータ処理装置における初期ベクトルの生成方法を説明するための図である。It is a figure for demonstrating the production | generation method of the initial vector in the data processor which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るHDDに記憶された画像ファイルの様子を示すイメージ図である。It is an image figure which shows the mode of the image file memorize | stored in HDD concerning the 2nd Embodiment of this invention.

符号の説明Explanation of symbols

10 複写機
12 ROM
14 CPU
16 RAM
18、128 データ処理装置
22 HDD
24 スキャナ
28 操作パネル部
30 バスインタフェース
32 初期ベクトル格納メモリ
34 初期ベクトル変更部
36 共通鍵格納メモリ
38 暗号化部
40 HDDインタフェース
130 共通初期ベクトル格納メモリ
132 アドレス格納メモリ
134 初期ベクトル生成部
10 Copier 12 ROM
14 CPU
16 RAM
18, 128 Data processing device 22 HDD
24 Scanner 28 Operation Panel 30 Bus Interface 32 Initial Vector Storage Memory 34 Initial Vector Change Unit 36 Common Key Storage Memory 38 Encryption Unit 40 HDD Interface 130 Common Initial Vector Storage Memory 132 Address Storage Memory 134 Initial Vector Generation Unit

Claims (7)

ファイルを所定の記憶単位に分割して記憶するためのファイル記憶手段と、
ファイルを所定のブロック単位に暗号化するブロック暗号化においてファイル毎に用いるための第1の初期ベクトルを複数記憶する初期ベクトル記憶手段と、
ファイルに用いられる第1の初期ベクトルを所定の規則に基づいて変更することにより、該ファイルの前記ブロック暗号化において前記所定の記憶単位毎に用いるための第2の初期ベクトルを前記所定の記憶単位毎に生成する初期ベクトル生成手段と、
入力されたファイルを前記所定の記憶単位に分割したときの前記所定の記憶単位における先頭ブロックをブロック暗号化する場合には、前記初期ベクトル生成手段によって生成された第2の初期ベクトル、該先頭ブロックの平文ブロック、及び暗号化鍵に基づいて、該先頭ブロックをブロック暗号化し、
前記所定の記憶単位における先頭ブロックでないブロックをブロック暗号化する場合には、該ブロックの直前のブロックをブロック暗号化した暗号文ブロック、該ブロックの平文ブロック、及び前記暗号化鍵に基づいて、該ブロックをブロック暗号化する暗号化手段と、
前記暗号化手段によってブロック暗号化されたファイルを前記ファイル記憶手段に記憶させる記憶制御手段と、
を含む情報処理装置。
File storage means for storing a file divided into predetermined storage units;
Initial vector storage means for storing a plurality of first initial vectors to be used for each file in block encryption for encrypting a file in a predetermined block unit;
By changing the first initial vector used for the file based on a predetermined rule, the second initial vector to be used for each predetermined storage unit in the block encryption of the file is used for the predetermined storage unit. Initial vector generation means for generating each;
When block encryption is performed on the first block in the predetermined storage unit when the input file is divided into the predetermined storage unit, the second initial vector generated by the initial vector generation means, the first block plaintext block, based on及beauty encryption key and block encryption the first block,
When block-encrypting a block that is not the first block in the predetermined storage unit, based on the ciphertext block obtained by block-encrypting the block immediately before the block, the plaintext block of the block, and the encryption key, An encryption means for block-encrypting the block;
Storage control means for storing the file encrypted by the encryption means in the file storage means;
An information processing apparatus including:
前記ファイル記憶手段に記憶された前記ファイルを前記所定の記憶単位に分割したときの前記所定の記憶単位における先頭ブロックをブロック復号化する場合には、前記初期ベクトル生成手段によって生成された第2の初期ベクトル、該先頭ブロックの暗号文ブロック、及び前記暗号化鍵に基づいて、該先頭ブロックをブロック復号化し、
前記所定の記憶単位における先頭ブロックでないブロックをブロック復号化する場合には、該ブロックの直前のブロックをブロック暗号化した暗号文ブロック、該ブロックの暗号文ブロック、及び前記暗号化鍵に基づいて、該ブロックをブロック復号化する復号化手段を更に含み、
前記初期ベクトル生成手段は、前記ファイルに用いられた前記第1の初期ベクトルを前記所定の規則に基づいて変更することにより、該ファイルの前記ブロック復号化において前記所定の記憶単位毎に用いるための前記第2の初期ベクトルを前記所定の記憶単位毎に生成する請求項1記載の情報処理装置。
When block decoding the head block in the predetermined storage unit when the file stored in the file storage unit is divided into the predetermined storage unit, the second block generated by the initial vector generation unit Based on the initial vector, the ciphertext block of the head block, and the encryption key, the head block is block decrypted,
When block decrypting a block that is not the first block in the predetermined storage unit, based on the ciphertext block obtained by block-encrypting the block immediately before the block, the ciphertext block of the block, and the encryption key, Further comprising decoding means for block decoding the block;
The initial vector generating means is used for each predetermined storage unit in the block decoding of the file by changing the first initial vector used for the file based on the predetermined rule. The information processing apparatus according to claim 1, wherein the second initial vector is generated for each predetermined storage unit.
前記暗号化手段は、入力されたファイルの先頭ブロックをブロック暗号化する場合には、前記初期ベクトル記憶手段に記憶された第1の初期ベクトル、該先頭ブロックの平文ブロック、及び所定の暗号化鍵に基づいて、該先頭ブロックをブロック暗号化する請求項1記載の情報処理装置。   When the encryption unit performs block encryption on the first block of the input file, the first initial vector stored in the initial vector storage unit, the plaintext block of the first block, and a predetermined encryption key The information processing apparatus according to claim 1, wherein the first block is block-encrypted based on the information. 前記ファイル記憶手段に記憶されたファイルの先頭ブロックをブロック復号化する場合には、該ファイルに用いられた前記第1の初期ベクトル、該先頭ブロックの暗号文ブロック、及び前記暗号化鍵に基づいて、該先頭ブロックをブロック復号化し、
前記ファイルを前記所定の記憶単位に分割したときの前記所定の記憶単位における先頭ブロックをブロック復号化する場合には、前記初期ベクトル生成手段によって生成された第2の初期ベクトル、該先頭ブロックの暗号文ブロック、及び前記暗号化鍵に基づいて、該先頭ブロックをブロック復号化し、
前記ファイルの先頭ブロックでなく、かつ、前記所定の記憶単位における先頭ブロックでないブロックをブロック復号化する場合には、該ブロックの直前のブロックをブロック暗号化した暗号文ブロック、該ブロックの暗号文ブロック、及び前記暗号化鍵に基づいて、該ブロックをブロック復号化する復号化手段を更に含み、
前記初期ベクトル生成手段は、前記ファイルに用いられた前記第1の初期ベクトルを前記所定の規則に基づいて変更することにより、該ファイルの前記ブロック復号化において前記所定の記憶単位毎に用いるための前記第2の初期ベクトルを前記所定の記憶単位毎に生成する請求項3記載の情報処理装置。
When block decrypting the first block of the file stored in the file storage means, based on the first initial vector used for the file, the ciphertext block of the first block, and the encryption key Block decoding the head block,
When block decoding the head block in the predetermined storage unit when the file is divided into the predetermined storage unit, the second initial vector generated by the initial vector generating means, the encryption of the head block Based on the sentence block and the encryption key, the first block is block decrypted,
When block decrypting a block that is not the first block of the file and is not the first block in the predetermined storage unit, a ciphertext block obtained by block-encrypting a block immediately before the block, and a ciphertext block of the block And decrypting means for block-decoding the block based on the encryption key,
The initial vector generating means is used for each predetermined storage unit in the block decoding of the file by changing the first initial vector used for the file based on the predetermined rule. The information processing apparatus according to claim 3, wherein the second initial vector is generated for each predetermined storage unit.
前記所定の記憶単位を、前記ファイル記憶手段の論理アドレス分割単位とする請求項1〜請求項の何れか1項記載の情報処理装置。 The predetermined storage unit, the information processing apparatus of any one of claims 1 to 4, logical address division unit of said file storage means. 前記ファイル記憶手段はハードディスクであって、
前記所定の記憶単位を、前記ハードディスクのセクタ単位とする請求項1〜請求項の何れか1項記載の情報処理装置。
The file storage means is a hard disk,
It said predetermined storage unit, the information processing apparatus of any one of claims 1 to 4, sector unit of the hard disk.
コンピュータを
ファイルを所定の記憶単位に分割して記憶するためのファイル記憶手段、
ファイルを所定のブロック単位に暗号化するブロック暗号化においてファイル毎に用いるための第1の初期ベクトルを複数記憶する初期ベクトル記憶手段、
ファイルに用いられる第1の初期ベクトルを所定の規則に基づいて変更することにより、該ファイルの前記ブロック暗号化において前記所定の記憶単位毎に用いるための第2の初期ベクトルを前記所定の記憶単位毎に生成する初期ベクトル生成手段、
入力されたファイルを前記所定の記憶単位に分割したときの前記所定の記憶単位における先頭ブロックをブロック暗号化する場合には、前記初期ベクトル生成手段によって生成された第2の初期ベクトル、該先頭ブロックの平文ブロック、及び暗号化鍵に基づいて、該先頭ブロックをブロック暗号化し、
前記所定の記憶単位における先頭ブロックでないブロックをブロック暗号化する場合には、該ブロックの直前のブロックをブロック暗号化した暗号文ブロック、該ブロックの平文ブロック、及び前記暗号化鍵に基づいて、該ブロックをブロック暗号化する暗号化手段、及び
前記暗号化手段によってブロック暗号化されたファイルを前記ファイル記憶手段に記憶させる記憶制御手段
として機能させるためのプログラム。
File storage means for storing a computer by dividing a file into predetermined storage units;
Initial vector storage means for storing a plurality of first initial vectors to be used for each file in block encryption for encrypting a file in a predetermined block unit;
By changing the first initial vector used for the file based on a predetermined rule, the second initial vector to be used for each predetermined storage unit in the block encryption of the file is used for the predetermined storage unit. Initial vector generating means for generating each time,
When block encryption is performed on the first block in the predetermined storage unit when the input file is divided into the predetermined storage unit, the second initial vector generated by the initial vector generation means, the first block plaintext block, based on及beauty encryption key and block encryption the first block,
When block-encrypting a block that is not the first block in the predetermined storage unit, based on the ciphertext block obtained by block-encrypting the block immediately before the block, the plaintext block of the block, and the encryption key, An encryption means for block-encrypting a block, and a program for causing the file storage means to store a file block-encrypted by the encryption means in the file storage means.
JP2006003034A 2006-01-10 2006-01-10 Information processing apparatus and program Expired - Fee Related JP4853026B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006003034A JP4853026B2 (en) 2006-01-10 2006-01-10 Information processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006003034A JP4853026B2 (en) 2006-01-10 2006-01-10 Information processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2007183514A JP2007183514A (en) 2007-07-19
JP4853026B2 true JP4853026B2 (en) 2012-01-11

Family

ID=38339665

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006003034A Expired - Fee Related JP4853026B2 (en) 2006-01-10 2006-01-10 Information processing apparatus and program

Country Status (1)

Country Link
JP (1) JP4853026B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009044481A (en) * 2007-08-09 2009-02-26 Ricoh Co Ltd Data processing apparatus and image forming apparatus
JP5017136B2 (en) * 2008-02-08 2012-09-05 京セラドキュメントソリューションズ株式会社 Encryption / decryption device for hard disk drive and hard disk drive device
US8713300B2 (en) * 2011-01-21 2014-04-29 Symantec Corporation System and method for netbackup data decryption in a high latency low bandwidth environment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07303102A (en) * 1994-05-10 1995-11-14 Mita Ind Co Ltd Communication equipment
JP4172131B2 (en) * 1999-03-15 2008-10-29 ソニー株式会社 Data processing apparatus, data processing system and method thereof
JP4303408B2 (en) * 2000-07-18 2009-07-29 ネッツエスアイ東洋株式会社 Method for recording information with block encryption and recording medium supporting the same
JP2002108205A (en) * 2000-09-28 2002-04-10 Hitachi Software Eng Co Ltd Block ciphering method and decoding method
EP1440439A1 (en) * 2001-10-12 2004-07-28 Koninklijke Philips Electronics N.V. Apparatus and method for reading or writing block-wise stored user data
US7055039B2 (en) * 2003-04-14 2006-05-30 Sony Corporation Protection of digital content using block cipher crytography
JP2005130059A (en) * 2003-10-22 2005-05-19 Fuji Xerox Co Ltd Image forming apparatus and part for replacement
JP2005167635A (en) * 2003-12-02 2005-06-23 Ntt Docomo Inc Apparatus, and data transmission reception method
JP4505717B2 (en) * 2003-12-08 2010-07-21 ソニー株式会社 Information processing apparatus, control method, program, and recording medium

Also Published As

Publication number Publication date
JP2007183514A (en) 2007-07-19

Similar Documents

Publication Publication Date Title
JP2008085986A (en) Data conversion unit, electronic apparatus, and data conversion method
JP2007215028A (en) Device, method, program of data encryption, and recording medium
US8908859B2 (en) Cryptographic apparatus and memory system
JPWO2010055658A1 (en) Content decryption processing apparatus, content decryption processing method, and integrated circuit
JP5703714B2 (en) Data processing apparatus, data processing system, data processing program, and access restriction method
JP4853026B2 (en) Information processing apparatus and program
JP4791741B2 (en) Data processing apparatus and data processing method
JP2008306395A (en) Information processor, information processing method
JP5017136B2 (en) Encryption / decryption device for hard disk drive and hard disk drive device
US7945046B2 (en) Decryption processing apparatus, decryption method and image forming apparatus
JP2007336446A (en) Data encryption apparatus
JP2007304928A (en) Print system, print method and print processing program
JP5481354B2 (en) Information processing device
KR20080112082A (en) Data encryption method and encrypted data reproduction method
JP2008205753A (en) Signal processor
JP2005039637A (en) Image forming device
JP4644053B2 (en) Encryption apparatus and method, decryption apparatus and method
JP6521499B2 (en) Cryptographic processing apparatus, semiconductor memory and memory system
US20100002869A1 (en) Encryption circuit and decryption circuit
JP7063628B2 (en) Cryptographic devices, encryption methods and programs
TWI775467B (en) Machine learning model file decryption method and user device
JP2004184516A (en) Digital data transmitting terminal
JP4671034B2 (en) DMA transfer circuit and DMA controller
JP2009075474A (en) Cryptography processor
JP5407585B2 (en) Program code encryption apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081225

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110615

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110621

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110822

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: 20110927

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: 20111010

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

Free format text: PAYMENT UNTIL: 20141104

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees