JP2008039844A - Cryptographic processing program and cryptographic processing method - Google Patents
Cryptographic processing program and cryptographic processing method Download PDFInfo
- Publication number
- JP2008039844A JP2008039844A JP2006210116A JP2006210116A JP2008039844A JP 2008039844 A JP2008039844 A JP 2008039844A JP 2006210116 A JP2006210116 A JP 2006210116A JP 2006210116 A JP2006210116 A JP 2006210116A JP 2008039844 A JP2008039844 A JP 2008039844A
- Authority
- JP
- Japan
- Prior art keywords
- encryption
- character
- unit
- dummy
- plaintext
- 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.)
- Granted
Links
Images
Abstract
【課題】先頭部分が同一になりやすい多数の平文を暗号化する場合でも、暗号の安全性低下を防止する。
【解決手段】ダミー文字選択手段1bは、入力された平文3の所定位置にある1または2以上の文字をダミー文字として選択する。暗号化手段1aは、選択されたダミー文字を連鎖機能を有する暗号利用モードに従って暗号化すると共に、予め初期ベクタが設定されたレジスタ値を更新する。その後、暗号化手段1aは、更新されたレジスタ値を用いてさらに平文3を暗号化する。暗号文出力手段1cは、暗号化手段1aによる平文3に対する暗号化処理の結果を暗号文4として出力する。
【選択図】図1Even when a large number of plaintexts whose leading parts are likely to be the same are encrypted, a decrease in encryption security is prevented.
A dummy character selection unit 1b selects one or more characters at a predetermined position of an input plaintext 3 as dummy characters. The encryption unit 1a encrypts the selected dummy character in accordance with an encryption usage mode having a chain function and updates a register value in which an initial vector is set in advance. Thereafter, the encryption unit 1a further encrypts the plaintext 3 using the updated register value. The ciphertext output unit 1c outputs the result of the encryption process on the plaintext 3 by the encryption unit 1a as the ciphertext 4.
[Selection] Figure 1
Description
本発明は暗号処理プログラムおよび暗号処理方法に関し、特に連鎖機能を有する暗号利用モードを用いて暗号処理を行う暗号処理プログラムおよび暗号処理方法に関する。 The present invention relates to a cryptographic processing program and a cryptographic processing method, and more particularly to a cryptographic processing program and a cryptographic processing method for performing cryptographic processing using a cryptographic usage mode having a chain function.
現在、通信内容や蓄積データの秘密保持のため、暗号技術が広く利用されている。ここで、暗号方式には、公開鍵暗号方式と共通鍵暗号方式との2種類がある。公開鍵暗号方式は、ペアとなる鍵の一方を暗号化のための公開鍵、他方を復号のための秘密鍵とする方式であり、暗号強度の維持が容易であるという利点がある。共通鍵暗号方式は、暗号化側と復号側とで共有する共通鍵を用いて暗号化/復号を行う方式であり、公開鍵暗号方式と比べて計算量が少ないという利点がある。一般的に、大量のデータを暗号化する必要がある場合、計算量が少ない共通鍵暗号方式が用いられる。共通鍵暗号方式の暗号化アルゴリズムとしては、DES(Data Encryption Standard)やAES(Advanced Encryption Standard)などが知られている(例えば、特許文献1参照)。 Currently, encryption technology is widely used for maintaining confidentiality of communication contents and stored data. Here, there are two types of encryption methods, a public key encryption method and a common key encryption method. The public key cryptosystem is a scheme in which one of a pair of keys is a public key for encryption and the other is a secret key for decryption, and has an advantage that it is easy to maintain the encryption strength. The common key encryption method is a method of performing encryption / decryption using a common key shared between the encryption side and the decryption side, and has an advantage that the calculation amount is smaller than that of the public key encryption method. Generally, when it is necessary to encrypt a large amount of data, a common key cryptosystem with a small calculation amount is used. Known encryption algorithms for the common key cryptosystem include DES (Data Encryption Standard) and AES (Advanced Encryption Standard) (see, for example, Patent Document 1).
ここで、多くの暗号化アルゴリズムでは、1回に暗号化できるデータ長が固定されている。例えば、DESでは64ビット、AESでは128ビットである。そこで、暗号化単位(以下、ブロックという)以上のデータ長の平文を暗号化するために、暗号利用モードが用意されている。暗号利用モードとは、複数のブロックを暗号化する場合の、一連の暗号化処理の手順を定義したものである。最も単純な暗号利用モードの1つとして、ECB(Electronic Code Book)モードがある。ECBモードは、平文をブロック単位に分割し、個々のブロックを独立に暗号化する方法である。しかし、ECBモードでは、同一の文字列から成るブロックを暗号化すると、暗号化の鍵が同じである限り常に同一の暗号値が生成される。したがって、同じ文字列が何度も出現する平文を暗号化すると、攻撃者に解読のヒントを与えることになり、暗号の安全性が低下するという問題がある。 Here, in many encryption algorithms, the data length that can be encrypted at one time is fixed. For example, 64 bits for DES and 128 bits for AES. In order to encrypt a plaintext having a data length equal to or larger than an encryption unit (hereinafter referred to as a block), an encryption usage mode is prepared. The encryption usage mode defines a series of encryption processing procedures when a plurality of blocks are encrypted. One of the simplest encryption usage modes is an ECB (Electronic Code Book) mode. The ECB mode is a method in which plaintext is divided into blocks and each block is encrypted independently. However, in the ECB mode, when a block consisting of the same character string is encrypted, the same encrypted value is always generated as long as the encryption key is the same. Therefore, if plaintext in which the same character string appears many times is encrypted, a cracking hint is given to the attacker, and there is a problem that the security of the encryption is lowered.
そこで、長い平文を安全に暗号化するために、連鎖機能を有する暗号利用モードが知られている。連鎖機能を有する暗号利用モードとは、前のブロックの暗号化処理で得られる値を利用して次のブロックを暗号化する方法であり、暗号化したブロック間に依存関係をもたせることができる。先頭ブロックの暗号化では、依存させるべき暗号化処理の結果がないため、初期ベクタと呼ばれる予め設定された初期値を使用する。連鎖機能を有する暗号利用モードを用いることで、平文の途中で一度異なる文字列が出現すれば、それ以降に既出の文字列と同一の文字列が出現しても、前の暗号値と異なる暗号値が生成される。これにより、暗号の安全性低下を防止することができる。連鎖機能を有する暗号利用モードとしては、CBC(Cipher Block Chaining)モード、CFB(Cipher FeedBack)モード、OFB(Output FeedBack)モードなどが知られている。
しかし、上記のような既存の暗号利用モードでは、先頭部分が同一になりやすい多数の平文を暗号化すると、暗号強度が低下するという問題がある。例えば、住所を表す平文は、先頭部分に“東京都○○区”などの特定の文字列が出現する確率が高い。このため、住所を表す多数の平文を暗号化すると、個々の平文の暗号化に連鎖機能を有する暗号利用モードを用いても、先頭部分が同一の暗号文が多数生成されてしまう。そして、このように同一になりやすい先頭部分の文字列は推測も容易であるため、平文と暗号文の組を攻撃者に推測されてしまう。このようにして、平文と暗号文の組を取得した攻撃者は、線形解読法などを用いた既知平文攻撃が可能となり、暗号が解読される可能性が高くなる。 However, in the existing cipher usage mode as described above, there is a problem that the encryption strength is lowered when a large number of plaintexts whose leading parts are likely to be the same are encrypted. For example, a plain text representing an address has a high probability that a specific character string such as “Tokyo-ku-ku-ku” appears at the top. For this reason, when a large number of plaintexts representing addresses are encrypted, even if a cipher usage mode having a chain function is used for encrypting individual plaintexts, a large number of ciphertexts having the same head portion are generated. And since the character string of the head part which tends to become the same like this is easy to guess, a pair of plaintext and ciphertext is guessed by the attacker. In this way, an attacker who has acquired a set of plaintext and ciphertext can perform a known plaintext attack using linear cryptanalysis and the like, and the possibility that the cipher will be decrypted increases.
本発明はこのような点に鑑みてなされたものであり、先頭部分が同一になりやすい多数の平文を暗号化する場合でも、暗号の安全性が低下することがない暗号処理プログラムおよび暗号処理方法を提供することを目的とする。 The present invention has been made in view of the above points, and an encryption processing program and an encryption processing method that do not reduce encryption security even when encrypting a large number of plaintexts whose leading parts are likely to be the same. The purpose is to provide.
本発明では上記課題を解決するために、図1に示すような暗号処理プログラムが提供される。本発明に係る暗号処理プログラムは、平文から暗号文を生成するために、図1に示す暗号化装置1の有する機能をコンピュータに実行させることができる。
In order to solve the above-described problems, the present invention provides a cryptographic processing program as shown in FIG. The encryption processing program according to the present invention can cause a computer to execute the functions of the
暗号化装置1は、暗号化手段1a、ダミー文字選択手段1bおよび暗号文出力手段1cを有する。暗号化手段1aは、レジスタ値として予め初期ベクタを有しており、暗号元データを取得すると、所定の暗号利用モードに従い、レジスタ値を用いた文字の暗号化と暗号化処理で得られる値を用いたレジスタ値の更新とを繰り返すことで、暗号化単位間に依存関係がある暗号化データを生成する。ダミー文字選択手段1bは、平文3が入力されると、平文3の所定位置にある1または2以上の文字をダミー文字として選択し、ダミー文字を暗号元データとして暗号化手段1aに入力し、得られた暗号化データを破棄する。暗号文出力手段1cは、ダミー文字の暗号化によって暗号化手段1aのレジスタ値が更新されると、その後、平文3を暗号元データとして暗号化手段1aに入力し、得られた暗号化データを暗号文4として出力する。
The
このような暗号処理プログラムを実行するコンピュータによれば、ダミー文字選択手段1bにより、入力された平文3の所定位置にある1または2以上の文字がダミー文字として選択される。次に、暗号化手段1aにより、選択されたダミー文字が連鎖機能を有する暗号利用モードに従って暗号化されると共に、予め初期ベクタが設定されたレジスタ値が更新される。その後、暗号化手段1aにより、更新されたレジスタ値を用いてさらに平文3が暗号化され、暗号文出力手段1cにより、暗号化手段1aによる暗号化処理の結果が暗号文4として出力される。
According to the computer that executes such an encryption processing program, the dummy character selection unit 1b selects one or more characters at a predetermined position of the
また、上記課題を解決するために、連鎖機能を有する暗号利用モードを用いて暗号処理を行う暗号処理方法において、平文が入力されると、前記平文の所定位置にある1または2以上の文字をダミー文字として選択し、前記ダミー文字を、所定の前記暗号利用モードに従い、レジスタ値として予め設定された初期ベクタを用いて暗号化し、暗号化処理で得られる値を用いて前記レジスタ値を更新すると共に、前記ダミー文字に対応する暗号化データを破棄し、前記ダミー文字の暗号化によって前記レジスタ値が更新された後、前記暗号利用モードに従い、前記レジスタ値を用いた文字の暗号化と暗号化処理で得られる値を用いた前記レジスタ値の更新とを繰り返すことで、暗号化単位間に依存関係がある暗号化データを生成し暗号文として出力する、ことを特徴とする暗号処理方法が提供される。 In order to solve the above problem, in a cryptographic processing method for performing cryptographic processing using a cipher usage mode having a chain function, when plaintext is input, one or more characters at a predetermined position of the plaintext are converted. Select a dummy character, encrypt the dummy character using a predetermined initial vector as a register value according to the predetermined encryption usage mode, and update the register value using a value obtained by encryption processing In addition, after the encrypted data corresponding to the dummy character is discarded and the register value is updated by the encryption of the dummy character, the character is encrypted and encrypted using the register value according to the encryption usage mode. By repeatedly updating the register value using the value obtained by processing, encrypted data having a dependency relationship between encryption units is generated and output as ciphertext. To encryption processing method is provided, characterized in that.
このような暗号処理方法によれば、入力された平文3の所定位置にある1または2以上の文字がダミー文字として選択される。次に、選択されたダミー文字が連鎖機能を有する暗号利用モードに従って暗号化されると共に、予め初期ベクタが設定されたレジスタ値が更新される。その後、更新されたレジスタ値を用いてさらに平文3が暗号化され、暗号化処理の結果が暗号文4として出力される。
According to such an encryption processing method, one or more characters at a predetermined position of the
本発明では、入力された平文の所定位置にある文字をダミー文字として選択し、連鎖機能を有する暗号利用モードを用いて、ダミー文字を暗号化した後、入力された平文を続いて暗号化することとした。これにより、平文の暗号化前に初期ベクタが更新され、先頭部分が同一の平文を暗号化しても、対応する暗号文の先頭部分は同一にならない。したがって、攻撃者が平文を推測するのを困難にし、暗号の安全性低下を防止することができる。 In the present invention, a character at a predetermined position in the input plaintext is selected as a dummy character, and after the dummy character is encrypted using a cipher usage mode having a chain function, the input plaintext is subsequently encrypted. It was decided. As a result, the initial vector is updated before the plaintext is encrypted, and even if the plaintext having the same head portion is encrypted, the head portion of the corresponding ciphertext is not the same. Therefore, it is difficult for an attacker to guess the plaintext, and the encryption security can be prevented from being lowered.
以下、本発明の実施の形態を図面を参照して説明する。
図1は、本実施の形態の概要を示す図である。図1に示すように、本実施の形態では、平文3を暗号化装置1で暗号化し暗号文4を出力する。また、暗号化装置1で暗号化した暗号文5を復号装置2で復号し平文6を出力する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing an outline of the present embodiment. As shown in FIG. 1, in this embodiment,
暗号化装置1は、暗号化手段1a、ダミー文字選択手段1b、暗号文出力手段1cおよび順序変換手段1dを有する。
暗号化手段1aは、レジスタ値として予め初期ベクタを有している。レジスタ値は、暗号化処理の開始時に毎回初期化され、初期ベクタが設定される。暗号化手段1aは、暗号元データを取得すると、所定の連鎖機能を有する暗号利用モードに従い、レジスタ値を用いて暗号化処理を行う。具体的には、暗号元データの暗号化単位毎の暗号化と、暗号化処理で得られる値を用いたレジスタ値の更新とを繰り返す。暗号利用モードとしては、例えば、CBCモード、CFBモード、OFBモードのいずれか1つを用いる。これにより、暗号化単位間に依存関係がある暗号化データが生成される。
The
The
順序変換手段1dは、平文3が入力されると、平文3の文字順序を変換して新たな平文を生成する。具体的には、順序変換手段1dは、入力された平文3を先頭と最後尾とが連続した循環文字列とみなし、循環文字列上の1文字を新たな先頭に指定する。そして、順序変換手段1dは、指定した新たな先頭から始まる文字列を新たな平文として出力する。
When the
ダミー文字選択手段1bは、順序変換手段1dから新たな平文が入力されると、新たな平文の所定位置にある1または2以上の文字をダミー文字として選択する。例えば、新たな平文の最後から3番目の文字をダミー文字として選択する。そして、ダミー文字選択手段1bは、選択したダミー文字を暗号元データとして暗号化手段1aに入力する。ダミー文字が入力された暗号化手段1aは、ダミー文字を暗号化する。この暗号化処理の過程で、初期ベクタが設定されたレジスタ値が更新される。ダミー文字選択手段1bは、暗号化手段1aからダミー文字に対応する暗号化データを取得すると、これを破棄する。
When a new plaintext is input from the order conversion unit 1d, the dummy character selection unit 1b selects one or more characters at a predetermined position of the new plaintext as dummy characters. For example, the third character from the end of the new plaintext is selected as a dummy character. Then, the dummy character selection unit 1b inputs the selected dummy character as encryption source data to the
暗号文出力手段1cは、ダミー文字の暗号化によって暗号化手段1aのレジスタ値が更新されると、その後、新たな平文を暗号元データとして暗号化手段1aに入力する。新たな平文が入力された暗号化手段1aは、更新されたレジスタ値に依存させて、新たな平文を暗号化する。暗号文出力手段1cは、暗号化手段1aから新たな平文に対応する暗号化データを取得すると、これを平文3に対する暗号文4として出力する。
When the register value of the
復号装置2は、復号手段2a、ダミー暗号選択手段2b、平文出力手段2cおよび順序再生手段2dを有する。
復号手段2aは、レジスタ値として予め暗号化手段1aと同一の初期ベクタを有している。レジスタ値は、復号処理の開始時に毎回初期化され、初期ベクタが設定される。復号手段2aは、暗号化データを取得すると、暗号化手段1aで用いたものと同一の暗号利用モードに従い、レジスタ値を用いて復号処理を行う。具体的には、暗号化データの暗号化単位毎の復号と、復号処理で得られる値を用いたレジスタ値の更新とを繰り返す。これにより、暗号化単位間に依存関係のある暗号化データを復号した復号データが生成される。
The
The decryption means 2a has the same initial vector as the encryption means 1a in advance as a register value. The register value is initialized every time the decoding process is started, and an initial vector is set. When obtaining the encrypted data, the decrypting means 2a performs the decrypting process using the register value in accordance with the same encryption usage mode as that used in the encrypting means 1a. Specifically, the decryption of the encrypted data for each encryption unit and the update of the register value using the value obtained by the decryption process are repeated. As a result, decrypted data obtained by decrypting encrypted data having a dependency relationship between the encryption units is generated.
ダミー暗号選択手段2bは、暗号化装置1で暗号化した暗号文5が入力されると、暗号文5の所定位置にある1または2以上の暗号値をダミー暗号として選択する。ここでいう所定位置とは、ダミー文字選択手段1bで選択したダミー文字に対応する位置である。そして、ダミー暗号選択手段2bは、選択したダミー暗号を暗号化データとして復号手段2aに入力する。ダミー暗号が入力された復号手段2aは、ダミー暗号を復号する。この復号処理の過程で、初期ベクタが設定されたレジスタ値が更新される。ダミー暗号選択手段2bは、復号手段2aからダミー暗号に対応する復号データを取得すると、これを破棄する。
When the
平文出力手段2cは、ダミー暗号の復号によって復号手段2aのレジスタ値が更新されると、その後、暗号文5を暗号元データとして復号手段2aに入力する。暗号文5が入力された復号手段2aは、更新されたレジスタ値に依存させて、暗号文5を復号する。平文出力手段2cは、復号手段2aから暗号文5に対応する復号データを取得すると、順序変換された平文として出力する。
When the register value of the decryption means 2a is updated by decryption of the dummy cipher, the plaintext output means 2c then inputs the
順序再生手段2dは、平文出力手段2cから順序変換された平文が入力されると、文字順序を再生して平文6を生成する。具体的には、順序再生手段2dは、順序変換された平文を先頭と最後尾とが連続した循環文字列とみなし、順序変換手段1dと逆の手順で、文字順を再生する。これにより、暗号文5に対する平文6が出力される。ここで、暗号文4と暗号文5とが同一であれば、平文3と同一の平文6が再生される。
When the plaintext whose order has been converted is input from the plaintext output means 2c, the order reproduction means 2d reproduces the character order and generates
なお、順序変換手段1dにおける新たな先頭の指定方法と、ダミー文字選択手段1bにおけるダミー文字の指定方法については、暗号化装置1と復号装置2との間で予め指定方法を決めておけばよい。または、毎回異なる指定方法を採用する場合、暗号化装置1から復号装置2へ暗号文を送信する前に、別手段で、上記指定方法の情報を送信するようにしてもよい。または、送信する暗号文に、上記指定方法の情報を含めるようにしてもよい。
Note that the new head designation method in the order conversion unit 1d and the dummy character designation method in the dummy character selection unit 1b may be determined in advance between the
このような暗号化装置1によれば、順序変換手段1dにより、入力された平文3の文字順序が変換され新たな平文が生成される。次に、ダミー文字選択手段1bにより、新たな平文の所定位置にある1または2以上の文字がダミー文字として選択され、初期ベクタが設定されたレジスタ値を有する暗号化手段1aにより、ダミー文字が暗号化される。そして、暗号化手段1aにより、更新されたレジスタ値を用いてさらに新たな平文が暗号化され、暗号文出力手段1cにより暗号文4が出力される。
According to such an
また、このような復号装置2によれば、ダミー暗号選択手段2bにより、入力された暗号文5の所定位置にある1または2以上の暗号値がダミー暗号として選択され、初期ベクタが設定されたレジスタ値を有する復号手段2aにより、ダミー暗号が復号される。次に、復号手段2aにより、更新されたレジスタ値を用いてさらに暗号文5が復号され、平文出力手段2cにより順序変換された平文が出力される。そして、順序再生手段2dにより、文字列の順序が再生されて平文6が出力される。
Further, according to such a
これにより、先頭部分が同一の平文を多数暗号化する場合でも、平文に対して文字列の順序変換が行われるため、暗号文の先頭部分が同一になる可能性を低くできる。さらに、ダミー文字の暗号化によって毎回初期ベクタが更新されるため、順序変換した平文の先頭部分が同一になったとしても、対応する暗号文の先頭部分は同一にならない。したがって、攻撃者が多数の暗号文から平文を推測するのを困難にし、暗号の安全性低下を防止することができる。 As a result, even when a large number of plaintexts having the same head part are encrypted, the order of the character strings is converted with respect to the plaintext, so that the possibility that the head parts of the ciphertexts are the same can be reduced. Further, since the initial vector is updated each time the dummy character is encrypted, even if the head part of the plaintext after the order conversion is the same, the head part of the corresponding ciphertext is not the same. Therefore, it is difficult for an attacker to guess a plaintext from a large number of ciphertexts, and it is possible to prevent a decrease in the security of the ciphers.
このような暗号化装置1および復号装置2は、例えば、データベースに格納するデータの暗号化および復号に利用できる。すなわち、データベースを構築したストレージデバイスに対する不正アクセスや、ストレージデバイスの盗難による情報の漏洩を防止するには、各データを暗号化して格納することが望まれる。ここで、データベースには、住所や電話番号など先頭部分が同一になりやすい文字データを大量に格納することがある。この場合、従来の連鎖機能をもつ暗号利用モードを用いても、先頭部分が同一である暗号文が多数出現することになり、暗号解読の手掛かりとなってしまうおそれがある。
Such an
そこで、データベースに格納する文字データに対する暗号処理を例に、本発明の実施の形態を具体的に説明する。
[第1の実施の形態]
図2は、本実施の形態のシステム構成を示す図である。図2に示すデータベースシステムは、データベースに格納する文字データに対して暗号処理を行うものである。本実施の形態のデータベースシステムは、サーバ100、データベース110、クライアント21およびネットワーク10で構成される。
Therefore, an embodiment of the present invention will be specifically described by taking an example of encryption processing for character data stored in a database.
[First Embodiment]
FIG. 2 is a diagram showing a system configuration of the present embodiment. The database system shown in FIG. 2 performs cryptographic processing on character data stored in the database. The database system according to the present embodiment includes a server 100, a
クライアント21は、ネットワーク10を介してサーバ100と接続されている。クライアント21は、ユーザが使用するコンピュータである。サーバ100は、データベース110と接続されている。サーバ100は、データベース110の管理機能を有するコンピュータである。データベース110には、文字データが暗号化されて格納されている。
The client 21 is connected to the server 100 via the
クライアント21は、データベース110に格納されたデータを利用する場合、ネットワーク10を通じてサーバ100に対してデータ処理の要求を行う。サーバ100は、クライアント21からの要求に応じて、データベース110に格納されたデータの処理を行う。ここで、サーバ100は、データ更新の場合には文字データを暗号化してデータベース110に格納し、データ検索の場合には取得した暗号文を復号してクライアント21に応答する。
When using data stored in the
このように、サーバ100が文字データの暗号化および復号の処理を行い、クライアント21とデータベース110との間でデータを中継する。なお、サーバ100とクライアント21との間の通信も、DESやAES等の暗号技術を用いて暗号化して行うことが可能である。
As described above, the server 100 encrypts and decrypts the character data, and relays the data between the client 21 and the
図3は、サーバのハードウェア構成を示す図である。サーバ100は、CPU(Central Processing Unit)101によって装置全体が制御されている。CPU101には、バス108を介してRAM(Random Access Memory)102、ハードディスクドライブ(HDD:Hard Disk Drive)103、グラフィック処理装置104、入力インタフェース105、通信インタフェース106およびストレージデバイスインタフェース107が接続されている。
FIG. 3 is a diagram illustrating a hardware configuration of the server. The server 100 is entirely controlled by a CPU (Central Processing Unit) 101. A random access memory (RAM) 102, a hard disk drive (HDD) 103, a
RAM102には、CPU101に実行させるOS(Operating System)のプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM102には、CPU101による処理に必要な各種データが格納される。HDD103には、OSやアプリケーションプログラムが格納される。
The
グラフィック処理装置104には、モニタ11が接続されている。グラフィック処理装置104は、CPU101からの命令に従って、画像をモニタ11の画面に表示させる。入力インタフェース105には、キーボード12とマウス13とが接続されている。入力インタフェース105は、キーボード12やマウス13から送られてくる信号を、バス108を介してCPU101に送信する。
A
通信インタフェース106は、ネットワーク10に接続されている。通信インタフェース106は、ネットワーク10を介して、他のコンピュータとの間でデータの送受信を行う。ストレージデバイスインタフェース107は、データベース110に対してデータの入出力を行う通信インタフェースである。
The
以上のようなハードウェア構成によって、本実施の形態の処理機能を実現することができる。なお、図3には、サーバ100のハードウェア構成を示したが、クライアント21も同様のハードウェアで実現できる。 With the hardware configuration as described above, the processing functions of the present embodiment can be realized. Although FIG. 3 shows the hardware configuration of the server 100, the client 21 can also be realized by similar hardware.
図4は、第1の実施の形態のサーバの機能例を示すブロック図である。サーバ100は、データベース管理部120、初期値記憶部131、共通鍵記憶部132、ダミー位置記憶部133、暗号化部140および復号部150を有している。
FIG. 4 is a block diagram illustrating an example of functions of the server according to the first embodiment. The server 100 includes a
データベース管理部120は、クライアント21からの要求に応じてデータベース110内のデータの入出力を行う。ここで、データベース110に対して文字データを入力する際には、データベース管理部120は、暗号化部140を介してデータベース110へ文字データを書き込む。また、データベース110から文字データを取得し出力する際には、データベース管理部120は、復号部150を介してデータベース110内の文字データを取得する。
The
初期値記憶部131は、暗号化部140および復号部150が暗号処理で用いる初期ベクタを記憶する。共通鍵記憶部132は、暗号化部140および復号部150が暗号処理で用いる共通鍵を記憶する。ダミー位置記憶部133は、暗号化部140がダミー文字として選択する文字および復号部150がダミー暗号として選択する暗号値の位置を指定した位置情報を記憶する。例えば、最後から3番目の文字または暗号値を、ダミー文字またはダミー暗号として用いるという情報を記憶する。
The initial
暗号化部140は、データベース管理部120から受け取った文字データを暗号化し、データベース110に格納する。暗号化に際しては、初期値記憶部131、共通鍵記憶部132およびダミー位置記憶部133を参照する。
The
復号部150は、データベース管理部120からの要求に応じてデータベース110から暗号化された文字データを取得し、取得した文字データを復号する。そして、復号部150は、復号した文字データをデータベース管理部120に渡す。復号に際しては、初期値記憶部131、共通鍵記憶部132およびダミー位置記憶部133を参照する。
The
次に、暗号化部140の暗号化処理の機能について詳細に説明する。以下、暗号利用モードとして、まずCFBモードを用いた場合について説明し、続いてCFBモードに代えてOFBモードを用いた場合の変形例を説明する。なお、第1の実施の形態では、暗号化単位を1文字(日本語の場合、データ長が16ビット)としている。
Next, the encryption processing function of the
図5は、第1の実施の形態の暗号化部の機能例を示すブロック図である。図5に示す暗号化部140は、CFBモードを用いたものである。暗号化部140は、順序変換部141、シフトレジスタ142、暗号化処理部143、暗号データ記憶部144、排他的論理和演算部145、ダミー文字選択部146および暗号文出力部147を有している。
FIG. 5 is a block diagram illustrating a functional example of the encryption unit according to the first embodiment. The
順序変換部141は、データベース管理部120から文字データとして平文31が入力されると、平文31の文字順序を変換して新たな平文を生成する。具体的には、順序変換部141は、入力された平文31を先頭と最後尾とが連続した循環文字列とみなし、循環文字列上で先頭文字と2番目以降の文字を辿る回転方向とを指定する。これにより、順序変換した文字列が生成される。そして、順序変換部141は、順序変換した文字列の先頭に、先頭文字と回転方向とを指定した指定情報を付加し、新たな平文としてダミー文字選択部146に通知する。
When the
シフトレジスタ142は、排他的論理和演算部145から演算結果が出力される毎に、所定のビット数だけデータをシフトすることができるレジスタである。第1の実施の形態では、シフトレジスタ142内のデータが毎回左に1文字分ずつシフトし、排他的論理和演算部145の演算結果が右側に格納される。暗号化処理を開始する際には、初期値記憶部131に格納されている初期ベクタがシフトレジスタ142に設定される。
The
暗号化処理部143は、シフトレジスタ142に設定された値を、共通鍵記憶部132に格納されている共通鍵を用いて暗号化する。暗号化処理部143で行う暗号化処理の暗号化アルゴリズムとしては、例えば、DESやAESを用いることができる。そして、暗号化処理部143は、暗号化処理の結果を暗号データ記憶部144に格納する。
The
排他的論理和演算部145は、入力される文字データと、暗号データ記憶部144の先頭から1文字分のデータとの排他的論理和を演算する。そして、排他的論理和演算部145は、演算結果を出力すると共にシフトレジスタ142の入力として与える。
The exclusive OR
ダミー文字選択部146は、順序変換部141から新たな平文を取得すると、ダミー位置記憶部133に格納されている位置情報を取得し、位置情報で指定される文字をダミー文字として選択する。そして、ダミー文字選択部146は、選択したダミー文字を排他的論理和演算部145に入力する。これにより、排他的論理和演算部145によってダミー文字に対応する暗号値が演算され出力されると共に、出力される暗号値を用いてシフトレジスタ142のデータが更新される。
When the new plaintext is acquired from the
その後、ダミー文字選択部146は、取得した暗号値を破棄すると共に、順序変換部141から取得した新たな平文を暗号文出力部147に通知する。なお、ダミー文字選択部146は、ダミー文字として2文字以上を選択し、連続的に排他的論理和演算部145に入力するようにしてもよい。
Thereafter, the dummy
暗号文出力部147は、ダミー文字選択部146から新たな平文を取得すると、これを排他的論理和演算部145に1文字ずつ入力する。これにより、排他的論理和演算部145による演算と、シフトレジスタ142のデータの更新とが交互に行われ、新たな平文の1文字に対応する暗号値が順次出力される。そして、暗号文出力部147は、新たな平文に対応する全ての暗号値を取得すると、これを平文31に対する暗号文32として出力し、データベース110に格納する。
When the
図6は、順序変換処理の概要を示す図である。順序変換部141は、入力された平文31を、図6に示すような循環文字列とみなす。すなわち、平文31がn文字(nは自然数)で構成されるとき、先頭文字D1と最後尾文字Dnとが連続しているとみなす。ここで、順序変換部141は、循環文字列の中の任意の1文字Dk(kは1以上n以下の自然数)を、新たな先頭文字に指定する。
FIG. 6 is a diagram showing an outline of the order conversion process. The
さらに、順序変換部141は、指定した先頭文字から2番目以降の文字を辿る回転方向(順方向/逆方向)を指定する。例えば、文字Dkから逆方向を指定した場合、Dk,Dk−1,・・・,D1,Dn,・・・,Dk+1という文字列が得られる。このように文字列を順序変換することで、先頭部分が同一である文字列の出現頻度を低くすることができる。また、循環文字列の回転を利用して順序変換することで、順序を再現するのに必要な設定情報が少なくて済む。
Further, the
図7は、第1の実施の形態の暗号化処理の進行例を示す図である。図7に示す例は、1文字のダミー文字D1と、それに続く平文の3文字D2,D3,D4とを、CFBモードで暗号化するものである。 FIG. 7 is a diagram illustrating an example of progress of the encryption processing according to the first embodiment. In the example shown in FIG. 7, one dummy character D1 and the subsequent three plaintext characters D2, D3, and D4 are encrypted in the CFB mode.
第1の状態[ST11]には、ダミー文字D1に対する暗号化処理の流れが示されている。このとき、シフトレジスタ142には初期ベクタが設定されている。そして、暗号化処理が開始されると、まず、暗号化処理部143によってシフトレジスタ142内の値が暗号化され、暗号データ記憶部144に格納される。このとき暗号化されたデータの先頭1文字分のデータがX1である。次に、排他的論理和演算部145によって、暗号データ記憶部144内の先頭1文字分のデータX1とダミー文字D1との排他的論理和が計算され、演算結果として暗号値C1が得られる。
In the first state [ST11], the flow of the encryption process for the dummy character D1 is shown. At this time, an initial vector is set in the
第2の状態[ST12]には、文字D2に対する暗号化処理の流れが示されている。このとき、シフトレジスタ142は左に1文字分シフトされ、右に前回の演算結果C1が格納されている。この状態で、暗号化処理部143によってシフトレジスタ142内の値が暗号化され、暗号データ記憶部144に格納される。このとき暗号化されたデータの先頭1文字分のデータがX2である。次に、排他的論理和演算部145によって、暗号データ記憶部144内の先頭1文字分のデータX2と文字D2との排他的論理和が計算され、演算結果として暗号値C2が得られる。
The second state [ST12] shows the flow of the encryption process for the character D2. At this time, the
以後同様に、文字D3,D4の暗号化が順次行われる。第3の状態[ST13]には、文字D3に対する暗号化処理の流れが示されている。この例では、X3とD3との排他的論理和の演算結果として暗号値C3が得られている。第4の状態[ST14]には、文字D4に対する暗号化処理の流れが示されている。この例では、X4とD4との排他的論理和の演算結果として暗号値C4が得られている。 Thereafter, similarly, the characters D3 and D4 are sequentially encrypted. The third state [ST13] shows the flow of the encryption process for the character D3. In this example, the cipher value C3 is obtained as the operation result of the exclusive OR of X3 and D3. The fourth state [ST14] shows the flow of encryption processing for the character D4. In this example, the encrypted value C4 is obtained as the result of the exclusive OR operation between X4 and D4.
以上の処理によって得られた暗号値C2,C3,C4の列が、暗号文32として暗号文出力部147によって出力される。
次に、暗号利用モードとしてOFBモードを用いた場合の暗号化処理について説明する。
The sequence of cipher values C2, C3, and C4 obtained by the above processing is output as
Next, encryption processing when the OFB mode is used as the encryption usage mode will be described.
図8は、第1の実施の形態の暗号化部の他の機能例を示すブロック図である。図8に示す暗号化部140aは、OFBモードを用いたものである。暗号化部140aは、順序変換部141、シフトレジスタ142a、暗号化処理部143、暗号データ記憶部144、排他的論理和演算部145、ダミー文字選択部146および暗号文出力部147を有している。暗号化部140と同一の符号を付した機能ブロックは、それぞれ同一の機能を有するため、説明を省略する。
FIG. 8 is a block diagram illustrating another example of the function of the encryption unit according to the first embodiment. The
シフトレジスタ142aは、排他的論理和演算部145から演算結果が出力される毎に、データを左に1文字分シフトし、暗号データ記憶部144の先頭1文字分のデータを右側に格納する。このようにして更新されたデータを用いて、暗号化処理部143による次の暗号化処理が行われる。
Each time the operation result is output from the exclusive OR
上記のように、OFBモードでは、シフトレジスタの右側に格納されるデータがCFBモードとは異なる。
図9は、第1の実施の形態の暗号化処理の他の進行例を示す図である。図9に示す例は、図7の例と同様の文字を、OFBモードで暗号化するものである。
As described above, in the OFB mode, data stored on the right side of the shift register is different from that in the CFB mode.
FIG. 9 is a diagram illustrating another progress example of the encryption processing according to the first embodiment. In the example shown in FIG. 9, characters similar to those in the example of FIG. 7 are encrypted in the OFB mode.
第1の状態[ST21]には、ダミー文字D1に対する暗号化処理の流れが示されている。このとき、シフトレジスタ142aには初期ベクタが設定されている。そして、暗号化処理が開始されると、まず、暗号化処理部143によってシフトレジスタ142a内の値が暗号化され、暗号データ記憶部144に格納される。このとき暗号化されたデータの先頭1文字分のデータがX1である。次に、排他的論理和演算部145によって、暗号データ記憶部144内の先頭1文字分のデータX1とダミー文字D1との排他的論理和が計算され、演算結果として暗号値C1が得られる。
In the first state [ST21], the flow of encryption processing for the dummy character D1 is shown. At this time, an initial vector is set in the
第2の状態[ST22]には、文字D2に対する暗号化処理の流れが示されている。このとき、シフトレジスタ142aは左に1文字分シフトされ、右に暗号データ記憶部144内の先頭1文字分のデータX1が格納されている。この状態で、暗号化処理部143によってシフトレジスタ142a内の値が暗号化され、暗号データ記憶部144に格納される。このとき暗号化されたデータの先頭1文字分のデータがX2である。次に、排他的論理和演算部145によって、暗号データ記憶部144内の先頭1文字分のデータX2と文字D2との排他的論理和が計算され、演算結果として暗号値C2が得られる。
The second state [ST22] shows the flow of the encryption process for the character D2. At this time, the
以後同様に、文字D3,D4の暗号化が順次行われる。第3の状態[ST23]には、文字D3に対する暗号化処理の流れが示されている。この例では、X3とD3との排他的論理和の演算結果として暗号値C3が得られている。第4の状態[ST24]には、文字D4に対する暗号化処理の流れが示されている。この例では、X4とD4との排他的論理和の演算結果として暗号値C4が得られている。 Thereafter, similarly, the characters D3 and D4 are sequentially encrypted. The third state [ST23] shows the flow of the encryption process for the character D3. In this example, the cipher value C3 is obtained as the operation result of the exclusive OR of X3 and D3. In the fourth state [ST24], the flow of the encryption process for the character D4 is shown. In this example, the encrypted value C4 is obtained as the result of the exclusive OR operation between X4 and D4.
次に、復号部150の復号処理の機能について詳細に説明する。以下、暗号利用モードとして、まずCFBモードの場合について説明し、続いてOFBモードの場合について説明する。
Next, the function of the decoding process of the
図10は、第1の実施の形態の復号部の機能例を示すブロック図である。図10に示す復号部150は、CFBモードを用いて暗号化された暗号文を復号するものである。復号部150は、シフトレジスタ151、暗号化処理部152、暗号データ記憶部153、排他的論理和演算部154、ダミー暗号選択部155、平文出力部156および順序再生部157を有している。
FIG. 10 is a block diagram illustrating an exemplary function of the decoding unit according to the first embodiment. The decrypting
シフトレジスタ151は、排他的論理和演算部154から演算結果が出力される毎に、所定のビット数分のデータをシフトすることができるレジスタである。第1の実施の形態では、シフトレジスタ151内のデータが毎回左に1文字分ずつシフトし、排他的論理和演算部154に入力される暗号値が右側に格納される。暗号化処理を開始する際には、初期値記憶部131に格納されている初期ベクタがシフトレジスタ151に設定される。
The
暗号化処理部152は、シフトレジスタ151に設定された値を、共通鍵記憶部132に格納されている共通鍵を用いて暗号化する。暗号化処理部152で行う暗号化処理の暗号化アルゴリズムは、暗号化部140で用いたものと同一とする。そして、暗号化処理部152は、暗号化処理の結果を暗号データ記憶部153に格納する。
The
排他的論理和演算部154は、入力される暗号値と、暗号データ記憶部153の先頭から1文字分のデータとの排他的論理和を演算する。そして、排他的論理和演算部154は、演算結果を出力すると共に、入力された暗号値をシフトレジスタ151の入力として与える。
The exclusive OR
ダミー暗号選択部155は、データベース管理部120からの要求に応じてデータベース110から暗号文33を取得すると、ダミー位置記憶部133に格納されている位置情報を取得し、位置情報で指定される暗号値をダミー暗号として選択する。そして、ダミー暗号選択部155は、選択したダミー暗号を排他的論理和演算部154に入力する。これにより、排他的論理和演算部154によってダミー暗号に対応する文字データが演算され出力されると共に、ダミー暗号を用いてシフトレジスタ151のデータが更新される。
When the dummy
その後、ダミー暗号選択部155は、取得した文字データを破棄すると共に、暗号文33を平文出力部156に通知する。
平文出力部156は、ダミー暗号選択部155から暗号文33を取得すると、これを排他的論理和演算部154に1文字分ずつ入力する。これにより、排他的論理和演算部154による演算と、シフトレジスタ151のデータの更新とが交互に行われ、暗号文33に対応する文字データが1文字ずつ出力される。そして、平文出力部156は、暗号文33に対応する全ての文字データを取得すると、この文字列を順序再生部157に通知する。
Thereafter, the dummy
When the
順序再生部157は、平文出力部156から文字列を取得すると、暗号化部140の順序変換部141で変換された文字順序を逆変換して、平文34を再生する。具体的には、順序再生部157は、文字列の先頭に付加された指定情報を抽出し、先頭文字の位置と回転方向とを把握する。そして、順序再生部157は、残りの文字列を先頭と最後尾とが連続した循環文字列とみなし、順序変換部141と逆の操作を行う。これにより、文字列の文字順序が再生される。そして、順序再生部157は、文字順序を再生した平文34を、データベース管理部120に渡す。
Upon obtaining the character string from the
図11は、第1の実施の形態の復号処理の進行例を示す図である。図11に示す例は、1文字分のダミー暗号C1と、それに続く暗号文の3つの暗号値C2,C3,C4とを、CFBモードで復号するものである。 FIG. 11 is a diagram illustrating a progress example of the decoding process according to the first embodiment. In the example shown in FIG. 11, the dummy cipher C1 for one character and the three cipher values C2, C3, and C4 of the ciphertext that follow are decrypted in the CFB mode.
第1の状態[ST31]には、ダミー暗号C1に対する復号処理の流れが示されている。このとき、シフトレジスタ151には初期ベクタが設定されている。そして、復号処理が開始されると、まず、暗号化処理部152によってシフトレジスタ151内の値が暗号化され、暗号データ記憶部153に格納される。このとき暗号化されたデータの先頭1文字分のデータがX1である。次に、排他的論理和演算部154によって、暗号データ記憶部153内の先頭1文字分のデータX1とダミー暗号C1との排他的論理和が計算され、演算結果として文字D1が得られる。
In the first state [ST31], the flow of the decryption process for the dummy cipher C1 is shown. At this time, an initial vector is set in the
第2の状態[ST32]には、暗号値C2に対する復号処理の流れが示されている。このとき、シフトレジスタ151は左に1文字分シフトされ、右に前回入力された暗号値C1が格納されている。この状態で、暗号化処理部152によってシフトレジスタ151内の値が暗号化され、暗号データ記憶部153に格納される。このとき暗号化されたデータの先頭1文字分のデータがX2である。次に、排他的論理和演算部154によって、暗号データ記憶部153内の先頭1文字分のデータX2と暗号値C2との排他的論理和が計算され、演算結果として文字D2が得られる。
In the second state [ST32], the flow of the decryption process for the encrypted value C2 is shown. At this time, the
以後同様に、暗号値C3,C4の復号が順次行われる。第3の状態[ST33]には、暗号値C3に対する復号処理の流れが示されている。この例では、X3とC3との排他的論理和の演算結果として文字D3が得られている。第4の状態[ST34]には、暗号値C4に対する復号処理の流れが示されている。この例では、X4とC4との排他的論理和の演算結果として文字D4が得られている。 Thereafter, similarly, the encrypted values C3 and C4 are sequentially decrypted. The third state [ST33] shows the flow of decryption processing for the encrypted value C3. In this example, the character D3 is obtained as an exclusive OR operation result of X3 and C3. In the fourth state [ST34], the flow of the decryption process for the encrypted value C4 is shown. In this example, the character D4 is obtained as the result of the exclusive OR operation between X4 and C4.
以上の処理によって得られた文字D2,D3,D4の列が、文字列として平文出力部156によって順序再生手段157に通知される。
次に、暗号利用モードとしてOFBモードを用いた場合の復号処理について説明する。
The sequence of characters D2, D3, D4 obtained by the above processing is notified to the sequence reproduction means 157 by the
Next, decryption processing when the OFB mode is used as the encryption usage mode will be described.
図12は、第1の実施の形態の復号部の他の機能例を示すブロック図である。図12に示す復号部150aは、OFBモードを用いたものである。復号部150aは、シフトレジスタ151a、暗号化処理部152、暗号データ記憶部153、排他的論理和演算部154、ダミー暗号選択部155、平文出力部156および順序再生部157を有している。復号部150と同一の符号を付した機能ブロックは、それぞれ同一の機能を有するため、説明を省略する。
FIG. 12 is a block diagram illustrating another example of functions of the decoding unit according to the first embodiment. The
シフトレジスタ151aは、排他的論理和演算部154から演算結果が出力される毎に、データを左に1文字分シフトし、暗号データ記憶部153の先頭1文字分のデータを右側に格納する。このようにして更新されたデータを用いて、暗号化処理部152による次の暗号化処理が行われる。
The
図13は、第1の実施の形態の復号処理の他の進行例を示す図である。図13に示す例は、図11の例と同様の暗号値を、OFBモードで復号するものである。
第1の状態[ST41]には、ダミー暗号C1に対する復号処理の流れが示されている。このとき、シフトレジスタ151aには初期ベクタが設定されている。そして、復号処理が開始されると、まず、暗号化処理部152によってシフトレジスタ151a内の値が暗号化され、暗号データ記憶部153に格納される。このとき暗号化されたデータの先頭1文字分のデータがX1である。次に、排他的論理和演算部154によって、暗号データ記憶部153内の先頭1文字分のデータX1とダミー暗号C1との排他的論理和が計算され、演算結果として文字D1が得られる。
FIG. 13 is a diagram illustrating another progress example of the decoding process according to the first embodiment. In the example shown in FIG. 13, the same encryption value as in the example of FIG. 11 is decrypted in the OFB mode.
In the first state [ST41], the flow of the decryption process for the dummy cipher C1 is shown. At this time, an initial vector is set in the
第2の状態[ST42]には、暗号値C2に対する復号処理の流れが示されている。このとき、シフトレジスタ151aは左に1文字分シフトされ、右に暗号データ記憶部153内の先頭1文字分のデータX1が格納されている。この状態で、暗号化処理部152によってシフトレジスタ151a内の値が暗号化され、暗号データ記憶部153に格納される。このとき暗号化されたデータの先頭1文字分のデータがX2である。次に、排他的論理和演算部154によって、暗号データ記憶部153内の先頭1文字分のデータX2と暗号値C2との排他的論理和が計算され、演算結果として文字D2が得られる。
In the second state [ST42], the flow of the decryption process for the encrypted value C2 is shown. At this time, the
以後同様に、暗号値C3,C4の復号が順次行われる。第3の状態[ST43]には、暗号値C3に対する復号処理の流れが示されている。この例では、X3とC3との排他的論理和の演算結果として文字D3が得られている。第4の状態[ST44]には、暗号値C4に対する復号処理の流れが示されている。この例では、X4とC4との排他的論理和の演算結果として文字D4が得られている。 Thereafter, similarly, the encrypted values C3 and C4 are sequentially decrypted. In the third state [ST43], the flow of the decryption process for the encrypted value C3 is shown. In this example, the character D3 is obtained as an exclusive OR operation result of X3 and C3. In the fourth state [ST44], the flow of the decryption process for the encrypted value C4 is shown. In this example, the character D4 is obtained as the result of the exclusive OR operation between X4 and C4.
このような暗号化処理および復号処理を行うサーバを用いることで、先頭部分が同一になりやすい文字データを多数暗号化する場合でも、文字列の順序変換が行われるため、暗号文の先頭部分が同一になる可能性を低くできる。また、ダミー文字の暗号化によって毎回初期ベクタが更新されるため、順序変換した文字列の先頭部分が同一になったとしても、対応する暗号文の先頭部分は同一にならない。したがって、データベースに格納された多数の暗号文から元の文字列を推測するのを困難にし、暗号の安全性低下を効率的に防止することができる。 By using a server that performs such encryption processing and decryption processing, even when a large number of character data whose leading portions are likely to be the same are encrypted, the order of the character strings is converted, so that the leading portion of the ciphertext The possibility of being the same can be reduced. In addition, since the initial vector is updated every time the dummy characters are encrypted, even if the head portions of the character strings after the order conversion are the same, the head portions of the corresponding ciphertexts are not the same. Therefore, it is difficult to guess the original character string from a large number of ciphertexts stored in the database, and it is possible to efficiently prevent a decrease in the security of the encryption.
[第2の実施の形態]
次に、第2の実施の形態について説明する。第2の実施の形態に係るデータベースシステムは、第1の実施の形態における暗号化処理および復号処理を、複数の文字について並列処理できるようしたものである。第2の実施の形態のシステム構成は、第1の実施の形態のものと同様である。以下、暗号化処理を行う暗号化部および復号処理を行う復号部の機能の詳細について、第1の実施の形態と異なる部分を中心に説明する。
[Second Embodiment]
Next, a second embodiment will be described. The database system according to the second embodiment is configured such that the encryption process and the decryption process in the first embodiment can be performed in parallel for a plurality of characters. The system configuration of the second embodiment is the same as that of the first embodiment. Hereinafter, the details of the functions of the encryption unit that performs the encryption process and the decryption unit that performs the decryption process will be described with a focus on differences from the first embodiment.
図14は、第2の実施の形態の暗号化部の機能例を示すブロック図である。図14に示す暗号化部140bは、図5に示した第1の実施の形態の暗号化部140に対応するものであり、CFBモードを用いている。なお、暗号化部140の順序変換部141、ダミー文字選択部146、暗号文出力部147に相当する機能は、第1の実施の形態と同様であるため、機能ブロックの記載を省略している。
FIG. 14 is a block diagram illustrating an example of functions of the encryption unit according to the second embodiment. An
シフトレジスタ142bは、所定のビット数ずつデータをシフトすることができるレジスタである。暗号化処理の開始時には、初期値記憶部131に予め格納されている初期ベクタが、シフトレジスタ142bに格納される。その後、9文字分の暗号化が行われる毎に、シフトレジスタ142b内の値が、左に1文字分ずつシフトされる。このとき、右端には、排他的論理和演算部145aの演算結果が設定される。
The
暗号化処理部143は、共通鍵記憶部132に格納されている共通鍵を用いて、シフトレジスタ142b内の値を暗号化する。そして、暗号化処理部143は、暗号化処理の結果を暗号データ記憶部144bに格納する。暗号データ記憶部144bは、暗号化処理部143で暗号化されたデータを記憶する。暗号データ記憶部144bに格納されたデータは、先頭から1文字分ずつに分割され、それぞれのデータが排他的論理和演算部145a,145b,145c,・・・,145iに入力される。
The
排他的論理和演算部145a,145b,145c,・・・,145iは、暗号データ記憶部144bから入力された1文字分のデータと、入力された文字との排他的論理和をそれぞれ演算する。そして、排他的論理和演算部145a,145b,145c,・・・,145iは、それぞれの暗号値を入力文字との対応順序を保持して出力する。
The exclusive OR
ただし、暗号化処理を行うとき、ダミー文字と平文とは並列処理せずに、ダミー文字を暗号化してシフトレジスタ142bのデータが更新されてから平文を入力する必要がある。シフトレジスタ142bのデータが更新されないうちに平文の暗号化を開始すると、最初の数文字の暗号結果をダミー文字に依存させることができず、暗号の安全性を十分に維持できないからである。
However, when performing the encryption process, it is necessary to input the plain text after the dummy character is encrypted and the data in the
図15は、第2の実施の形態の復号部の機能例を示すブロック図である。図15に示す復号部150bは、図10に示した第1の実施の形態の復号部150に対応するものであり、CFBモードを用いて暗号化された暗号文を復号するものである。なお、復号部150のダミー暗号選択部155、平文出力部156および順序再生部157に相当する機能は、第1の実施の形態と同様であるため、機能ブロックの記載を省略している。
FIG. 15 is a block diagram illustrating an example of functions of the decoding unit according to the second embodiment. The
シフトレジスタ151bは、所定のビット数ずつデータをシフトすることができるレジスタである。復号処理の開始時には、初期値記憶部131に予め格納されている初期ベクタが、シフトレジスタ151bに格納される。その後、9文字分の復号が行われる毎に、シフトレジスタ151b内の値が、左に1文字分ずつシフトされる。そのとき、右端には、9文字分ずつ入力される暗号値の最初の暗号値が設定される。
The
暗号化処理部152は、共通鍵記憶部132に格納されている共通鍵を用いて、シフトレジスタ151b内の値を暗号化する。そして、暗号化処理部152は、暗号化処理の結果を暗号データ記憶部153bに格納する。暗号データ記憶部153bは、暗号化処理部152で暗号化されたデータを記憶する。暗号データ記憶部153bに格納されたデータは、先頭から1文字分ずつに分割され、それぞれのデータが排他的論理和演算部154a,154b,154c,・・・,154iに入力される。
The
排他的論理和演算部154a,154b,154c,・・・,154iは、暗号データ記憶部153bから入力された1文字分のデータと、入力された暗号値との排他的論理和をそれぞれ演算する。そして、排他的論理和演算部154a,154b,154c,・・・,154iは、復号されたそれぞれの文字を入力された暗号値との対応順序を保持して出力する。
The exclusive OR
ただし、暗号化処理と同様、ダミー暗号と暗号文とは並列処理せずに、ダミー暗号を復号してシフトレジスタ151bのデータが更新されてから暗号文を入力する必要がある。
なお、第2の実施の形態では、並列化する最大文字数を9文字としたが、シフトレジスタ151bおよび暗号データ記憶部153bに格納されるデータのビット長を超えない範囲で、任意の文字数の並列化が可能である。また、第2の実施の形態では、CFBモードを用いた場合の暗号化処理および復号処理について説明したが、第1の実施の形態で示したように、OFBモードなど他の連鎖機能を有する暗号利用モードを用いてもよい。
However, as with the encryption process, the dummy cipher and the ciphertext are not processed in parallel, and the ciphertext must be input after the dummy cipher is decrypted and the data in the
In the second embodiment, the maximum number of characters to be parallelized is nine characters, but any number of characters can be parallelized within a range not exceeding the bit length of data stored in the
このような暗号化処理および復号処理を行うサーバを用いることで、第1の実施の形態のサーバと同様の効果を得られる。さらに、第2の実施の形態のサーバを用いることで、暗号の安全性を低下させることなく暗号化処理および復号処理の並列化ができ、処理を大幅に高速化できる。 By using a server that performs such encryption processing and decryption processing, the same effect as that of the server of the first embodiment can be obtained. Furthermore, by using the server of the second embodiment, the encryption process and the decryption process can be parallelized without lowering the security of the encryption, and the process can be greatly speeded up.
[第3の実施の形態]
次に、第3の実施の形態について説明する。第3の実施の形態に係るデータベースシステムは、平文がある文字コード体系で符号化されているとき、入力された平文を別の文字コード体系の文字コードに変換し、変換後の文字コードに対して暗号化処理を行い、暗号結果を元の文字コード体系の文字コードに逆変換するものである。このように、平文の文字コード体系とは異なる文字コード体系を用いて暗号化処理を行う利点は以下の通りである。
[Third Embodiment]
Next, a third embodiment will be described. The database system according to the third embodiment converts an input plaintext into a character code of another character code system when the plain text is encoded with a character code system, Encryption processing is performed, and the encryption result is converted back to the character code of the original character code system. Thus, the advantage of performing the encryption process using a character code system different from the plain text character code system is as follows.
文字データは特定の文字コード体系に従って文字が符号化されたものである。例えば、日本語の文字コード体系であるシフトJISなどでは、かなや漢字1文字が16ビットで符号化される。ここで、多くの文字コード体系では、文字が割り当てられてない文字コード領域が存在する。例えば、シフトJISなどの文字コード体系では、2の16乗(=65536)個の文字コードを用意できるが、その全てについて実際に文字が割り当てられているわけではない。したがって、文字が割り当てられてない文字コードが文字データ中に出現すると、その文字データは正常な文字データとして取り扱えない。 Character data is obtained by encoding characters according to a specific character code system. For example, in Shift JIS, which is a Japanese character code system, one kana or kanji character is encoded with 16 bits. Here, in many character code systems, there is a character code area to which no character is assigned. For example, in a character code system such as Shift JIS, 2 16 (= 65536) character codes can be prepared, but not all of them are actually assigned characters. Therefore, when a character code to which no character is assigned appears in the character data, the character data cannot be handled as normal character data.
ところで、文字コードをDESやAESなどの暗号化アルゴリズムを用いて暗号化すると、暗号結果は所定のビット長で表現可能な全範囲に分散するため、文字が割り当てられている文字コード領域に暗号化されるように暗号結果の範囲を制限することはできない。したがって、暗号結果をそのままデータベースに格納すると、データベースを管理するプログラムが文字データのみしか扱えない場合、この暗号文を正常に処理できない。 By the way, if the character code is encrypted using an encryption algorithm such as DES or AES, the encryption result is distributed over the entire range that can be expressed with a predetermined bit length, so the character code is encrypted in the character code area to which the character is assigned. The range of cryptographic results cannot be limited. Therefore, if the cipher result is stored in the database as it is, this ciphertext cannot be processed normally if the program for managing the database can handle only character data.
そこで、暗号化処理の前後で文字コードの変換/逆変換を行うことで、暗号結果を、所定のビット長で表現可能な全範囲のうちの特定の範囲に制限することができる。具体的には、平文の文字コード体系のビット長よりも少ないビット長の文字コード体系を用いて暗号化処理を行うようにすればよい。例えば、日本語の文字は13ビットで表現可能であるため、16ビットの文字コード体系から13ビットの文字コード体系に変換し、13ビット毎に暗号化処理を行えばよい。 Therefore, by performing the conversion / inverse conversion of the character code before and after the encryption process, the encryption result can be limited to a specific range in the entire range that can be expressed with a predetermined bit length. Specifically, the encryption process may be performed using a character code system having a bit length smaller than that of the plain text character code system. For example, since Japanese characters can be expressed in 13 bits, a 16-bit character code system may be converted to a 13-bit character code system, and encryption processing may be performed every 13 bits.
図16は、第3の実施の形態のサーバの機能例を示すブロック図である。図16のサーバ100cは、図4に示した第1の実施の形態のサーバ100に対応するものである。データベース管理部120、初期値記憶部131、共通鍵記憶部132およびダミー位置記憶部133の機能は、第1の実施の形態のものと同様である。
FIG. 16 is a block diagram illustrating an example of functions of a server according to the third embodiment. The server 100c in FIG. 16 corresponds to the server 100 in the first embodiment shown in FIG. The functions of the
変換テーブル記憶部134は、第1の文字コード体系と第2の文字コード体系との変換/逆変換を行うための変換テーブルを記憶する。変換テーブルには、第1の文字コード体系の文字コード第2の文字コード体系の文字コードとの対応関係が設定されている。すなわち、同一の文字を表す文字コードの組が記憶されている。
The conversion
暗号化部140cは、暗号化処理の前後で文字コードの変換/逆変換を行う。復号部150cは、復号処理の前後で文字コードの変換/逆変換を行う。その他の機能は、第1の実施の形態における暗号化部140および復号部150のものと同様である。
The
図17は、変換テーブルのデータ構造例を示す図である。変換テーブル134aは、変換テーブル記憶部134に格納されている。変換テーブル134aは、第2の文字コード体系における文字コードの順にインデックスが作成され、それぞれのインデックスに対応する第1の文字コード体系の文字コードが格納されている。例えば、16進数で表したとき、“0”と“82A0”(あ)、“1”と“82A2”(い)、“2”と“82A4”(う)、“3”と“82A6”(え)、“4”と“82A8”(お)をそれぞれ対応付ける。文字コードの並び順は、2つの文字コードが一対一に対応している限り、任意の順序で構わない。
FIG. 17 is a diagram illustrating an exemplary data structure of the conversion table. The conversion table 134a is stored in the conversion
図18は、第3の実施の形態の暗号化部の機能例を示すブロック図である。暗号化部140cは、図5に示した第1の実施の形態の暗号化部140に対応するものであり、CFBモードを用いている。暗号化部140と同一の符号を付した機能ブロックは、同一の機能を有するものであり、説明を省略する。
FIG. 18 is a block diagram illustrating an example of functions of the encryption unit according to the third embodiment. The
文字コード変換部148は、順序変換部141から新たな平文を取得すると、変換テーブル記憶部134に格納された変換テーブル134aを参照して、第1の文字コード体系で符号化されている新たな平文の各文字コードを、第2の文字コード体系の対応する文字コードに変換する。そして、文字コード変換部148は、第2の文字コード体系で符号化された新たな平文を、ダミー文字選択部146に入力する。
When the character
排他的論理和演算部145は、第2の文字コード体系の文字コードを対象として排他的論理和の演算を行う。すなわち、暗号化単位は、第2の文字コード体系のビット長となる。そして、出力される各暗号値は、第2の文字コード体系のいずれか1つの文字コードと同一の値となる。
The exclusive OR
文字コード逆変換部149は、暗号文出力部148から第2の文字コード体系の文字コードで構成される暗号文を取得すると、変換テーブル記憶部134に格納された変換テーブル134aを参照して、取得した暗号文の各文字コードを第1の文字コード体系の対応する文字コードに変換する。そして、第1の文字コード体系の文字コードで構成される暗号文32cを出力する。
When the character code
図19は、第3の実施の形態の復号部の機能例を示すブロック図である。復号部150cは、図10に示した第1の実施の形態の復号部150に対応するものであり、CFBモードを用いている。復号部150と同一の符号を付した機能ブロックは、同一の機能を有するものであり、説明を省略する。
FIG. 19 is a block diagram illustrating a functional example of the decoding unit according to the third embodiment. The
文字コード変換部158は、暗号化部140cで暗号化された暗号文33cを取得すると、変換テーブル記憶部134に格納された変換テーブル134aを参照して、第1の文字コード体系の文字コードで構成されている暗号文33cの各暗号値を、第2の文字コード体系の対応する文字コードに変換する。そして、文字コード変換部158は、第2の文字コード体系の文字コードで構成されている暗号文を、ダミー暗号選択部155に入力する。
When the character
排他的論理和演算部154は、第2の文字コード体系の文字コードを対象として排他的論理和の演算を行う。すなわち、暗号化単位は、第2の文字コード体系のビット長となる。そして、出力される各文字は、第2の文字コード体系で符号化されたものになる。
The exclusive OR
文字コード逆変換部159は、平文出力部156から第2の文字コード体系で符号化された文字列を取得すると、変換テーブル記憶部134に格納された変換テーブル134aを参照して、取得した文字列の各文字コードを第1の文字コード体系の対応する文字コードに変換する。そして、第1の文字コード体系で符号化された文字列を、順序再生部157に通知する。
When the character code
なお、第3の実施の形態では、CFBモードを用いた場合の暗号化処理および復号処理について説明したが、第1の実施の形態で示したように、OFBモードなど他の連鎖機能を有する暗号利用モードを用いてもよい。 In the third embodiment, the encryption process and the decryption process in the case of using the CFB mode have been described. However, as shown in the first embodiment, an encryption having another chain function such as the OFB mode. A usage mode may be used.
このような暗号化処理および復号処理を行うサーバを用いることで、第1の実施の形態のサーバと同様の効果を得られる。さらに、第3の実施の形態のサーバを用いることで、暗号の安全性を低下させることなく、出力される暗号文の各暗号値を所定の範囲内に制限することができ、さまざまなプログラムで暗号文を扱えるようにできる。また、暗号文のデータ長を平文のデータ長と同一にすることができる。 By using a server that performs such encryption processing and decryption processing, the same effect as that of the server of the first embodiment can be obtained. Furthermore, by using the server of the third embodiment, it is possible to limit each cipher value of the output ciphertext within a predetermined range without deteriorating the security of the cipher. Can handle ciphertext. Further, the data length of the ciphertext can be made the same as the data length of the plaintext.
なお、上記の処理機能は、コンピュータによって実現することができる。その場合、サーバが有すべき機能の処理内容を記述したプログラムが提供される。そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリなどがある。磁気記録装置には、ハードディスク装置(HDD)、フレキシブルディスク(FD)、磁気テープなどがある。光ディスクには、DVD(Digital Versatile Disc)、DVD−RAM、CD−ROM(Compact Disc - Read Only Memory)、CD−R(Recordable)/RW(ReWritable)などがある。光磁気記録媒体には、MO(Magneto-Optical disk)などがある。 The above processing functions can be realized by a computer. In that case, a program describing the processing contents of the functions that the server should have is provided. By executing the program on a computer, the above processing functions are realized on the computer. The program describing the processing contents can be recorded on a computer-readable recording medium. Examples of the computer-readable recording medium include a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory. Examples of the magnetic recording device include a hard disk device (HDD), a flexible disk (FD), and a magnetic tape. Optical discs include DVD (Digital Versatile Disc), DVD-RAM, CD-ROM (Compact Disc-Read Only Memory), CD-R (Recordable) / RW (ReWritable), and the like. Magneto-optical recording media include MO (Magneto-Optical disk).
プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD、CD−ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。 When distributing the program, for example, portable recording media such as a DVD and a CD-ROM on which the program is recorded are sold. It is also possible to store the program in a storage device of a server computer and transfer the program from the server computer to another computer via a network.
プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムに従った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもできる。また、コンピュータは、サーバコンピュータからプログラムが転送される毎に、逐次、受け取ったプログラムに従った処理を実行することもできる。 The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. In addition, each time the program is transferred from the server computer, the computer can sequentially execute processing according to the received program.
なお、本発明は、上述の実施の形態にのみ限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変更を加えることができる。
以上説明した実施の形態の主な技術的特徴は、以下の付記の通りである。
The present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.
The main technical features of the embodiment described above are as follows.
(付記1) 連鎖機能を有する暗号利用モードを用いて暗号処理を行う暗号処理プログラムにおいて、
コンピュータを、
レジスタ値として予め初期ベクタを有しており、暗号元データを取得すると、所定の前記暗号利用モードに従い、前記レジスタ値を用いた文字の暗号化と暗号化処理で得られる値を用いた前記レジスタ値の更新とを繰り返すことで、暗号化単位間に依存関係がある暗号化データを生成する暗号化手段、
平文が入力されると、前記平文の所定位置にある1または2以上の文字をダミー文字として選択し、前記ダミー文字を暗号元データとして前記暗号化手段に入力し、得られた暗号化データを破棄するダミー文字選択手段、
前記ダミー文字の暗号化によって前記暗号化手段の前記レジスタ値が更新されると、その後、前記平文を暗号元データとして前記暗号化手段に入力し、得られた暗号化データを暗号文として出力する暗号文出力手段、
として機能させることを特徴とする暗号処理プログラム。
(Supplementary Note 1) In a cryptographic processing program that performs cryptographic processing using a cryptographic usage mode having a chain function,
Computer
The register having an initial vector as a register value in advance, and obtaining the encryption source data, the register using the value obtained by character encryption and encryption processing using the register value according to the predetermined encryption usage mode Encryption means for generating encrypted data having a dependency relationship between encryption units by repeatedly updating the value;
When plaintext is input, one or more characters at a predetermined position in the plaintext are selected as dummy characters, the dummy characters are input as encryption source data to the encryption means, and the obtained encrypted data is Dummy character selection means to be discarded,
When the register value of the encryption unit is updated by encryption of the dummy character, the plaintext is then input to the encryption unit as encryption source data, and the obtained encrypted data is output as ciphertext Ciphertext output means,
A cryptographic processing program characterized by functioning as
(付記2) 前記暗号化手段は、1つの前記レジスタ値に対して、複数の文字を並列処理で暗号化することを特徴する付記1記載の暗号処理プログラム。
(付記3) 前記コンピュータを、さらに、
前記平文が入力されると、前記平文を先頭と最後尾とが連続した循環文字列とみなし、前記循環文字列上の1文字を新たな先頭に指定し、指定した前記新たな先頭から始まる文字順序が変換された新たな平文を生成する順序変換手段、
として機能させ、
前記ダミー文字選択手段および前記暗号文出力手段は、前記新たな平文を前記平文とみなして暗号化処理を行う、
ことを特徴とする付記1記載の暗号処理プログラム。
(Supplementary note 2) The encryption processing program according to
(Supplementary note 3)
When the plaintext is input, the plaintext is regarded as a cyclic character string in which a head and a tail are continuous, one character on the cyclic character string is designated as a new head, and a character starting from the designated new head Order conversion means for generating a new plaintext in which the order has been converted,
Function as
The dummy character selection means and the ciphertext output means regard the new plaintext as the plaintext and perform an encryption process.
The cryptographic processing program according to
(付記4) 前記順序変換手段は、前記新たな先頭の指定情報を前記新たな平文に付加することを特徴とする付記3記載の暗号処理プログラム。
(付記5) 前記コンピュータを、さらに、
第1の文字コード体系の文字コードと第2の文字コード体系の文字コードとの一対一の対応関係を記憶した文字コード情報記憶手段、
前記第1の文字コード体系で符号化された前記平文が入力されると、前記文字コード情報記憶手段を参照し、前記平文を前記第2の文字コード体系に変換する文字コード変換手段、
前記第2の文字コード体系で符号化された前記暗号文が生成されると、前記文字コード情報記憶手段を参照し、前記暗号文を前記第1の文字コード体系に変換する文字コード逆変換手段、
として機能させ、
前記暗号化手段は、前記第2の文字コード体系の文字コードから成る暗号元データを、前記第2の文字コード体系の文字コードから成る暗号化データに暗号化する、
ことを特徴とする付記1記載の暗号処理プログラム。
(Additional remark 4) The said order conversion means adds the said new head designation | designated information to the said new plaintext, The encryption processing program of
(Supplementary Note 5)
Character code information storage means for storing a one-to-one correspondence between a character code of the first character code system and a character code of the second character code system;
A character code conversion means for referring to the character code information storage means and converting the plain text to the second character code system when the plain text encoded in the first character code system is input;
When the ciphertext encoded with the second character code system is generated, the character code reverse conversion unit converts the ciphertext into the first character code system with reference to the character code information storage unit ,
Function as
The encryption means encrypts encryption source data composed of character codes of the second character code system into encrypted data composed of character codes of the second character code system;
The cryptographic processing program according to
(付記6) 前記コンピュータを、さらに、
前記レジスタ値として予め前記暗号化手段と同一の前記初期ベクタを有しており、暗号化データを取得すると、前記暗号化手段と同一の前記暗号利用モードに従い、前記レジスタ値を用いた暗号値の復号と復号処理で得られる値を用いた前記レジスタ値の更新とを繰り返すことで、復号データを生成する復号手段、
前記暗号文が入力されると、前記暗号文の前記所定位置にある1または2以上の暗号値をダミー暗号として選択し、前記ダミー暗号を暗号化データとして前記復号手段に入力し、得られた復号データを破棄するダミー暗号選択手段、
前記ダミー暗号の復号によって前記復号手段の前記レジスタ値が更新されると、その後、前記暗号文を暗号化データとして前記復号手段に入力し、得られた復号データを前記平文として出力する平文出力手段、
として機能させることを特徴とする付記1記載の暗号処理プログラム。
(Supplementary note 6)
The register value has the same initial vector as that of the encryption unit in advance, and when the encrypted data is acquired, according to the encryption usage mode same as that of the encryption unit, Decoding means for generating decoded data by repeating decoding and updating of the register value using a value obtained by decoding processing;
When the ciphertext is input, one or two or more cipher values at the predetermined position of the ciphertext are selected as a dummy cipher, and the dummy cipher is input to the decryption means as encrypted data. A dummy cipher selection means for discarding the decrypted data;
When the register value of the decryption unit is updated by decryption of the dummy cipher, the ciphertext is then input to the decryption unit as encrypted data, and the obtained decrypted data is output as the plaintext. ,
The cryptographic processing program according to
(付記7) 連鎖機能を有する暗号利用モードを用いて暗号処理を行う暗号処理方法において、
平文が入力されると、前記平文の所定位置にある1または2以上の文字をダミー文字として選択し、
前記ダミー文字を、所定の前記暗号利用モードに従い、レジスタ値として予め設定された初期ベクタを用いて暗号化し、暗号化処理で得られる値を用いて前記レジスタ値を更新すると共に、前記ダミー文字に対応する暗号化データを破棄し、
前記ダミー文字の暗号化によって前記レジスタ値が更新された後、前記暗号利用モードに従い、前記レジスタ値を用いた文字の暗号化と暗号化処理で得られる値を用いた前記レジスタ値の更新とを繰り返すことで、暗号化単位間に依存関係がある暗号化データを生成し暗号文として出力する、
ことを特徴とする暗号処理方法。
(Supplementary Note 7) In a cryptographic processing method for performing cryptographic processing using a cryptographic usage mode having a chain function,
When plaintext is input, one or more characters at a predetermined position of the plaintext are selected as dummy characters,
The dummy character is encrypted using an initial vector preset as a register value in accordance with the predetermined encryption usage mode, the register value is updated using a value obtained by an encryption process, and the dummy character is Discard the corresponding encrypted data,
After the register value is updated by encryption of the dummy character, according to the encryption usage mode, the encryption of the character using the register value and the update of the register value using the value obtained by the encryption process are performed. By repeating, generate encrypted data with dependency between encryption units and output as ciphertext,
And a cryptographic processing method.
(付記8) 連鎖機能を有する暗号利用モードを用いて暗号処理を行う暗号処理装置において、
レジスタ値として予め初期ベクタを有しており、暗号元データを取得すると、所定の前記暗号利用モードに従い、前記レジスタ値を用いた文字の暗号化と暗号化処理で得られる値を用いた前記レジスタ値の更新とを繰り返すことで、暗号化単位間に依存関係がある暗号化データを生成する暗号化手段と、
平文が入力されると、前記平文の所定位置にある1または2以上の文字をダミー文字として選択し、前記ダミー文字を暗号元データとして前記暗号化手段に入力し、得られた暗号化データを破棄するダミー文字選択手段と、
前記ダミー文字の暗号化によって前記暗号化手段の前記レジスタ値が更新されると、その後、前記平文を暗号元データとして前記暗号化手段に入力し、得られた暗号化データを暗号文として出力する暗号文出力手段と、
を有することを特徴とする暗号処理装置。
(Supplementary Note 8) In a cryptographic processing apparatus that performs cryptographic processing using a cryptographic usage mode having a chain function,
The register having an initial vector as a register value in advance, and obtaining the encryption source data, the register using the value obtained by character encryption and encryption processing using the register value according to the predetermined encryption usage mode Encryption means for generating encrypted data having a dependency relationship between encryption units by repeatedly updating the value;
When plaintext is input, one or more characters at a predetermined position in the plaintext are selected as dummy characters, the dummy characters are input as encryption source data to the encryption means, and the obtained encrypted data is A dummy character selection means to be discarded;
When the register value of the encryption unit is updated by encryption of the dummy character, the plaintext is then input to the encryption unit as encryption source data, and the obtained encrypted data is output as ciphertext Ciphertext output means;
A cryptographic processing device comprising:
1 暗号化装置
1a 暗号化手段
1b ダミー文字選択手段
1c 暗号文出力手段
1d 順序変換手段
2 復号装置
2a 復号手段
2b ダミー暗号選択手段
2c 平文出力手段
2d 順序再生手段
3,6 平文
4,5 暗号文
DESCRIPTION OF
Claims (5)
コンピュータを、
レジスタ値として予め初期ベクタを有しており、暗号元データを取得すると、所定の前記暗号利用モードに従い、前記レジスタ値を用いた文字の暗号化と暗号化処理で得られる値を用いた前記レジスタ値の更新とを繰り返すことで、暗号化単位間に依存関係がある暗号化データを生成する暗号化手段、
平文が入力されると、前記平文の所定位置にある1または2以上の文字をダミー文字として選択し、前記ダミー文字を暗号元データとして前記暗号化手段に入力し、得られた暗号化データを破棄するダミー文字選択手段、
前記ダミー文字の暗号化によって前記暗号化手段の前記レジスタ値が更新されると、その後、前記平文を暗号元データとして前記暗号化手段に入力し、得られた暗号化データを暗号文として出力する暗号文出力手段、
として機能させることを特徴とする暗号処理プログラム。 In a cryptographic processing program that performs cryptographic processing using a cryptographic usage mode having a chain function,
Computer
The register having an initial vector as a register value in advance, and obtaining the encryption source data, the register using the value obtained by character encryption and encryption processing using the register value according to the predetermined encryption usage mode Encryption means for generating encrypted data having a dependency relationship between encryption units by repeatedly updating the value;
When plaintext is input, one or more characters at a predetermined position in the plaintext are selected as dummy characters, the dummy characters are input as encryption source data to the encryption means, and the obtained encrypted data is Dummy character selection means to be discarded,
When the register value of the encryption unit is updated by encryption of the dummy character, the plaintext is then input to the encryption unit as encryption source data, and the obtained encrypted data is output as ciphertext Ciphertext output means,
A cryptographic processing program characterized by functioning as
前記平文が入力されると、前記平文を先頭と最後尾とが連続した循環文字列とみなし、前記循環文字列上の1文字を新たな先頭に指定し、指定した前記新たな先頭から始まる文字順序が変換された新たな平文を生成する順序変換手段、
として機能させ、
前記ダミー文字選択手段および前記暗号文出力手段は、前記新たな平文を前記平文とみなして暗号化処理を行う、
ことを特徴とする請求項1記載の暗号処理プログラム。 Said computer further
When the plaintext is input, the plaintext is regarded as a cyclic character string in which a head and a tail are continuous, one character on the cyclic character string is designated as a new head, and a character starting from the designated new head Order conversion means for generating a new plaintext in which the order has been converted,
Function as
The dummy character selection means and the ciphertext output means regard the new plaintext as the plaintext and perform an encryption process.
The cryptographic processing program according to claim 1.
第1の文字コード体系の文字コードと第2の文字コード体系の文字コードとの一対一の対応関係を記憶した文字コード情報記憶手段、
前記第1の文字コード体系で符号化された前記平文が入力されると、前記文字コード情報記憶手段を参照し、前記平文を前記第2の文字コード体系に変換する文字コード変換手段、
前記第2の文字コード体系で符号化された前記暗号文が生成されると、前記文字コード情報記憶手段を参照し、前記暗号文を前記第1の文字コード体系に変換する文字コード逆変換手段、
として機能させ、
前記暗号化手段は、前記第2の文字コード体系の文字コードから成る暗号元データを、前記第2の文字コード体系の文字コードから成る暗号化データに暗号化する、
ことを特徴とする請求項1記載の暗号処理プログラム。 Said computer further
Character code information storage means for storing a one-to-one correspondence between a character code of the first character code system and a character code of the second character code system;
A character code conversion means for referring to the character code information storage means and converting the plain text to the second character code system when the plain text encoded in the first character code system is input;
When the ciphertext encoded with the second character code system is generated, the character code reverse conversion unit converts the ciphertext into the first character code system with reference to the character code information storage unit ,
Function as
The encryption means encrypts encryption source data composed of character codes of the second character code system into encrypted data composed of character codes of the second character code system;
The cryptographic processing program according to claim 1.
前記レジスタ値として予め前記暗号化手段と同一の前記初期ベクタを有しており、暗号化データを取得すると、前記暗号化手段と同一の前記暗号利用モードに従い、前記レジスタ値を用いた暗号値の復号と復号処理で得られる値を用いた前記レジスタ値の更新とを繰り返すことで、復号データを生成する復号手段、
前記暗号文が入力されると、前記暗号文の前記所定位置にある1または2以上の暗号値をダミー暗号として選択し、前記ダミー暗号を暗号化データとして前記復号手段に入力し、得られた復号データを破棄するダミー暗号選択手段、
前記ダミー暗号の復号によって前記復号手段の前記レジスタ値が更新されると、その後、前記暗号文を暗号化データとして前記復号手段に入力し、得られた復号データを前記平文として出力する平文出力手段、
として機能させることを特徴とする請求項1記載の暗号処理プログラム。 Said computer further
The register value has the same initial vector as that of the encryption unit in advance, and when the encrypted data is acquired, according to the encryption usage mode same as that of the encryption unit, Decoding means for generating decoded data by repeating decoding and updating of the register value using a value obtained by decoding processing;
When the ciphertext is input, one or two or more cipher values at the predetermined position of the ciphertext are selected as a dummy cipher, and the dummy cipher is input to the decryption means as encrypted data. A dummy cipher selection means for discarding the decrypted data;
When the register value of the decryption unit is updated by decryption of the dummy cipher, the ciphertext is then input to the decryption unit as encrypted data, and the obtained decrypted data is output as the plaintext. ,
The cryptographic processing program according to claim 1, wherein the cryptographic processing program is made to function as:
平文が入力されると、前記平文の所定位置にある1または2以上の文字をダミー文字として選択し、
前記ダミー文字を、所定の前記暗号利用モードに従い、レジスタ値として予め設定された初期ベクタを用いて暗号化し、暗号化処理で得られる値を用いて前記レジスタ値を更新すると共に、前記ダミー文字に対応する暗号化データを破棄し、
前記ダミー文字の暗号化によって前記レジスタ値が更新された後、前記暗号利用モードに従い、前記レジスタ値を用いた文字の暗号化と暗号化処理で得られる値を用いた前記レジスタ値の更新とを繰り返すことで、暗号化単位間に依存関係がある暗号化データを生成し暗号文として出力する、
ことを特徴とする暗号処理方法。 In a cryptographic processing method for performing cryptographic processing using a cryptographic usage mode having a chain function,
When plaintext is input, one or more characters at a predetermined position of the plaintext are selected as dummy characters,
The dummy character is encrypted using an initial vector preset as a register value in accordance with the predetermined encryption usage mode, the register value is updated using a value obtained by an encryption process, and the dummy character is Discard the corresponding encrypted data,
After the register value is updated by encryption of the dummy character, according to the encryption usage mode, the encryption of the character using the register value and the update of the register value using the value obtained by the encryption process are performed. By repeating, generate encrypted data with dependency between encryption units and output as ciphertext,
And a cryptographic processing method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006210116A JP5060079B2 (en) | 2006-08-01 | 2006-08-01 | Cryptographic processing program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006210116A JP5060079B2 (en) | 2006-08-01 | 2006-08-01 | Cryptographic processing program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2008039844A true JP2008039844A (en) | 2008-02-21 |
| JP5060079B2 JP5060079B2 (en) | 2012-10-31 |
Family
ID=39174971
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006210116A Expired - Fee Related JP5060079B2 (en) | 2006-08-01 | 2006-08-01 | Cryptographic processing program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5060079B2 (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008152059A (en) * | 2006-12-19 | 2008-07-03 | Fujitsu Broad Solution & Consulting Inc | Cryptographic processing program, cryptographic processing method, and cryptographic processing apparatus |
| JP2011130408A (en) * | 2009-12-15 | 2011-06-30 | Korea Electronics Telecommun | Efficient scrambling or descrambling method, and system |
| JP2011529219A (en) * | 2008-07-24 | 2011-12-01 | アリババ・グループ・ホールディング・リミテッド | System and method for preventing web crawler access |
| JP2013011702A (en) * | 2011-06-28 | 2013-01-17 | Dainippon Printing Co Ltd | Encryption method, encryption program, encryption device, decryption method, decryption program, and decryption device |
| US8397122B2 (en) | 2008-03-19 | 2013-03-12 | Electronics And Telecommunications Research Institute | Method and apparatus for unequal error protection of video signal over wideband high frequency wireless system |
| JP2013205800A (en) * | 2012-03-29 | 2013-10-07 | Internatl Business Mach Corp <Ibm> | Device and method for encrypting data |
| CN114285665A (en) * | 2021-12-30 | 2022-04-05 | 北京天融信网络安全技术有限公司 | Method and device for converting password encryption mode |
| CN119788366A (en) * | 2024-12-23 | 2025-04-08 | 南方电网数字电网科技(广东)有限公司 | Encryption and decryption transmission method, equipment, medium and program product for data |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0728405A (en) * | 1993-07-14 | 1995-01-31 | Nec Corp | Ciphering preprocessor and deciphering postprocessor for cipher chain |
| JPH10173646A (en) * | 1996-12-13 | 1998-06-26 | Mitsubishi Electric Corp | Encryption assisting method, decryption assisting method, and apparatus using those methods |
| JP2001142396A (en) * | 1999-11-16 | 2001-05-25 | Dainippon Printing Co Ltd | Encryption device and method, encryption / decryption device and method, and communication system |
| JP2004325677A (en) * | 2003-04-23 | 2004-11-18 | Sony Corp | Cryptographic processing device, cryptographic processing method, and computer program |
| JP2005141282A (en) * | 2003-11-04 | 2005-06-02 | Fujitsu Ltd | Character data encryption program |
-
2006
- 2006-08-01 JP JP2006210116A patent/JP5060079B2/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0728405A (en) * | 1993-07-14 | 1995-01-31 | Nec Corp | Ciphering preprocessor and deciphering postprocessor for cipher chain |
| JPH10173646A (en) * | 1996-12-13 | 1998-06-26 | Mitsubishi Electric Corp | Encryption assisting method, decryption assisting method, and apparatus using those methods |
| JP2001142396A (en) * | 1999-11-16 | 2001-05-25 | Dainippon Printing Co Ltd | Encryption device and method, encryption / decryption device and method, and communication system |
| JP2004325677A (en) * | 2003-04-23 | 2004-11-18 | Sony Corp | Cryptographic processing device, cryptographic processing method, and computer program |
| JP2005141282A (en) * | 2003-11-04 | 2005-06-02 | Fujitsu Ltd | Character data encryption program |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008152059A (en) * | 2006-12-19 | 2008-07-03 | Fujitsu Broad Solution & Consulting Inc | Cryptographic processing program, cryptographic processing method, and cryptographic processing apparatus |
| US8397122B2 (en) | 2008-03-19 | 2013-03-12 | Electronics And Telecommunications Research Institute | Method and apparatus for unequal error protection of video signal over wideband high frequency wireless system |
| JP2011529219A (en) * | 2008-07-24 | 2011-12-01 | アリババ・グループ・ホールディング・リミテッド | System and method for preventing web crawler access |
| US8762705B2 (en) | 2008-07-24 | 2014-06-24 | Alibaba Group Holding Limited | System and method for preventing web crawler access |
| JP2014211897A (en) * | 2008-07-24 | 2014-11-13 | アリババ・グループ・ホールディング・リミテッドAlibaba Group Holding Limited | System and method for preventing web crawler access |
| JP2011130408A (en) * | 2009-12-15 | 2011-06-30 | Korea Electronics Telecommun | Efficient scrambling or descrambling method, and system |
| JP2013011702A (en) * | 2011-06-28 | 2013-01-17 | Dainippon Printing Co Ltd | Encryption method, encryption program, encryption device, decryption method, decryption program, and decryption device |
| JP2013205800A (en) * | 2012-03-29 | 2013-10-07 | Internatl Business Mach Corp <Ibm> | Device and method for encrypting data |
| US9143326B2 (en) | 2012-03-29 | 2015-09-22 | International Business Machines Corporation | Method and system for encrypting data |
| US9344274B2 (en) | 2012-03-29 | 2016-05-17 | International Business Machines Corporation | Method and system for encrypting data |
| CN114285665A (en) * | 2021-12-30 | 2022-04-05 | 北京天融信网络安全技术有限公司 | Method and device for converting password encryption mode |
| CN119788366A (en) * | 2024-12-23 | 2025-04-08 | 南方电网数字电网科技(广东)有限公司 | Encryption and decryption transmission method, equipment, medium and program product for data |
Also Published As
| Publication number | Publication date |
|---|---|
| JP5060079B2 (en) | 2012-10-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5060119B2 (en) | Cryptographic processing program, cryptographic processing method, and cryptographic processing apparatus | |
| JP3229148B2 (en) | Encryption method and system | |
| Pavithran et al. | A novel cryptosystem based on DNA cryptography and randomly generated mealy machine | |
| CN100592681C (en) | Encryption method, encryption device, decryption method and decryption device | |
| JP5055993B2 (en) | Cryptographic processing apparatus, cryptographic processing method, and computer program | |
| JP4961909B2 (en) | Cryptographic processing apparatus, cryptographic processing method, and computer program | |
| RU2369024C2 (en) | System for protecting information content, device for generating key data and display device | |
| JP4989055B2 (en) | Character code encryption processing program and character code encryption processing method | |
| JP2005505069A (en) | Memory encryption | |
| JP4967544B2 (en) | Cryptographic processing apparatus, cryptographic processing method, and computer program | |
| JP4701166B2 (en) | Computer system and computer program for encryption or decryption | |
| CN107135062A (en) | A kind of encryption method of improved big file | |
| CN106936820B (en) | Data variable length modification method and application thereof in big data encryption | |
| JP2008058827A (en) | Cryptographic processing apparatus, cryptographic processing method, and computer program | |
| JP5060079B2 (en) | Cryptographic processing program | |
| JP2002185443A (en) | Private key management method | |
| Hagras et al. | Anti-attacks encryption algorithm based on DNA computing and data encryption standard | |
| US20230216659A1 (en) | Method for processing encrypted data | |
| JP2006311383A (en) | Data managing method, data management system and data managing device | |
| JP2006048158A (en) | Data storage method and data processing apparatus | |
| JP4612501B2 (en) | Block encryption device, block decryption device, method and program thereof | |
| JP4644053B2 (en) | Encryption apparatus and method, decryption apparatus and method | |
| WO2000064096A1 (en) | Encrypted communication system | |
| JP2006270343A (en) | Partial encryption apparatus and method, and program | |
| JP2008306690A (en) | Encryption device, decryption device, method executed by them, encryption-decryption system, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090728 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110928 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111004 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120508 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120709 |
|
| 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: 20120731 |
|
| 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: 20120803 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150810 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5060079 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |