JP2006237908A - Encryption and decryption method of file, and key information extract method and apparatus - Google Patents

Encryption and decryption method of file, and key information extract method and apparatus Download PDF

Info

Publication number
JP2006237908A
JP2006237908A JP2005048126A JP2005048126A JP2006237908A JP 2006237908 A JP2006237908 A JP 2006237908A JP 2005048126 A JP2005048126 A JP 2005048126A JP 2005048126 A JP2005048126 A JP 2005048126A JP 2006237908 A JP2006237908 A JP 2006237908A
Authority
JP
Japan
Prior art keywords
key
file
information
encrypted
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.)
Granted
Application number
JP2005048126A
Other languages
Japanese (ja)
Other versions
JP4684680B2 (en
Inventor
Hideaki Saishiyo
秀明 才所
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.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
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 Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP2005048126A priority Critical patent/JP4684680B2/en
Publication of JP2006237908A publication Critical patent/JP2006237908A/en
Application granted granted Critical
Publication of JP4684680B2 publication Critical patent/JP4684680B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an encryption and decryption technology of a log file which can simply and securely cope with storage, movement and data browsing of the log file at a low cost and can place a limit on a range of a browseable log by a browsing person. <P>SOLUTION: The technology is an encryption method of a plurality of files, attaches a shared key encrypted by a public key to a log file encrypted by a shared key, and attaches part of elements for extracting a shared key group for log files connected backward and forward to the log file and encrypted by a shared key, and an element required for extracting the shared key group of the log files connected backward and forward to the log file encrypted by the public key together with the element above to the log file. In the case of providing a single log file, the log file shared key is provided from the single log file by using the private key. In the case of providing a file consecutive to the log file, part of elements encrypted by the public key for the log files consecutive forward and backward is provided together with the shared key of the log file. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、ログファイルなどの機密を保護するための暗号化及び復号化の技術に関する。   The present invention relates to an encryption and decryption technique for protecting secrets such as log files.

システムの利用状況の記録を取るログデータは、ある期間や大きさに区切って複数のファイルとして保管される。従来、ログデータは平文で保管されることが多く、DVDやテープ媒体にもそのままコピーされることが多かった。しかし、ログの重要性が高まり、単に保管するだけではなく、監査の対象となったり、証拠として提出する場面も出てきている。また、保管に関しても、別の物理的に安全な場所に保管することも考えられる。このため、ログデータの入った媒体の移動が伴うこととなり、紛失による漏洩の危険性から、ログファイルの暗号化が必要とされている。   Log data that records the usage status of the system is stored as a plurality of files separated by a certain period or size. Conventionally, log data is often stored in plain text and often copied to a DVD or tape medium as it is. However, the importance of logs has increased, and there are occasions where they are subject to audits or submitted as evidence, rather than simply being stored. As for storage, it may be stored in another physically safe place. For this reason, the medium containing the log data is moved, and encryption of the log file is required from the risk of leakage due to loss.

またログデータの利用方法が増え、閲覧者に応じて閲覧可能なログファイルを異ならせたい場合もある。例えば、全てのログファイルを閲覧可能なログファイル管理者や、ある期間の連続した複数のログファイル群を監査する監査者、証拠として一部の連続したログファイルを提出された相手などである。また、ログファイルの性質上、連続したログファイルを正順もしくは逆順に閲覧することが多く、ある一定数以上の連続したログファイルが閲覧可能な者は、全てのログファイルが閲覧可能である場合が多いという特徴もある。   In addition, there are cases where log data usage methods increase, and log files that can be browsed differ depending on the viewer. For example, a log file manager who can view all log files, an auditor who audits a plurality of log file groups in a certain period, and a partner who has submitted some continuous log files as evidence. Also, due to the nature of log files, it is often the case that consecutive log files are viewed in normal or reverse order, and those who can view a certain number of continuous log files can view all log files. There is also a feature that there are many.

以上の点を考慮し、閲覧者によって閲覧可能なログの範囲が決められるようにログファイルを暗号化する必要がある。   Considering the above points, it is necessary to encrypt the log file so that the range of logs that can be viewed by the viewer is determined.

ログデータの暗号方法については、既存の暗号方法を利用したいくつかの方法が考えられる。一つ目は、単純に同じ鍵で全てのログファイルを暗号化して保管し、閲覧者に渡す際には、復号化して閲覧者用に再暗号化する方法である。二つ目は、ログデータとログファイルを画像と画像の一部と読みかえれば、下記特許文献1のように別々の鍵を用いて暗号化して保管し、閲覧者によって渡す鍵群を変える方法もある。さらに、三つ目として、鍵の保管と回復の問題を解決するために、下記特許文献2のように、共通鍵でファイルを暗号化するとともに、公開鍵で前記共通鍵を暗号化して前記暗号化したファイルと一緒にする方法もある。
特開平3-40689号 特開平7-56507号
Regarding the encryption method of log data, several methods using an existing encryption method can be considered. The first is a method in which all log files are simply encrypted and stored with the same key, and decrypted and re-encrypted for the viewer when handed over to the viewer. Second, if the log data and the log file are read as an image and a part of the image, they are encrypted and stored using different keys as in Patent Document 1 below, and the key group passed by the viewer is changed. There is also. Third, in order to solve the problem of key storage and recovery, a file is encrypted with a common key and the common key is encrypted with a public key as described in Patent Document 2 below. There is also a way to make it together with the digitized file.
JP 3-40689 JP-A-7-56507

しかしながら、従来の方式では様々な問題がある。一つ目のように閲覧者に渡す際に復号化及び暗号化する方法は、コストが高く、渡すファイルの量に比例してコストが増大する。また、二つ目の個々に別々の共通鍵を用い、相手によって渡す鍵を変える方式では、鍵と暗号文の対応関係を安全に保存しておく必要があり、また、渡すファイル量が多くなると渡す鍵も多くなって煩雑である。最後に、三つ目の方法のように公開鍵で暗号化した共通鍵を個々のファイルと一緒に保管する方法は、鍵管理の煩雑さはなくなるものの、秘密鍵を渡してしまうと全てのファイルが閲覧可能になってしまうため、秘密鍵を渡すことはできないし、秘密鍵を渡すことができない以上、暗号化されたファイルと共にそのファイル数分の共通鍵を一緒に渡す必要が出てくる。そうなると、渡す鍵も多くなって煩雑である。   However, the conventional method has various problems. The first method of decrypting and encrypting when handing over to a viewer is high in cost, and the cost increases in proportion to the amount of files to be passed. Also, in the second method, using a separate common key for each, and changing the key passed by the other party, it is necessary to securely store the correspondence between the key and ciphertext, and when the amount of files to be passed increases The number of keys to be handed out is cumbersome. Finally, as with the third method, the method of storing a common key encrypted with a public key together with individual files eliminates the complexity of key management, but if you pass a secret key to all files Since it becomes possible to browse the private key, it is impossible to pass the secret key, and as long as the private key cannot be passed, it is necessary to pass the same number of common keys together with the encrypted file. If so, it will be cumbersome with more keys to pass.

このように、従来の方式では、ログファイルの保管や移動及び全データの閲覧については対処できる。しかし、ログデータの提出や監査においては連続した複数のファイルを渡すことが想定されるが、このような場合には対処が困難または煩雑である。   Thus, the conventional method can deal with storage and movement of log files and browsing of all data. However, in log data submission and auditing, it is assumed that a plurality of continuous files are passed. In such a case, handling is difficult or complicated.

本発明の目的は、簡単かつ低コストで安全にログファイルの保管や移動及びデータ閲覧に対処できるとともに、閲覧者によって閲覧可能なログの範囲を制限できるようにするログファイルの暗号・復号化技術を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is a log file encryption / decryption technique that can deal with storage, movement, and data browsing of a log file safely and easily at low cost, and can limit the range of logs that can be browsed by a viewer. Is to provide.

上記の課題を解決するために、本発明では、共通鍵で暗号化したファイルに公開鍵で暗号化した共通鍵を添付するとともに、前後に連なるファイルの共通鍵群を抽出するための一部要素を共通鍵で暗号化したものと、前後に連なるファイルの共通鍵群を先の要素とあわせて完全に抽出するための要素を公開鍵で暗号化したものを添付する。そして、単独のファイルを提出する場合には、単独のファイルから秘密鍵を用いてそのファイル共通鍵を渡す。あるファイルから連続したファイルを渡す場合には、そのファイルの共通鍵と共に、前後に連なるファイルの共通鍵群を先の要素とあわせて完全に抽出するための要素の一部を渡すこととする。   In order to solve the above problems, in the present invention, a common key encrypted with a public key is attached to a file encrypted with a common key, and a partial element for extracting a common key group of consecutive files Attached are the ones encrypted with the common key and the ones encrypted with the public key for extracting the common key group of the consecutive files in combination with the previous element. When a single file is submitted, the file common key is passed from the single file using a secret key. When passing a continuous file from a certain file, a part of the element for completely extracting the common key group of the preceding and following files together with the previous element is passed along with the common key of the file.

本発明によれば、復号・再暗号の手間を掛けずに、秘密鍵を渡すことなく、かつ、多数の共通鍵群とファイルの対応関係を用意して渡すことなく、連続したログファイルを復号が可能な情報を渡すことが可能であり、また暗号化によって安全にログファイルを保管することができる。   According to the present invention, it is possible to decrypt a continuous log file without passing a secret key without taking the trouble of decryption and re-encryption, and without preparing and passing correspondence relationships between a large number of common key groups and files. It is possible to pass information that can be stored, and log files can be securely stored by encryption.

以下、本発明を実施する場合の一形態を図面を参照して具体的に説明する。   Hereinafter, an embodiment for carrying out the present invention will be specifically described with reference to the drawings.

図1に、本発明を適用した実施形態のシステムの全体構成を示す。本システムは、ログファイル暗号端末110、復号鍵生成端末120、及びログファイル復号端末130の三つの端末を備える。ログファイル暗号端末110には、ログファイル暗号プログラム111と公開鍵PK112が配置される。このログファイル暗号端末110での主な処理は、与えられる平文のログファイルの暗号化と、公開鍵PK112を用いた鍵情報の暗号化を行うことである。復号鍵生成端末120には、復号鍵生成プログラム121と公開鍵PK112に対応する秘密鍵SK122が配置される。復号鍵生成端末120の主な処理は、暗号化された1つのログファイルとその前後の復号化したい範囲が与えられると、その暗号化されたログファイルの鍵と、復号化したい範囲のファイル復号に必要な鍵情報を出力することである。ログファイル復号端末130にはログファイル復号プログラム131が配置される。この端末の主な処理は、暗号化されたログファイル群、復号鍵生成端末120の出力、及び鍵に対応するファイル識別子が与えられると、まずファイル識別子で指定したログファイルを復号化することと、復号鍵生成端末120で指定した範囲のログファイルを端末利用者の要求に従って復号化することである。   FIG. 1 shows the overall configuration of a system according to an embodiment to which the present invention is applied. This system includes three terminals: a log file encryption terminal 110, a decryption key generation terminal 120, and a log file decryption terminal 130. In the log file encryption terminal 110, a log file encryption program 111 and a public key PK112 are arranged. The main processing in the log file encryption terminal 110 is to encrypt a given plain text log file and encrypt key information using the public key PK112. In the decryption key generation terminal 120, a decryption key generation program 121 and a secret key SK122 corresponding to the public key PK112 are arranged. The main process of the decryption key generation terminal 120 is that when one encrypted log file and a range to be decrypted before and after the encrypted log file are given, the key of the encrypted log file and the file decryption within the range to be decrypted The key information necessary for this is output. A log file decoding program 131 is arranged in the log file decoding terminal 130. The main processing of this terminal is to decrypt the log file specified by the file identifier when given the encrypted log file group, the output of the decryption key generation terminal 120, and the file identifier corresponding to the key. In other words, the log file in the range specified by the decryption key generation terminal 120 is decrypted according to the request of the terminal user.

本システムは、例えば以下のように使用される。まず、暗号化の担当者は、順次発生する平文のログファイルをログファイル暗号端末110を用いて暗号化する。暗号化したログファイルの詳しい構成は図2で説明するが、当該ファイルだけでは復号化できないので、暗号化したログファイルは安全に保管できる。所定の参照者にログファイルを参照させる場合、暗号化されたログファイルの管理者は、復号鍵生成端末120を用いて、その参照者に渡す鍵要素情報ファイルを生成して渡す。具体的には、復号鍵生成端末120で、参照者に参照させる1つのログファイルを指定するとともに、そのログファイルの幾つ前から幾つ後のログファイルを参照させるかの範囲を指定すると、鍵要素情報ファイルが生成出力されるので、その鍵要素情報ファイルと参照させる暗号化されているログファイルを参照者に渡す。参照者は、ログファイル復号端末130において、渡された鍵要素情報ファイルの情報を用いてログファイルを復号化し、その内容を参照する。   This system is used as follows, for example. First, the person in charge of encryption encrypts sequentially generated plain text log files using the log file encryption terminal 110. The detailed structure of the encrypted log file will be described with reference to FIG. 2. However, since the encrypted file cannot be decrypted alone, the encrypted log file can be safely stored. When making a predetermined reference refer to a log file, the administrator of the encrypted log file uses the decryption key generation terminal 120 to generate and pass a key element information file to be passed to the reference. Specifically, when the decryption key generation terminal 120 designates one log file to be referred to by the referrer and designates the range of how many log files from before and after that log file are designated, the key element Since the information file is generated and output, the encrypted log file to be referred to as the key element information file is passed to the reference person. In the log file decryption terminal 130, the referrer decrypts the log file using the passed key element information file information, and refers to the contents.

次に、本実施形態の詳細な構成や動作を説明する前に、ログファイルを実際に暗号復号する際の共通鍵に関する説明を行う。本実施形態のシステムでは、鍵差分要素αと鍵要素βの二種類の要素が存在する。これらの要素は共通鍵を算出するためのデータである。鍵差分要素αは、暗号化するログファイルごとに2m個ずつ存在する。鍵要素βは、暗号化するログファイルごとに2m-1個ずつ存在する。以下では、ログファイルn(n番目のログファイル)を暗号及び復号するための共通鍵を生成することができる鍵差分要素のx番目をαn,xと表現し、鍵要素のx番目をβn,xと表現する。αとβはxが0以上2m以下のとき有意であり、この範囲を超える場合のαとβは0として計算する。同様に、nが自然数のときαとβが有意であり、それを外れるときαとβは0として計算する。図2で説明するが、1つのログファイルに対応して2m-1個存在する鍵要素βの中で、βn,mが、ログファイルnを暗号及び復号するための共通鍵そのものである。 Next, before describing the detailed configuration and operation of the present embodiment, a description will be given of a common key used when actually decrypting a log file. In the system of the present embodiment, there are two types of elements, a key difference element α and a key element β. These elements are data for calculating a common key. There are 2m key difference elements α for each log file to be encrypted. There are 2m-1 key elements β for each log file to be encrypted. In the following, the x-th key difference element capable of generating a common key for encrypting and decrypting the log file n (the n-th log file) is expressed as α n, x and the x-th key element is β Expressed as n, x . α and β are significant when x is 0 or more and 2 m or less, and α and β when this range is exceeded are calculated as 0. Similarly, α and β are significant when n is a natural number, and α and β are calculated as 0 when they are outside of them. As will be described with reference to FIG. 2, among the 2m-1 key elements β corresponding to one log file, β n, m is a common key itself for encrypting and decrypting the log file n.

この鍵差分要素αと鍵要素βは、以下の式(1)及び(2)の関係を持つ。
βi,j+αi,j=βi,j+1 (0≦j≦2m-1) 式(1)
βi,0=βi,2m=0 式(2)
The key difference element α and the key element β have the following expressions (1) and (2).
β i, j + α i, j = β i, j + 1 (0 ≦ j ≦ 2m-1) Equation (1)
β i, 0 = β i, 2m = 0 Equation (2)

以上の性質から、ログファイルnの共通鍵となる鍵要素βn,mは、鍵差分要素αn,0…αn,m-1の総和や、鍵差分要素-αn,m+1…-αn,2mの総和、もしくは、その一部を鍵要素βで置き換えたもので算出可能となる。 Due to the above characteristics, the key element β n, m serving as the common key of the log file n is the sum of the key difference elements α n, 0 ... Α n, m−1 or the key difference element −α n, m + 1 . -α n, 2m can be calculated with the total sum or a part of it replaced with the key element β.

図2に、n番目のログファイルが暗号化された結果として出力される鍵情報付き暗号ログファイル200の構成を示す。鍵情報付き暗号ログファイル200は、n番目のログファイル211を共通鍵βn,mで暗号化した暗号済みログファイルデータ210と、図に示すような鍵差分要素αの集合である鍵差分要素情報221を共通鍵βn,mで暗号化した暗号済み鍵差分要素データ220と、図に示すような鍵要素βの集合である鍵要素情報231を公開鍵PKで暗号化した暗号済み鍵要素データ230の三つを結合したものである。 FIG. 2 shows a configuration of an encryption log file 200 with key information that is output as a result of encrypting the nth log file. The encryption log file with key information 200 is a key difference element that is a set of encrypted log file data 210 obtained by encrypting the nth log file 211 with the common key β n, m and a key difference element α as shown in the figure. Encrypted key difference element data 220 obtained by encrypting information 221 with a common key β n, m and encrypted key element obtained by encrypting key element information 231 that is a set of key elements β as shown in the figure with a public key PK Three of the data 230 are combined.

このn番目の暗号ファイル200に含まれる暗号済みログファイルデータ210は、以下の方法で復号化が可能である。
(1)共通鍵βn,mを知っていれば、その共通鍵βn,mで復号化することができる。
(2)共通鍵βn,mを知らなくても、秘密鍵SKを知っていれば、その秘密鍵SKで暗号済み鍵要素データ230を復号化し、得られた共通鍵βn,mで復号化することができる。
(3)このn番目の暗号ファイル200から共通鍵βn,mを直接求める代わりに、この暗号ファイルより前のm個、または、この暗号ファイルより後のm個の各暗号ファイルに含まれる暗号済み鍵差分要素データを復号し、αn,0…αn,m-1の総和または-αn,m…-αn,2m-1の総和を算出することにより共通鍵βn,mを求めることもできる。βn,mn,0n,1+…+αn,m-1=-αn,mn,m+1-…-αn,2m-1だからである。αn,0はこの暗号ファイルのm個後の暗号ファイルに含まれる鍵差分要素、αn,1はこの暗号ファイルのm-1個後の暗号ファイルに含まれる鍵差分要素、…、αn,m-1はこの暗号ファイルの1個後の暗号ファイルに含まれる鍵差分要素である。同様に、-αn,mはこの暗号ファイルの1個前の暗号ファイルに含まれる鍵差分要素、-αn,m+1はこの暗号ファイルの2個前の暗号ファイルに含まれる鍵差分要素、…、-αn,2m-1はこの暗号ファイルのm個前の暗号ファイルに含まれる鍵差分要素である。
(4)上記(3)の算出において、その一部分について、秘密鍵SKで暗号済み鍵要素データを復号化して得られた共通鍵βを利用することもできる。例えば、βn,mn,m-1n,m-1である。
The encrypted log file data 210 included in the nth encrypted file 200 can be decrypted by the following method.
(1) If the common key β n, m is known, the common key β n, m can be used for decryption.
(2) If the secret key SK is known without knowing the common key β n, m , the encrypted key element data 230 is decrypted with the secret key SK and decrypted with the obtained common key β n, m Can be
(3) Instead of directly obtaining the common key β n, m from the n-th encrypted file 200, the encryption included in the m encrypted files before the encrypted file or the m encrypted files after the encrypted file And the common key β n, m is calculated by calculating the sum of α n, 0 … α n, m-1 or the sum of -α n, m … -α n, 2m-1 You can ask for it. This is because β n, m = α n, 0 + α n, 1 + ... + α n, m-1 = -α n, mn, m + 1 -...- α n, 2m-1 . α n, 0 is a key difference element included in the m-th encryption file after this encryption file, α n, 1 is a key difference element included in the m-1 encryption file after this encryption file ,. , m−1 is a key difference element included in the next encrypted file after this encrypted file. Similarly, -α n, m is a key difference element included in the previous encryption file of this encryption file, and -α n, m + 1 is a key difference element included in the encryption file two times before this encryption file. ,..., -Α n, 2m-1 are key difference elements included in the m-th preceding encryption file.
(4) In the calculation of (3) above, the common key β obtained by decrypting the encrypted key element data with the secret key SK can be used for a part of the calculation. For example, β n, m = β n, m-1 + α n, m-1 .

以上より、本実施形態のシステムでは、参照者にn番目のログファイルとそのp個前からそのq個後までのみを参照させたいとき(すなわち、n-p番目、n-p+1番目、…、n番目、n+1番目、…、n+q番目を参照させるということである)、それらの暗号ファイルと、βn-p,m-p,βn-p+1,m-p+1,…,βn,m,βn+1,m+1,…,βn+p,m+qを参照者に渡せばよいことになる(秘密鍵SKは参照者に渡さない)。この場合、参照者は、以下のような手順でログファイルの復号を行える。
(1-1)βn,mを保有するので、参照者は、n番目のログファイルを復号できる。
(1-2)さらに、βn-1,m-1を保有するので、参照者は、n番目の暗号ログファイル中のαn-1,m-1を用いてβn-1,m-1n-1,m-1n-1,mを求めることができ、これによりn-1番目のログファイルを復号できる。
(1-3)さらに、βn-2,m-2を保有するので、参照者は、n番目の暗号ログファイル中のαn-2,m-2を用いてβn-2,m-2n-2,m-2n-2,m-1を求めることができ、さらにn-1番目の暗号ログファイル中のαn-2,m-1を用いてβn-2,m-1n-2,m-1n-2,mを求めることができ、これによりn-2番目のログファイルを復号できる。
(1-4)以下同様にして、n番目から1つずつ戻りながらログファイルを復号していける。n-p番目のログファイルを復号した後は、n-p-1番目のログファイルを復号しようとしても、参照者はβn-p-1,m-p-1を保有していないのでn-p-1番目のログファイルを復号できない。
(1-5)ただし、p+q+1がm以上である場合、すなわち連続するm個以上のログファイルの復号を参照者に許す場合は、n-p番目の暗号ファイル中の鍵差分要素αn-p-1,m-1、n-p+1番目の暗号ファイル中の鍵差分要素αn-p-1,m-2、n-p+2番目の暗号ファイル中の鍵差分要素αn-p-1,m-3、…、n-p+m-1番目の暗号ファイル中の鍵差分要素αn-p-1,0をすべて取得することができ、αn-p-1,m-1n-p-1,m-2+…+αn-p-1,0n-p-1,mを求めることができるので、n-p-1番目のログファイルを復号できる。同様にして、さらにn-p-2番目、n-p-3番目と戻って、1番目までの全てのログファイルを復号できる。
As described above, in the system of the present embodiment, when the reference person wants to refer only to the n-th log file and its p-th to q-th (that is, np-th, n-p + 1th,. nth, n + 1th,..., n + qth), β np, mp , β n-p + 1, m-p + 1 ,. It is only necessary to pass n, m , β n + 1, m + 1 ,..., β n + p, m + q to the reference (the secret key SK is not passed to the reference). In this case, the referrer can decrypt the log file by the following procedure.
(1-1) Since β n, m is held, the referrer can decrypt the n-th log file.
(1-2) Furthermore, since carrying β n-1, m-1 , the reference person, beta n-1 by using the n-th α n-1, m-1 in encryption log file, m- 1 + α n−1, m−1 = β n−1, m can be obtained, and thus the (n−1) th log file can be decrypted.
(1-3) Furthermore, since carrying β n-2, m-2 , the reference person, using the n-th alpha n-2 in the cryptographic log file, m-2 β n-2 , m- 2 + α n-2, m-2 = β n-2, m-1 , and β n- using α n-2, m-1 in the (n-1) th encrypted log file 2, m-1 + α n-2, m-1 = β n-2, m can be obtained, whereby the (n-2) th log file can be decrypted.
(1-4) Similarly, the log file can be decrypted while returning one by one from the nth. After decrypting the npth log file, even if you try to decrypt the np-1th log file , the referrer does not have β np-1, mp-1 , so decrypt the np-1th log file Can not.
(1-5) However, if p + q + 1 is greater than or equal to m, that is, if the reference is allowed to decrypt m or more consecutive log files, the key difference element α np in the np-th encrypted file -1, m-1 , key difference element α np-1, m-2 in the n-p + 1st encryption file, key difference element α np-1, m in the n-p + 2th encryption file -3 , ..., n-p + m-1 can obtain all the key difference elements α np-1,0 in the n th encrypted file, α np-1, m-1 + α np-1, m Since −2 +... + Α np−1,0 = β np−1, m can be obtained, the np−1 log file can be decrypted. Similarly, all log files up to the first can be decrypted by returning to np-2 and np-3.

以上の(1-1)〜(1-5)は、n番目のログファイルから1つずつ戻りながら復号する手順を説明した。n番目のログファイルから1つずつ進みながら次のファイルを復号していくのも同様にして次の手順で可能である。
(2-1)βn,mを保有するので、参照者は、n番目のログファイルを復号できる。
(2-2)さらに、βn+1,m+1を保有するので、参照者は、n番目の暗号ログファイル中の-αn+1,mを用いてβn+1,m+1n+1,mn+1,mを求めることができ、これによりn+1番目のログファイルを復号できる。
(2-3)さらに、βn+2,m+2を保有するので、参照者は、n番目の暗号ログファイル中の-αn+2,m+1を用いてβn+2,m+2n+2,m+1n+2,m+1を求めることができ、さらにn+1番目の暗号ログファイル中のαn+2,mを用いてβn+2,m+1n+2,mn+2,mを求めることができ、これによりn+2番目のログファイルを復号できる。
(2-4)以下同様にして、n番目から1つずつ進みながらログファイルを復号していける。n+q番目のログファイルを復号した後は、n+q+1番目のログファイルを復号しようとしても、参照者はβn+q+1,m+q+1を保有していないのでn+q+1番目のログファイルを復号できない。
(2-5)ただし、p+q+1がm以上である場合、すなわち連続するm個以上のログファイルの復号を参照者に許す場合は、n+q番目の暗号ファイル中の鍵差分要素-αn+q+1,m、n+q-1番目の暗号ファイル中の鍵差分要素-αn+q+1,m+1、n+q-2番目の暗号ファイル中の鍵差分要素-αn+q+1,m+2、…、n+q-m+1番目の暗号ファイル中の鍵差分要素-αn+q+1,2m-1をすべて取得することができ、-αn+q+1,mn+q+1,m+1-…-αn+q+1,2m-1n+q+1,mを求めることができるので、n+q+1番目のログファイルを復号できる。同様にして、さらにn+q+2番目、n+q+3番目と進み、全てのログファイルを復号できる。
In the above (1-1) to (1-5), the procedure of decoding while returning one by one from the nth log file has been described. Similarly, it is possible to decrypt the next file while proceeding one by one from the nth log file by the following procedure.
(2-1) Since β n, m is held, the referrer can decrypt the nth log file.
(2-2) Furthermore, since carrying β n + 1, m + 1, the reference person, using a-.alpha. n + 1, m in the n-th cipher log file β n + 1, m + 1n + 1, m = β n + 1, m can be obtained, whereby the (n + 1) th log file can be decrypted.
(2-3) Furthermore, since β n + 2, m + 2 is held, the referrer uses β- n + 2, m + 1 in the n-th encrypted log file to obtain β n + 2, m +2n + 2, m + 1 = β n + 2, m + 1 and β n + 2 using α n + 2, m in the (n + 1) th encrypted log file , m + 1n + 2, m = β n + 2, m , thereby decoding the (n + 2) th log file.
(2-4) Similarly, the log file can be decrypted while proceeding one by one from the nth. After decrypting the n + qth log file, even if you try to decrypt the n + q + 1st log file, the referrer does not have β n + q + 1, m + q + 1 , so n Cannot decrypt + q + 1st log file.
(2-5) However, if p + q + 1 is greater than or equal to m, that is, if the reference is allowed to decrypt m or more consecutive log files, the key difference element in the n + q-th encrypted file -α n + q + 1, m , key difference element in n + q-1st cipher file -α n + q + 1, m + 1 , key difference element in n + q-2 th cipher file -α n + q + 1, m + 2 , ..., all the key difference elements -α n + q + 1,2m-1 in the n + q-m + 1-th encrypted file can be acquired,- α n + q + 1, mn + q + 1, m + 1- … -α n + q + 1,2m-1 = β n + q + 1, m q + 1 log file can be decrypted. In the same manner, the process proceeds further to n + q + 2 and n + q + 3, and all log files can be decrypted.

以上から分かるように、mは、連続する何個以上のログファイルの復号を許すならば全てのログファイルの復号を許すことにするかを示す閾値である。mの具体的な値は、予め決めておくものとする。   As can be seen from the above, m is a threshold value indicating how many or more consecutive log files are allowed to be decoded if decoding is allowed. A specific value of m is determined in advance.

図3に、ログファイル暗号プログラム111の構成を示す。なお、正確に言えば、ログファイル暗号プログラム111をログファイル暗号端末110で実行したときに実現される構成であるが、簡単にプログラムの構成と言うものとする。後述する図9、図11でも同様である。ログファイル暗号プログラム111は、内部に、ログファイル入力部301、乱数生成部302、前鍵要素情報保管部303、鍵要素情報保管部304、次鍵要素情報保管部305、鍵差分要素情報保管部306、ログファイル暗号処理部307、鍵要素情報暗号処理部308、鍵差分要素情報暗号処理部309、データ結合部310、及び鍵情報付き暗号ログファイル出力部311を持つ。   FIG. 3 shows the configuration of the log file encryption program 111. To be precise, the configuration is realized when the log file encryption program 111 is executed by the log file encryption terminal 110, but it is simply referred to as the configuration of the program. The same applies to FIGS. 9 and 11 described later. The log file encryption program 111 includes a log file input unit 301, a random number generation unit 302, a previous key element information storage unit 303, a key element information storage unit 304, a next key element information storage unit 305, and a key difference element information storage unit. 306, a log file encryption processing unit 307, a key element information encryption processing unit 308, a key difference element information encryption processing unit 309, a data combination unit 310, and an encryption log file output unit 311 with key information.

ログファイル入力部301は、暗号化処理を行いたいログファイルを入力する処理を行う。乱数生成部302は、鍵要素情報に用いる乱数を生成する。   The log file input unit 301 performs a process of inputting a log file to be encrypted. The random number generation unit 302 generates a random number used for key element information.

前鍵要素情報保管部303は、n個目のログファイルを暗号化する時点で、n-1個目のログファイルを暗号化する際に利用した共通鍵を含む鍵要素情報231を保管するものである。鍵要素情報保管部304は、n個目のログファイルを暗号化する時点で、n個目のログファイルを暗号化する際に利用する共通鍵を含む鍵要素情報231を保管するものである。次鍵要素情報保管部305は、n個目のログファイルを暗号化する時点で、n+1個目のログファイルを暗号化する際に利用する共通鍵を含む鍵要素情報231を保管するものである。鍵差分要素情報保管部306は、n個目のログファイルを暗号化する時点で、n個目のログファイルのための鍵差分要素情報221を保管するものである。   The previous key element information storage unit 303 stores the key element information 231 including the common key used when encrypting the n-1st log file at the time of encrypting the nth log file. It is. The key element information storage unit 304 stores key element information 231 including a common key used when encrypting the nth log file at the time of encrypting the nth log file. The next key element information storage unit 305 stores key element information 231 including a common key used when encrypting the (n + 1) th log file at the time of encrypting the nth log file. It is. The key difference element information storage unit 306 stores the key difference element information 221 for the nth log file at the time of encrypting the nth log file.

ログファイル暗号処理部307は、鍵要素情報保管部304に含まれている共通鍵を用いてn個目のログファイルを暗号化し、暗号済みログファイルデータ210を生成するものである。鍵要素情報暗号処理部308は、秘密鍵PK112を用いて鍵要素情報保管部304に保管されている鍵要素情報を暗号化し、暗号済み鍵要素データ230を生成するものである。鍵差分要素情報暗号処理部309は、鍵差分要素情報保管部306に保管されている鍵差分要素情報を暗号化し、暗号済み鍵差分要素データ220を作成するものである。データ結合部310は、ログファイル暗号処理部307、鍵要素情報暗号処理部308、及び鍵差分要素情報暗号処理部309の出力データを1つのファイル(図2)に結合するものである。鍵情報付き暗号ログファイル出力部311は、データ結合部310が生成したファイルを出力するものである。   The log file encryption processing unit 307 encrypts the nth log file using the common key included in the key element information storage unit 304, and generates encrypted log file data 210. The key element information encryption processing unit 308 encrypts key element information stored in the key element information storage unit 304 using the secret key PK112, and generates encrypted key element data 230. The key difference element information encryption processing unit 309 encrypts the key difference element information stored in the key difference element information storage unit 306 and creates encrypted key difference element data 220. The data combining unit 310 combines the output data of the log file encryption processing unit 307, the key element information encryption processing unit 308, and the key difference element information encryption processing unit 309 into one file (FIG. 2). The encryption log file with key information output unit 311 outputs the file generated by the data combining unit 310.

図4は、ログファイル暗号プログラム111による処理の手順を示すフローチャートである。まず、ログファイル入力部301に、平文のログファイルが入力される(ステップ401)。この際、入力されたログファイルが最初のログファイルかどうかを共に入力することとする。次に、入力されたログファイルが最初のログファイルかどうかを判定する(ステップ402)。最初のログファイルならば(すなわちn=1個目)、乱数生成部302を用いて初期の鍵要素情報を生成し、鍵要素情報保管部304で保管し、さらに前鍵要素情報保管部303が保管する情報を0で埋める(ステップ403)。   FIG. 4 is a flowchart showing a processing procedure by the log file encryption program 111. First, a plain text log file is input to the log file input unit 301 (step 401). At this time, whether the input log file is the first log file is input together. Next, it is determined whether or not the input log file is the first log file (step 402). If it is the first log file (that is, n = 1), the initial key element information is generated using the random number generation unit 302, stored in the key element information storage unit 304, and the previous key element information storage unit 303 further The information to be stored is filled with 0 (step 403).

図5に、鍵要素情報保管部304が保管する情報の詳細を示す。鍵要素情報保管部304は、n個目のログファイルの暗号化に用いる鍵であるn個目ログファイル暗号用鍵501、n個目以降のログファイル暗号鍵要素群502、及びn個目以前のログファイル暗号鍵要素群503で構成される。上述のステップ403では、1個目のログファイルを暗号化する前であるので、ログファイル暗号用鍵501とログファイル暗号鍵要素群502の部分を、乱数生成部302で生成された乱数で埋め、それ以外は0で埋める。   FIG. 5 shows details of information stored by the key element information storage unit 304. The key element information storage unit 304 includes an n-th log file encryption key 501, which is a key used for encrypting the n-th log file, an n-th and subsequent log file encryption key element group 502, and the n-th and previous log files. Log file encryption key element group 503. In step 403 described above, since the first log file is not encrypted, the log file encryption key 501 and the log file encryption key element group 502 are filled with the random number generated by the random number generation unit 302. Otherwise, fill with 0.

図6に、前鍵要素情報保管部303が保管する情報の詳細を示す。前鍵要素情報保管部303は、n-1個目のログファイルの暗号化に用いる鍵であるn-1個目ログファイル暗号用鍵601、n-1個目以降のログファイル暗号鍵要素群602、及びn-1個目以前のログファイル暗号鍵要素群603で構成される。上述のステップ403では、1個目のログファイルを暗号化する前であり、対応する情報が無いので、初期設定として全ての値を0で埋める。ステップ403以外での前鍵要素情報保管部303が保管する情報については後で説明する。   FIG. 6 shows details of information stored by the previous key element information storage unit 303. The previous key element information storage unit 303 includes an (n-1) th log file encryption key 601 and a (n-1) th log file encryption key element group, which are keys used for encrypting the (n-1) th log file. 602 and the log file encryption key element group 603 before the (n-1) th. In step 403 described above, before the first log file is encrypted and there is no corresponding information, all values are filled with 0 as an initial setting. Information stored by the previous key element information storage unit 303 other than step 403 will be described later.

図4に戻って、ステップ403で初期の鍵要素を生成した後、もしくは、ステップ402で最初のログファイルでないと判定された際には、必ずn個目のログファイル暗号用鍵βn,m501が存在する。そこで、ログファイル暗号処理部307により、n個目のログファイル暗号用鍵βn,m501で、入力されたn個目のログファイルを暗号化し、暗号済みログファイルデータ210を生成する(ステップ404)。 Returning to FIG. 4, after the initial key element is generated in step 403 or when it is determined in step 402 that it is not the first log file, the nth log file encryption key β n, m 501 exists. Accordingly, the log file encryption processing unit 307 encrypts the input n-th log file with the n-th log file encryption key β n, m 501 to generate encrypted log file data 210 (step 404).

次に、乱数生成部302を用いて次鍵要素情報を生成し、次鍵要素情報保管部305で保管する(ステップ405)。   Next, next key element information is generated using the random number generation unit 302 and stored in the next key element information storage unit 305 (step 405).

図7に、次鍵要素情報保管部305が保管する情報の詳細を示す。次鍵要素情報保管部305は、n+1個目のログファイルの暗号化に用いる鍵であるn+1個目ログファイル暗号用鍵701、n+1個目以降のログファイル暗号鍵要素群702、及びn+1個目以前のログファイル暗号鍵要素群703で構成される。次鍵要素情報保管部305の構成は、図5に示した鍵要素情報保管部304と同様のものだが、n+1個目のログファイル暗号用鍵が含まれるなど、次のログファイルの暗号時に使う鍵要素情報が保管される。   FIG. 7 shows details of information stored by the next key element information storage unit 305. The next key element information storage unit 305 includes an (n + 1) th log file encryption key 701, which is a key used for encrypting the (n + 1) th log file, and (n + 1) th and subsequent log file encryption key element groups. 702 and the log file encryption key element group 703 before the (n + 1) th. The configuration of the next key element information storage unit 305 is the same as that of the key element information storage unit 304 shown in FIG. 5, but includes the encryption of the next log file, such as including the (n + 1) th log file encryption key. Stores key element information for occasional use.

上述のステップ405では、次鍵要素情報保管部305内のβx,yにおいて、xが0以下になる部分は対応するログファイルが無い鍵要素なので0で埋めるものとし、それ以外のβには乱数を設定する。例えば、ステップ404で1個目のログファイルを暗号化した場合には、n+1個目のログファイル暗号用鍵701と、n+1個目以降のログファイル暗号鍵要素702と、n+1個目以前のログファイル暗号鍵要素群703中の鍵要素βn,m-1の部分とを、それぞれ乱数生成部302で生成された乱数で埋め、それ以外は0で埋める。 In step 405 described above, in β x, y in the next key element information storage unit 305, the part where x is 0 or less is a key element that does not have a corresponding log file, so it is padded with 0. Set a random number. For example, if the first log file is encrypted in step 404, the (n + 1) th log file encryption key 701, the (n + 1) th and subsequent log file encryption key elements 702, and n + The part of the key element β n, m−1 in the log file encryption key element group 703 before the first one is filled with the random number generated by the random number generation unit 302, and the others are filled with 0.

次に、前鍵要素情報保管部303、鍵要素情報保管部304、及び次鍵要素情報保管部305が保管する情報から、鍵差分要素情報221を生成し、鍵差分要素情報保管部306で保管する(ステップ406)。   Next, key difference element information 221 is generated from information stored in the previous key element information storage unit 303, key element information storage unit 304, and next key element information storage unit 305, and stored in the key difference element information storage unit 306. (Step 406).

図8に、鍵差分要素情報保管部306が保管する情報の詳細を示す。鍵差分要素αn-m,0801は、前鍵要素情報保管部303(図6)で保管される鍵要素βn-m,1そのものである。鍵差分要素-αn+m,2m-1802は、次鍵要素情報保管部305(図7)で保管される鍵要素βn+m,2m-1そのものである。鍵差分要素αn-m+1,1〜αn-1,m-1803は、図8に示すように、前鍵要素情報保管部303と鍵要素情報保管部304が保管する情報から差分を算出して生成する。鍵差分要素-αn+1,m〜-αn+m-1,2m-2804は、図8に示すように、次鍵要素情報保管部305と鍵要素情報保管部304が保管する情報から差分を算出して生成する。 FIG. 8 shows details of information stored by the key difference element information storage unit 306. The key difference element α nm, 0 801 is the key element β nm, 1 itself stored in the previous key element information storage unit 303 (FIG. 6). The key difference element −α n + m, 2m−1 802 is the key element β n + m, 2m−1 itself stored in the next key element information storage unit 305 (FIG. 7). As shown in FIG. 8, the key difference elements α n-m + 1,1 to α n-1, m-1 803 are different from the information stored in the previous key element information storage unit 303 and the key element information storage unit 304. Is calculated and generated. The key difference elements -α n + 1, m to -α n + m-1,2m-2 804 are information stored by the next key element information storage unit 305 and the key element information storage unit 304 as shown in FIG. The difference is calculated and generated.

ステップ406で鍵差分要素情報221を生成し、鍵差分要素情報保管部306に保管した後、鍵要素情報保管部304が保管する情報を鍵要素情報231として、公開鍵PK112を用いて暗号化し、暗号済み鍵要素データ230を生成する(ステップ407)。次に、鍵差分要素情報保管部306が保管する鍵差分要素情報221を、鍵要素情報保管部304が保管するn個目のログファイル暗号用鍵501で暗号化し、暗号済み鍵差分要素データ220を生成する(ステップ408)。   After the key difference element information 221 is generated in step 406 and stored in the key difference element information storage unit 306, the information stored in the key element information storage unit 304 is encrypted as the key element information 231 using the public key PK112, Encrypted key element data 230 is generated (step 407). Next, the key difference element information 221 stored in the key difference element information storage unit 306 is encrypted with the nth log file encryption key 501 stored in the key element information storage unit 304, and the encrypted key difference element data 220 is stored. Is generated (step 408).

次に、鍵要素情報保管部304が保管する情報を前鍵要素情報保管部303にコピーし、次鍵要素情報保管部305が保管する情報を鍵要素情報保管部304にコピーする(ステップ409)。これは、次のログファイルの入力に備えるものである。次に、ステップ404で生成した暗号済みログファイルデータ210、ステップ407で生成した暗号済み鍵要素データ230、及びステップ408で生成した暗号済み鍵差分要素データ220を結合して、暗号ファイル200を生成する(ステップ410)。最後に、ステップ410で生成したファイルを出力する(ステップ411)。   Next, the information stored in the key element information storage unit 304 is copied to the previous key element information storage unit 303, and the information stored in the next key element information storage unit 305 is copied to the key element information storage unit 304 (step 409). . This prepares for the input of the next log file. Next, the encrypted log file data 210 generated in step 404, the encrypted key element data 230 generated in step 407, and the encrypted key difference element data 220 generated in step 408 are combined to generate an encrypted file 200. (Step 410). Finally, the file generated in step 410 is output (step 411).

以上で、図2に示した3つのデータが結合されたファイル200が生成される。   Thus, the file 200 in which the three data shown in FIG. 2 are combined is generated.

図9に、復号鍵生成プログラム121の構成を示す。復号鍵生成プログラム121は、内部に、暗号ログファイル・鍵範囲入力部901、暗号ログファイル分離部902、鍵要素情報復号処理部903、鍵要素情報保管部904、範囲外情報削除処理部905、鍵要素情報結合部906、及び鍵要素情報ファイル出力部907を持つ。   FIG. 9 shows the configuration of the decryption key generation program 121. The decryption key generation program 121 includes an encryption log file / key range input unit 901, an encryption log file separation unit 902, a key element information decryption processing unit 903, a key element information storage unit 904, an out-of-range information deletion processing unit 905, It has a key element information combining unit 906 and a key element information file output unit 907.

暗号ログファイル・鍵範囲入力部901は、復号鍵を生成したい1つの鍵情報付き暗号ログファイル200と、その前後に連続する復号したい鍵情報付き暗号ログファイルの範囲を入力するものである。暗号ログファイル分離部902は、入力された鍵情報付き暗号ログファイル200から、暗号済み鍵要素データ230を抽出するものである。鍵要素情報復号処理部903は、暗号済み鍵要素データ230を、秘密鍵SK122を用いて復号化し、鍵要素情報231を生成するものである。鍵要素情報保管部904は、鍵要素情報復号処理部903で生成した鍵要素情報231を保管するものである。範囲外情報削除処理部905は、暗号ログファイル・鍵範囲入力部901で入力された範囲に対して、鍵要素情報231の中で指定された範囲外の鍵要素を削除するものである。鍵要素情報結合部906は、範囲外情報削除処理部905で削除した結果得られた鍵要素情報231を鍵要素情報ファイルとして結合するものである。鍵要素情報ファイル出力部907は、鍵要素情報結合部906で生成した鍵要素情報ファイルを出力するものである。   The encryption log file / key range input unit 901 inputs one encryption log file with key information 200 for which a decryption key is to be generated and a range of encryption log files with key information that are to be continuously decrypted. The encryption log file separation unit 902 extracts the encrypted key element data 230 from the input encryption log file with key information 200. The key element information decryption processing unit 903 decrypts the encrypted key element data 230 using the secret key SK122, and generates key element information 231. The key element information storage unit 904 stores the key element information 231 generated by the key element information decryption processing unit 903. The out-of-range information deletion processing unit 905 deletes key elements outside the range specified in the key element information 231 with respect to the range input by the encryption log file / key range input unit 901. The key element information combining unit 906 combines the key element information 231 obtained as a result of deletion by the out-of-range information deletion processing unit 905 as a key element information file. The key element information file output unit 907 outputs the key element information file generated by the key element information combining unit 906.

図10は、復号鍵生成プログラム121による処理の手順を示すフローチャートである。まず、暗号ログファイル・鍵範囲入力部901により、復号鍵を生成したい1つの鍵情報付き暗号ログファイル200と、そのファイルの前後の連続して復号したい鍵情報付き暗号ログファイルの範囲を入力する(ステップ1001)。ここで、範囲は、入力した鍵情報付き暗号ログファイルを0として、古い方向をマイナス、新しい方向をプラスとし、例えば4個前から3個後のログファイルを連続して復号化したい場合は、(−4,3)という形式で入力するものとする。入力(x,y)において、xが0より大きいかyが0より小さい場合はエラーとして再度入力させる。   FIG. 10 is a flowchart showing a processing procedure by the decryption key generation program 121. First, the encryption log file / key range input unit 901 inputs one encryption log file 200 with key information for which a decryption key is to be generated and a range of encryption log files with key information to be decrypted continuously before and after that file. (Step 1001). Here, the range is 0 for the input encrypted log file with key information, minus the old direction, plus the new direction, for example, if you want to decrypt the log file three to four after the previous, It shall be entered in the format (-4, 3). If x is larger than 0 or y is smaller than 0 in input (x, y), it is input again as an error.

次に、ステップ1001で入力された範囲がm個以上のログファイルかどうかをチェックし、m個以上であればステップ1003に進み、m個未満ならステップ1004に進む(ステップ1002)。例えば、mが8以下で、範囲が(−4,3)の場合、8個の連続したログファイルの復号を許すということであるから、ステップ1003に進む。ステップ1002でm個以上の範囲が指定されたと判定されたら、全てのログファイルを復号化可能な鍵を出力して良いかを入力者に確認する(ステップ1003)。良くない場合には、ステップ1001で再度範囲を入力させる。そうでない場合は、ステップ1004に進む。図2で説明したように、m個以上の連続するログファイルを復号できる者はその範囲を超えて全てのログファイルを復号できるので、ステップ1003ではそのような権限を参照者に与えて良いかどうかを確認している。   Next, it is checked whether or not the range input in step 1001 is m or more log files, and if m or more, the process proceeds to step 1003, and if less than m, the process proceeds to step 1004 (step 1002). For example, if m is 8 or less and the range is (−4, 3), it means that decoding of 8 consecutive log files is allowed, and the process proceeds to step 1003. If it is determined in step 1002 that m or more ranges have been designated, it is confirmed with the input person whether a key that can decrypt all log files can be output (step 1003). If not, the range is input again at step 1001. Otherwise, go to step 1004. As described in FIG. 2, a person who can decrypt m or more consecutive log files can decrypt all log files beyond that range. I have confirmed.

次に、暗号ログファイル分離部902を用いて、入力された鍵情報付き暗号ログファイル200から、暗号済み鍵要素データ230を抽出する(ステップ1004)。次に、鍵要素情報復号処理部903で、秘密鍵SK122を用いて暗号済み鍵要素データ230を復号化し、鍵要素情報231を生成し、その鍵要素情報231を鍵要素情報保管部904で保管する(ステップ1005)。鍵要素情報保管部904の持つ情報の詳細は、図5で示したものと同じである。   Next, the encrypted key element data 230 is extracted from the input encryption log file with key information 200 using the encryption log file separation unit 902 (step 1004). Next, the key element information decryption processing unit 903 decrypts the encrypted key element data 230 using the secret key SK122, generates key element information 231 and stores the key element information 231 in the key element information storage unit 904. (Step 1005). Details of the information held by the key element information storage unit 904 are the same as those shown in FIG.

次に、範囲外情報削除処理部905で、鍵要素情報保管部904にある情報のうち、指定された範囲外の鍵要素を0にする(ステップ1006)。例えば、n個目のログファイルを0として(−4,3)と範囲指定されている場合は、鍵要素βn-4,n-4〜鍵要素βn+3,n+3以外の部分を0とする。次に、鍵要素情報結合部906で、鍵要素情報保管部904に保管されている情報を単純に結合して、鍵要素情報ファイルを生成する(ステップ1007)。最後に、ステップ1007で生成した鍵要素情報ファイルを、鍵要素情報ファイル出力部907で出力する(ステップ1008)。 Next, the out-of-range information deletion processing unit 905 sets the key element outside the specified range among the information in the key element information storage unit 904 to 0 (step 1006). For example, if the range is specified as (−4,3) with the nth log file set to 0, the part other than key element β n-4, n-4 to key element β n + 3, n + 3 Is 0. Next, the key element information combining unit 906 simply combines the information stored in the key element information storage unit 904 to generate a key element information file (step 1007). Finally, the key element information file generated in step 1007 is output by the key element information file output unit 907 (step 1008).

図11に、ログファイル復号プログラム131の概要構成を示す。ログファイル復号プログラム131は、大きく分けて、初期入力画面処理部1101、鍵関連情報保管部1102、ログファイル情報保管部1103、及び参照者操作画面処理部1104の四つで構成される。初期入力画面処理部1101は、鍵情報付き暗号ログファイル群と鍵要素情報ファイルなどを入力するなど、初期入力とその処理を行うものである。鍵関連情報保管部1102は、鍵要素情報や鍵差分情報などを管理するものである。ログファイル情報保管部1103は、与えられた鍵情報付き暗号ログファイル群の管理と、鍵関連情報保管部1102にある情報との対応関係を保持するものである。参照者操作画面処理部1104は、鍵関連情報保管部1102の情報を利用して鍵情報付き暗号ログファイルを復号化し、参照者に参照させると共に、鍵差分情報も復号化して、鍵関連情報保管部1102の情報を更新し、参照者の要求に応じて、前後の鍵情報付き暗号ログファイルも復号化し参照させるものである。   FIG. 11 shows a schematic configuration of the log file decoding program 131. The log file decryption program 131 is roughly divided into four parts: an initial input screen processing unit 1101, a key-related information storage unit 1102, a log file information storage unit 1103, and a reference user operation screen processing unit 1104. The initial input screen processing unit 1101 performs initial input and processing such as inputting an encryption log file group with key information and a key element information file. The key related information storage unit 1102 manages key element information, key difference information, and the like. The log file information storage unit 1103 holds the correspondence between the management of the given encrypted log file group with key information and the information in the key related information storage unit 1102. The reference user operation screen processing unit 1104 uses the information of the key related information storage unit 1102 to decrypt the encryption log file with the key information so that the reference is referred to, and also decrypts the key difference information to store the key related information. The information of the unit 1102 is updated, and the encrypted log files with key information before and after are decrypted and referred to in response to a request from the referrer.

図12に、鍵関連情報保管部1102の詳細を示す。鍵関連情報保管部1102は、鍵要素情報保管部1201、鍵差分要素情報保管部1202、前鍵要素情報保管部1203、及び次鍵要素情報保管部1204で構成される。これらが保管する情報の詳細は、図5〜図8を用いてログファイル暗号プログラム111の説明で行ったものと同じである。   FIG. 12 shows details of the key related information storage unit 1102. The key related information storage unit 1102 includes a key element information storage unit 1201, a key difference element information storage unit 1202, a previous key element information storage unit 1203, and a next key element information storage unit 1204. The details of the information stored in these are the same as those described in the description of the log file encryption program 111 with reference to FIGS.

図13に、ログファイル情報保管部1103が保管する情報の詳細を示す。ログファイル情報保管部1103には、鍵情報付き暗号ログファイル群のパスの順序付きリスト1301が保管される。また、nowポインタ1302、prevポインタ1303、及びnextポインタ1304が設けられている。nowポインタ1302は、鍵関連情報保管部1102の鍵要素情報保管部1201に保管されている鍵要素情報に対応する鍵情報付き暗号ログファイルへのパスを指すポインタである。prevポインタ1303は、nowポインタ1302の前のファイルへのパスを指すポインタである。nextポインタ1304は、nowポインタ1302の後のファイルへのパスを指すポインタである。   FIG. 13 shows details of information stored in the log file information storage unit 1103. The log file information storage unit 1103 stores an ordered list 1301 of paths of the encryption log file group with key information. Also, a now pointer 1302, a prev pointer 1303, and a next pointer 1304 are provided. The now pointer 1302 is a pointer that points to the path to the encryption log file with key information corresponding to the key element information stored in the key element information storage unit 1201 of the key related information storage unit 1102. The prev pointer 1303 is a pointer that points to the path to the file before the now pointer 1302. The next pointer 1304 is a pointer that points to the path to the file after the now pointer 1302.

図14に、初期入力画面処理部1101の詳細を示す。初期入力画面処理部1101は、内部に、鍵要素情報ファイル入力処理部1401、鍵情報付き暗号ログファイル群入力処理部1402、対応ログファイル指定入力処理部1403、ログファイル情報処理部1404、及び鍵要素情報ファイル分離部1405で構成される。鍵要素情報ファイル入力処理部1401は、復号鍵生成プログラム121で生成した鍵要素情報ファイルを入力処理するものである。鍵情報付き暗号ログファイル群入力処理部1402は、渡された鍵情報付き暗号ログファイルを順序に従って入力処理するものである。対応ログファイル指定入力処理部1403は、鍵情報付き暗号ログファイル群入力処理部1402で入力された鍵情報付き暗号ログファイルの中で、入力された鍵要素情報ファイルに対応する鍵情報付き暗号ログファイルを指定するものである。ログファイル情報処理部1404は、上記の入力部で入力された情報から、ログファイル情報保管部1103が管理する情報を設定するものである。鍵要素情報ファイル分離部1405は、鍵要素情報ファイル入力処理部1401で入力された鍵要素情報ファイルから、各鍵要素を分離し、鍵要素情報として鍵関連情報保管部1102に保管するものである。   FIG. 14 shows details of the initial input screen processing unit 1101. The initial input screen processing unit 1101 includes a key element information file input processing unit 1401, an encrypted log file group input processing unit with key information 1402, a corresponding log file designation input processing unit 1403, a log file information processing unit 1404, and a key. An element information file separation unit 1405 is configured. The key element information file input processing unit 1401 inputs the key element information file generated by the decryption key generation program 121. The encryption log file group with key information input processing unit 1402 inputs the encrypted log file with key information according to the order. Corresponding log file designation input processing unit 1403 is an encryption log with key information corresponding to the input key element information file among the encryption log files with key information input by encryption log file group input processing unit 1402 with key information. Specifies a file. The log file information processing unit 1404 sets information managed by the log file information storage unit 1103 from the information input by the input unit. The key element information file separation unit 1405 separates each key element from the key element information file input by the key element information file input processing unit 1401, and stores it as key element information in the key related information storage unit 1102. .

図15は、初期入力画面処理部1101の処理手順を示すフローチャートである。まず、図16に示す初期入力画面1600を出力する(ステップ1501)。初期入力画面1600は、鍵情報付き暗号ログファイル群を入力する領域1601、鍵要素情報ファイルを入力する領域1602、鍵情報付き暗号ログファイル群の中で前記鍵要素情報ファイルに対応する暗号ログファイルを入力する領域1603、及びOKボタン1604の4つで構成される。   FIG. 15 is a flowchart showing the processing procedure of the initial input screen processing unit 1101. First, the initial input screen 1600 shown in FIG. 16 is output (step 1501). The initial input screen 1600 includes an area 1601 for inputting an encryption log file group with key information, an area 1602 for inputting a key element information file, and an encryption log file corresponding to the key element information file in the encryption log file group with key information. Is composed of four areas: an area 1603 for inputting the “OK” and an OK button 1604.

参照者は、領域1601〜1603に入力し、OKボタン1604を押す(ステップ1502)。各領域1601〜1603への入力は、それぞれ、鍵情報付き暗号ログファイル群入力処理部1402、鍵要素情報ファイル入力処理部1401、及び対応ログファイル指定入力処理部1403により処理される。なお、図16は、図10のステップ1001で復号鍵を生成したい1つの鍵情報付き暗号ログファイルとしてLog20040705.logを指定し、それを0として、古い方へ4個、新しい方へ3個の範囲を指定して得られた鍵要素情報ファイルKey2004705を用いて復号する場合の入力例を示している。   The reference person inputs in the areas 1601 to 1603 and presses an OK button 1604 (step 1502). Input to each of the areas 1601 to 1603 is processed by an encryption log file group with key information input processing unit 1402, a key element information file input processing unit 1401, and a corresponding log file designation input processing unit 1403, respectively. In FIG. 16, Log20040705.log is designated as one encryption log file with key information for which a decryption key is to be generated in step 1001 of FIG. 10, and it is set to 0, the old one is four, and the new one is three. An input example in the case of decryption using a key element information file Key2004705 obtained by specifying a range is shown.

ステップ1502で参照者の入力が完了すると、初期入力画面処理部1101は、ログファイル情報処理部1402により、鍵情報付き暗号ログファイル群を入力する領域1601に入力された情報に基づいて、ログファイル情報保管部1103の鍵情報付き暗号ログファイル群のパスの順序付きリスト1301(図13)を生成する。また、ログファイル情報処理部1403は、鍵要素情報ファイルに対応する暗号ログファイルを入力する領域1603に入力された情報に基づいて、ログファイル情報保管部1103のnowポインタ1302、prevポインタ1303、及びnextポインタ1304を設定する(ステップ1503)。図16の入力例では、nowポインタ1302が領域1603に入力された暗号ログファイルLog20040705.logのパスを指し、prevポインタ1303がその1つ前のLog20040704.logのパスを指し、nextポインタ1304が1つ後のLog20040706.logのパスを指すように設定される。   When the input of the referrer is completed in step 1502, the initial input screen processing unit 1101 uses the log file information processing unit 1402 to log file based on the information input to the area 1601 for inputting the encryption log file group with key information. An ordered list 1301 (FIG. 13) of paths of the encryption log file group with key information of the information storage unit 1103 is generated. In addition, the log file information processing unit 1403, based on the information input in the area 1603 for inputting the encryption log file corresponding to the key element information file, the now pointer 1302, the prev pointer 1303 of the log file information storage unit 1103, and Next pointer 1304 is set (step 1503). In the input example of FIG. 16, the now pointer 1302 points to the path of the encrypted log file Log20040705.log input to the area 1603, the prev pointer 1303 points to the path of the previous Log20040704.log, and the next pointer 1304 is 1. It is set to point to the path of the next Log20040706.log.

次に、鍵要素情報ファイル分離部1405により、鍵要素情報ファイルを入力する領域1602に入力された情報に基づいて、当該鍵要素情報ファイルの内容を鍵要素ごとに分割し、鍵関連情報保管部1102の鍵要素情報保管部1201に保管する(ステップ1504)。   Next, based on the information input to the key element information file input area 1602 by the key element information file separation unit 1405, the content of the key element information file is divided for each key element, and the key related information storage unit It is stored in the key element information storage unit 1201 1102 (step 1504).

以上で初期入力画面処理部1101の処理は終了し、参照者操作画面処理部1104の処理が開始される。   Thus, the process of the initial input screen processing unit 1101 is completed, and the process of the referer operation screen processing unit 1104 is started.

図17に、参照者操作画面処理部1104の詳細を示す。参照者操作画面処理部1104は、鍵情報付きログファイル入力部1701、データ分離部1702、鍵差分要素情報復号処理部1703、前・次鍵要素情報処理部1704、ログファイル復号処理部1705、画面出力処理部1706、ファイル出力処理部1707、及び鍵要素情報変更部1708で構成される。   FIG. 17 shows details of the reference user operation screen processing unit 1104. The reference user operation screen processing unit 1104 includes a log file input unit 1701 with key information, a data separation unit 1702, a key difference element information decryption processing unit 1703, a previous / next key element information processing unit 1704, a log file decryption processing unit 1705, a screen An output processing unit 1706, a file output processing unit 1707, and a key element information changing unit 1708 are configured.

鍵情報付き暗号ログファイル入力部1701は、復号して表示する鍵情報付き暗号ログファイルの入力処理を行うものである。データ分離部1702は、入力された鍵情報付き暗号ログファイルから、暗号済みログファイルデータ210、暗号済み鍵差分要素データ220、及び暗号済み鍵要素データ230に分離するものである。鍵差分要素情報復号処理部1703は、データ分離部1702で分離した暗号済み鍵差分要素データ220を復号化し、鍵関連情報保管部1102の鍵差分要素情報保管部1202に保管するものである。前・次鍵要素情報処理部1704は、鍵関連情報保管部1102の鍵要素情報保管部1201と鍵差分要素情報保管部1202に保管されている情報から、前及び次の鍵情報付き暗号ログファイルのための鍵要素情報を算出し、前鍵要素情報保管部1203と次鍵要素情報保管部1204に保管するものである。ログファイル復号処理部1705は、データ分離部1702で分離した暗号済みログファイルデータ210を復号化するものである。画面出力処理部1706は、ログファイル復号処理部1705で復号化したログファイルデータの内容自体と、その復号化したログファイル名及びその前と次のログファイル名、並びに、操作ボタンからなる参照者操作用画面を生成出力するものである。ファイル出力処理部1707は、表示されている復号化されたログファイルデータの内容をファイルに出力するものである。鍵要素情報変更部1708は、参照者の参照者操作画面上での操作に応じて、鍵関連情報保管部1102が保管する情報と、ログファイル情報保管部1103が保管する各ポインタの変更を行うものである。   An encryption log file with key information input unit 1701 performs input processing of an encryption log file with key information to be decrypted and displayed. The data separation unit 1702 separates the input encrypted log file with key information into encrypted log file data 210, encrypted key difference element data 220, and encrypted key element data 230. The key difference element information decryption processing unit 1703 decrypts the encrypted key difference element data 220 separated by the data separation unit 1702 and stores it in the key difference element information storage unit 1202 of the key related information storage unit 1102. The previous / next key element information processing unit 1704 uses the information stored in the key element information storage unit 1201 and the key difference element information storage unit 1202 of the key-related information storage unit 1102 to generate the encryption log file with the previous and next key information. Key element information is calculated and stored in the previous key element information storage unit 1203 and the next key element information storage unit 1204. The log file decryption processing unit 1705 decrypts the encrypted log file data 210 separated by the data separation unit 1702. The screen output processing unit 1706 includes a log file data content decrypted by the log file decryption processing unit 1705, a decrypted log file name, previous and next log file names, and a reference person including operation buttons. It generates and outputs an operation screen. The file output processing unit 1707 outputs the contents of the displayed decrypted log file data to a file. The key element information changing unit 1708 changes the information stored by the key related information storage unit 1102 and the pointers stored by the log file information storage unit 1103 in accordance with the operation on the referrer operation screen of the referrer. Is.

図18は、参照者操作画面処理部1104の処理の手順を示すフローチャートである。まず、鍵要素情報保管部1201に保管されている情報の中で、共通鍵となるn個目のログファイル暗号用鍵501が0かどうか(すなわち、共通鍵が存在しないかどうか)を判定する。鍵が存在しない場合は終了し、存在する場合はステップ1801に進む(ステップ1800)。   FIG. 18 is a flowchart illustrating a processing procedure of the reference user operation screen processing unit 1104. First, in the information stored in the key element information storage unit 1201, it is determined whether or not the nth log file encryption key 501 serving as a common key is 0 (that is, whether or not a common key does not exist). . If the key does not exist, the process ends. If it does exist, the process proceeds to step 1801 (step 1800).

鍵情報付き暗号ログファイル入力部1701で、ログファイル情報保管部1103のnowポインタが指す鍵情報付き暗号ログファイル200を読み込む(ステップ1801)。次に、データ分離部1702で、読み込んだ鍵情報付き暗号ログファイル200を、暗号済みログファイルデータ210、暗号済み鍵差分要素データ220、及び暗号済み鍵要素データ230に分離する(ステップ1802)。次に、鍵差分要素情報復号処理部1703で、分離した暗号済み鍵差分要素データ220を、鍵要素情報保管部1201に保管されているn個目のログファイル暗号用鍵501を共通鍵として復号し、鍵差分要素情報保管部1202に保管する(ステップ1803)。次に、鍵要素情報保管部1201と鍵差分要素情報保管部1202に保管されている情報から、図8で説明した鍵差分要素情報の生成方法の逆の演算を利用して、前鍵要素情報と次鍵要素情報を算出し、前鍵要素情報保管部1203と次鍵要素情報保管部1204に保管する(ステップ1804)。次に、ログファイル復号処理部1705により、ステップ1803で利用した共通鍵を用いて、ステップ1802で分離した暗号済みログファイルデータ210を復号化する(ステップ1805)。次に、ステップ1805で復号したログファイルと、ログファイル情報保管部1103のnowポインタ1302、prevポインタ1303、及びnextポインタ1304がそれぞれ指す鍵情報付き暗号ログファイルの名前から、参照者操作画面を生成し、出力する(ステップ1806)。   The encryption log file with key information input unit 1701 reads the encryption log file with key information 200 pointed to by the now pointer of the log file information storage unit 1103 (step 1801). Next, the data separation unit 1702 separates the read encrypted log file with key information 200 into encrypted log file data 210, encrypted key difference element data 220, and encrypted key element data 230 (step 1802). Next, the key difference element information decryption processing unit 1703 decrypts the separated encrypted key difference element data 220 using the nth log file encryption key 501 stored in the key element information storage unit 1201 as a common key. And stored in the key difference element information storage unit 1202 (step 1803). Next, the previous key element information is obtained from the information stored in the key element information storage unit 1201 and the key difference element information storage unit 1202 by using the reverse operation of the key difference element information generation method described in FIG. The next key element information is calculated and stored in the previous key element information storage unit 1203 and the next key element information storage unit 1204 (step 1804). Next, the log file decryption processing unit 1705 decrypts the encrypted log file data 210 separated in step 1802 using the common key used in step 1803 (step 1805). Next, a reference operation screen is generated from the log file decrypted in step 1805 and the name of the encrypted log file with key information pointed to by the now pointer 1302, prev pointer 1303, and next pointer 1304 of the log file information storage unit 1103. And output (step 1806).

図19に、参照者操作画面の詳細を示す。参照者操作画面1900は、復号されたログファイルの内容を表示するログ出力結果領域1901、該領域1901に出力しているログファイル名を表示する領域1902、出力しているログファイルの1つ前のログファイル名を表示する領域1903、出力しているログファイルの1つ後のログファイル名を表示する領域1904、参照を終了する操作のためのendボタン1905、出力しているログファイルの内容をファイルとして出力する操作のためのfileボタン1906、一つ前のログファイルを表示させる操作のためのprevボタン1907、及び、一つ後のログファイルを表示させるためのnextボタン1908から構成される。   FIG. 19 shows details of the reference user operation screen. The referrer operation screen 1900 has a log output result area 1901 for displaying the contents of the decrypted log file, an area 1902 for displaying the name of the log file output to the area 1901, and the log file that is output one before. 1903 for displaying the log file name, 1904 for displaying the log file name immediately after the output log file, end button 1905 for the operation to end the reference, contents of the output log file A file button 1906 for the operation of outputting the file as a file, a prev button 1907 for the operation of displaying the previous log file, and a next button 1908 for displaying the next log file .

参照者は参照者操作画面のログ出力結果1901を参照した後、endボタン1905、fileボタン1906、prevボタン1907、及びnextボタン1908の何れかを押す入力を行う(ステップ1807)。endボタン1905が押されたかどうかを判定し、endボタン1905が押されていたらプログラムを終了し、そうでなければステップ1809に進む(ステップ1808)。次にfileボタン1906が押されたかどうかを判定し、fileボタン1906が押されていたらステップ1810へ、押されていなければステップ1811へ進む(ステップ1809)。ステップ1809でfileボタンが押されていた場合は、ファイル出力処理部1707で、ログ出力結果1901に出力しているログファイルを平文のファイルとして出力し(ステップ1810)、その後ステップ1807の参照者入力に戻る。ステップ1809でfileボタン1906が押されていなかった場合は、prevボタン1907が押されたかどうかを判定し、押されていた場合はステップ1812に進み、そうでない場合はnextボタン1908が押されているので、ステップ1813に進む(ステップ1811)。   After referring to the log output result 1901 on the referrer operation screen, the referrer inputs to press one of the end button 1905, the file button 1906, the prev button 1907, and the next button 1908 (step 1807). It is determined whether or not the end button 1905 has been pressed. If the end button 1905 has been pressed, the program is terminated; otherwise, the process proceeds to step 1809 (step 1808). Next, it is determined whether or not the file button 1906 has been pressed. If the file button 1906 has been pressed, the process proceeds to step 1810, and if not, the process proceeds to step 1811 (step 1809). If the file button has been pressed in step 1809, the file output processing unit 1707 outputs the log file output in the log output result 1901 as a plain text file (step 1810), and then the referrer input in step 1807 Return to. If the file button 1906 has not been pressed in step 1809, it is determined whether the prev button 1907 has been pressed. If it has been pressed, the process proceeds to step 1812. If not, the next button 1908 has been pressed. Therefore, the process proceeds to Step 1813 (Step 1811).

ステップ1812では、鍵要素情報変更部1708が、鍵関連情報保管部1102の鍵要素情報保管部1201の情報を次鍵要素情報保管部1204にコピーし、前鍵要素情報保管部1203の情報を鍵要素情報保管部1201にコピーする。さらに、ログファイル情報保管部1103のnowポインタ1302、prevポインタ1303、及びnextポインタ1304を、各々一つ前のファイルを指すように変更する(ステップ1812)。   In step 1812, the key element information change unit 1708 copies the information of the key element information storage unit 1201 of the key related information storage unit 1102 to the next key element information storage unit 1204, and stores the information of the previous key element information storage unit 1203 as the key. Copy to the element information storage unit 1201. Further, the now pointer 1302, the prev pointer 1303, and the next pointer 1304 of the log file information storage unit 1103 are changed to point to the previous file (step 1812).

ステップ1813では、鍵要素情報変更部1708が、鍵関連情報保管部1102の鍵要素情報保管部1201の情報を前鍵要素情報保管部1203にコピーし、次鍵要素情報保管部1204の情報を鍵要素情報保管部1201にコピーする。さらに、ログファイル情報保管部1103のnowポインタ1302、prevポインタ1303、及びnextポインタ1304を、各々一つ後のファイルを指すように変更する(ステップ1813)。   In step 1813, the key element information changing unit 1708 copies the information of the key element information storage unit 1201 of the key related information storage unit 1102 to the previous key element information storage unit 1203, and the information of the next key element information storage unit 1204 is used as the key. Copy to the element information storage unit 1201. Further, the now pointer 1302, the prev pointer 1303, and the next pointer 1304 of the log file information storage unit 1103 are changed to point to the next file, respectively (step 1813).

ステップ1812及びステップ1813の後、ステップ1801に戻って処理を行う。   After step 1812 and step 1813, the process returns to step 1801 to perform processing.

なお、本実施形態におけるログファイルの暗号化では、図2で説明したように、連続するm個以上のログファイルの復号を参照者に許す場合、その参照者は全ログファイルを参照可能である。しかし、図18は、連続するm個以上のログファイルの復号を参照者に許す場合にその参照者が全ログファイルを参照できるようにする処理は含んでいない。予め参照者に参照させる限られた数の暗号ログファイルを参照者に渡し、参照者は図16のような画面でそれらの暗号ログファイル群を入力して参照するようにすることを、図18の処理は前提としているからである。ただし、参照者が使用するログファイル復号端末130から例えばネットワーク経由で全ての暗号ログファイルにアクセスできるような場合は、連続するm個以上のログファイルの復号を参照者に許すことによってその参照者が全ログファイルを参照できるようにすることは意味がある。その場合、その連続するm個のログファイルの前及び次の暗号ログファイルを復号する共通鍵は、それらの連続するm個以上の暗号ファイルに含まれる鍵差分要素α*,0〜α*,m-1の和及び-α*,m〜-α*,2m-1の和で求めることになるので、そのような処理を加えればよい。具体的には、図18の処理でprevボタンが押されてステップ1812経由でステップ1800に戻って共通鍵が無かったとき、またはnextボタンが押されてステップ1813経由でステップ1800に戻って共通鍵が無かったときに(参照させる範囲を外れる場合である)、prevボタンであればそれにより参照しようとしているログファイルの後側に連続するm個の暗号ファイルの鍵差分要素αを所得できるかを判別し、またnextボタンであればそれにより参照しようとしているログファイルの前側に連続するm個の暗号ファイルの鍵差分要素αを所得できるかを判別する。それらのm個の暗号ファイルの鍵差分要素αが取得できるなら、上述したようにそれらの鍵差分要素から、prevボタンまたはnextボタンにより参照しようとした暗号ログファイルの共通鍵を求めることができるので、当該共通鍵を求めてステップ1806に進めばよい。m個の暗号ファイルの鍵差分要素αが取得できないときは、処理を終了する。 In the log file encryption according to the present embodiment, as described with reference to FIG. 2, when the referrer is allowed to decrypt m or more consecutive log files, the referrer can refer to all log files. . However, FIG. 18 does not include a process for allowing a referrer to refer to all log files when the referrer is allowed to decode m or more consecutive log files. A limited number of encrypted log files to be referred to by the referrer in advance are passed to the referrer, and the referrer inputs and refers to the encrypted log file group on the screen as shown in FIG. This is because the above processing is assumed. However, if all the encrypted log files can be accessed from the log file decryption terminal 130 used by the referrer, for example, via the network, the referrer can be permitted by allowing the referrer to decrypt m or more consecutive log files. It makes sense to be able to see all log files. In this case, the common key for decrypting the previous and next encrypted log files of the m consecutive log files is the key difference element α *, 0 to α *, included in the consecutive m or more encrypted files . Since it is obtained by the sum of m−1 and the sum of −α *, m to −α *, 2m−1 , such processing may be added. Specifically, when the prev button is pressed in the process of FIG. 18 and the process returns to step 1800 via step 1812 and there is no common key, or the next button is pressed and the process returns to step 1800 via step 1813 and the common key. If there is no (if it is out of the range to be referred), if it is a prev button, whether or not the key difference element α of m encrypted files continuous behind the log file to be referred to can be obtained If it is the next button, it is determined whether or not the key difference element α of the m encrypted files consecutive in front of the log file to be referred to can be obtained. If the key difference element α of these m encrypted files can be acquired, the common key of the encryption log file to be referred to by the prev button or the next button can be obtained from those key difference elements as described above. The common key is obtained and the process proceeds to step 1806. When the key difference element α of m encrypted files cannot be acquired, the process ends.

なお、上記実施形態ではログファイルの暗号化と復号化を例に説明したが、本発明は、連続的に順序付けられる任意の複数ファイルの暗号化・復号化に適用することができるものである。   In the above embodiment, encryption and decryption of a log file has been described as an example. However, the present invention can be applied to encryption / decryption of an arbitrary plurality of files that are sequentially ordered.

システム全体構成図Overall system configuration diagram n番目のログファイルに対応する鍵情報付き暗号ログファイルの詳細を示す図Figure showing details of the encryption log file with key information corresponding to the nth log file ログファイル暗号プログラムの構成図Configuration diagram of log file encryption program ログファイル暗号プログラムの処理フローチャートLog file encryption program processing flowchart 鍵要素情報保管部が保管する情報の詳細を示す図The figure which shows the details of the information which the key element information storage section stores 前鍵要素情報保管部が保管する情報の詳細を示す図The figure which shows the detail of the information which the former key element information storage section stores 次鍵要素情報保管部が保管する情報の詳細を示す図The figure which shows the details of the information which the next key element information storage section stores 鍵差分要素情報保管部が保管する情報の詳細を示す図The figure which shows the detail of the information which a key difference element information storage part stores 復号鍵生成プログラムの構成図Configuration diagram of decryption key generation program 復号鍵生成プログラムの処理フローチャートProcessing flow of decryption key generation program ログファイル復号プログラムの概要構成図Overview of log file decryption program 鍵関連情報保管部の詳細を示す図The figure which shows the details of the key related information storage section ログファイル情報保管部が保管する情報の詳細を示す図Figure showing details of information stored by the log file information storage unit 初期入力画面処理部の詳細を示す図The figure which shows the details of the initial input screen processing section 初期入力画面処理部の処理フローチャートProcessing flowchart of initial input screen processing unit 初期入力画面を示す画面図Screen diagram showing the initial input screen 参照者操作画面処理部の詳細を示す図The figure which shows the details of the referer operation screen processing section 参照者操作画面処理部のフローチャートFlowchart of reference user operation screen processing unit 参照者操作画面の画面図Screen shot of referrer operation screen

符号の説明Explanation of symbols

110…ログファイル暗号端末、120…復号鍵生成端末、130…ログファイル復号端末、111…ログファイル暗号プログラム、112…公開鍵PK、121…復号鍵生成プログラム、122…秘密鍵SK、131…ログファイル復号プログラム、200…鍵情報付き暗号ログファイル、210…暗号済みログファイルデータ、220…暗号済み鍵差分要素データ、221…鍵差分要素情報、230…暗号済み鍵要素データ、231…鍵要素情報、301…ログファイル入力部、302…乱数生成部、303…前鍵要素情報保管部、304…鍵要素情報保管部、305…次鍵要素情報保管部、306…鍵差分要素情報保管部、307…ログファイル暗号部、308…鍵要素情報暗号部、309…鍵差分要素情報暗号部、310…データ結合部、311…鍵情報付き暗号ログファイル出力部、501…n個目ログファイル暗号用鍵、502…n個目以降のログファイル暗号鍵要素群、503…n個目以前のログファイル暗号鍵要素群、601…n-1個目ログファイル暗号用鍵、602…n-1個目以降のログファイル暗号鍵要素群、603…n-1個目以前のログファイル暗号鍵要素群、701…n+1個目ログファイル暗号用鍵、702…n+1個目以降のログファイル暗号鍵要素群、703…n+1個目以前のログファイル暗号鍵要素群、901…暗号ログファイル・鍵範囲入力部、902…暗号ログファイル分離部、903…鍵要素情報復号処理部、904…鍵要素情報保管部、905…範囲外情報削除処理部、906…鍵要素情報ファイル結合部、907…鍵要素情報ファイル出力部、1101…初期入力画面処理部、1102…鍵関連情報保管部、1103…ログファイル情報保管部、1104…参照画面処理部、1201…鍵要素情報保管部、1202…鍵差分要素情報保管部、1203…前鍵要素情報保管部、1204…次鍵要素情報保管部、1301…パス順序付きリスト、1302…nowポインタ、1303…prevポインタ、1304…nextポインタ、1401…鍵要素情報ファイル入力処理部、1402…鍵情報付き暗号ログファイル群入力処理部、1403…対応ログファイル指定入力処理部、1404…鍵要素情報ファイル分離部、1600…初期入力画面、1701…鍵情報付きログファイル入力部、1702…データ分離部、1703…鍵差分要素情報復号処理部、1704…前後鍵要素情報処理部、1705…ログファイル復号処理部、1706…画面出力処理部、1707…ファイル出力処理部、1708…鍵要素変更部、1900…参照者操作画面。   110: Log file encryption terminal, 120 ... Decryption key generation terminal, 130 ... Log file decryption terminal, 111 ... Log file encryption program, 112 ... Public key PK, 121 ... Decryption key generation program, 122 ... Secret key SK, 131 ... Log File decryption program, 200 ... encrypted log file with key information, 210 ... encrypted log file data, 220 ... encrypted key difference element data, 221 ... key difference element information, 230 ... encrypted key element data, 231 ... key element information , 301 ... log file input unit, 302 ... random number generation unit, 303 ... previous key element information storage unit, 304 ... key element information storage unit, 305 ... next key element information storage unit, 306 ... key difference element information storage unit, 307 ... log file encryption part, 308 ... key element information encryption part, 309 ... key difference element information encryption part, 310 ... data combination part, 311 ... encryption log file output part with key information, 501 ... n-th log file encryption key , 502 ... nth and subsequent log files No. key element group, 503... Nth log file encryption key element group, 601... N-1 log file encryption key, 602... N-1 log file encryption key element group, 603. n-1st log file encryption key element group, 701 ... n + 1 log file encryption key, 702 ... n + 1 log file encryption key element group, 703 ... n + 1th Previous log file encryption key element group, 901 ... encryption log file / key range input unit, 902 ... encryption log file separation unit, 903 ... key element information decryption processing unit, 904 ... key element information storage unit, 905 ... out of range information Deletion processing unit, 906 ... Key element information file combination unit, 907 ... Key element information file output unit, 1101 ... Initial input screen processing unit, 1102 ... Key related information storage unit, 1103 ... Log file information storage unit, 1104 ... Reference screen Processing unit, 1201 ... Key element information storage unit, 1202 ... Key difference element information storage unit, 1203 ... Previous key element information storage unit, 1204 ... Next key required Information storage unit, 1301 ... List with path order, 1302 ... now pointer, 1303 ... prev pointer, 1304 ... next pointer, 1401 ... Key element information file input processing unit, 1402 ... Cryptographic log file group input processing unit with key information, 1403 ... corresponding log file designation input processing unit, 1404 ... key element information file separation unit, 1600 ... initial input screen, 1701 ... log file input unit with key information, 1702 ... data separation unit, 1703 ... key difference element information decryption processing unit, 1704: Pre- and post-key element information processing unit, 1705 ... Log file decryption processing unit, 1706 ... Screen output processing unit, 1707 ... File output processing unit, 1708 ... Key element changing unit, 1900 ... Referer operation screen.

Claims (9)

連続的に順序付けられる複数のファイルの暗号方法であって、
コンピュータが備えるファイル入力手段が、前記順序に従ってファイルを入力するステップと、
コンピュータが備える暗号化手段が、前記入力したファイルを、そのファイル毎に生成した共通鍵で、暗号化するステップと、
コンピュータが備える鍵要素生成手段が、前後に連なるファイルの共通鍵を算出するための鍵要素を生成し、公開鍵で暗号化するステップと、
コンピュータが備える鍵差分要素生成手段が、前後に連なるファイルの共通鍵を算出するための鍵差分要素を算出し、ファイルを暗号化した際に生成した前記共通鍵で暗号化するステップと、
コンピュータが備える結合手段が、前記暗号化した情報を一つの鍵情報付きファイルに結合するステップと
を備えることを特徴とするファイルの暗号方法。
A method of encrypting a plurality of files that are sequentially ordered,
File input means provided in the computer, inputting the file according to the order;
An encryption means included in the computer encrypts the input file with a common key generated for each file;
A key element generating means provided in the computer generates a key element for calculating a common key of a file that continues in front and back, and encrypts it with a public key;
A key difference element generation means provided in the computer calculates a key difference element for calculating a common key of a file that continues before and after, and encrypts the file with the common key generated when the file is encrypted;
A file encryption method comprising: a combining unit included in the computer; and a step of combining the encrypted information into one file with key information.
請求項1に記載のファイルの暗号方法により暗号化された鍵情報付きファイルを復号化するための鍵情報を抽出する鍵情報抽出方法であって、
コンピュータが備える範囲入力手段が、復号化する1つのファイルを特定する情報とそのファイルの前後の復号化したいファイルの範囲を入力するステップと、
コンピュータが備える鍵要素抽出手段が、前記特定された鍵情報付きファイルから、暗号化されている鍵要素を抽出するステップと、
コンピュータが備える鍵要素復号手段が、前記暗号化されている鍵要素を、秘密鍵で復号化するステップと、
コンピュータが備える範囲外削除手段が、前記復号化された鍵要素のうち、指定された範囲以外の鍵要素の情報を排除するステップと、
コンピュータが備える鍵ファイル生成手段が、前記排除した結果を、一つの鍵情報ファイルに結合して出力するステップと
を備えることを特徴とする鍵情報抽出方法。
A key information extraction method for extracting key information for decrypting a file with key information encrypted by the file encryption method according to claim 1, comprising:
A range input means provided in the computer for inputting information specifying one file to be decoded and a range of files to be decoded before and after the file;
A key element extraction means provided in the computer, extracting the encrypted key element from the identified file with key information;
A key element decryption means included in the computer decrypts the encrypted key element with a secret key;
The out-of-range deletion means provided in the computer excludes information of key elements outside the specified range among the decrypted key elements;
A key information extraction method comprising: a key file generation means provided in a computer, the step of combining the output result into one key information file and outputting the result.
請求項1に記載のファイルの暗号方法により暗号化された鍵情報付きファイルを、請求項2に記載の鍵情報抽出方法により出力された鍵情報ファイルを用いて、復号するファイルの復号方法であって、
コンピュータが備える入力手段が、復号化する鍵情報付き暗号ファイル群と鍵情報ファイルとを入力するステップと、
コンピュータが備えるデータ分離手段が、前記鍵情報ファイルの鍵要素を抽出した鍵情報付き暗号ファイルから、暗号済みファイルデータと暗号済み鍵差分要素データと暗号済み鍵要素データとを分離するステップと、
コンピュータが備える復号手段が、前記分離した暗号済みファイルデータを前記鍵情報ファイルから取り出した共通鍵で復号し画面出力するステップと、
コンピュータが備える操作手段が、前記鍵情報ファイルで指定された範囲の鍵情報付きファイルを、利用者の操作に基づき順に復号し出力するステップと
を備えることを特徴とする鍵情報付きファイルの復号方法。
A file decryption method for decrypting a file with key information encrypted by the file encryption method according to claim 1 using the key information file output by the key information extraction method according to claim 2. And
A step of inputting an encryption file group with key information to be decrypted and a key information file by an input means provided in the computer;
Data separating means provided in the computer separates the encrypted file data, the encrypted key difference element data, and the encrypted key element data from the encrypted file with key information obtained by extracting the key element of the key information file;
Decrypting means provided in the computer, decrypting the separated encrypted file data with a common key extracted from the key information file and outputting the screen;
A method for decrypting a file with key information, comprising: a step of: operating means included in the computer comprising: sequentially decrypting and outputting a file with key information in a range specified by the key information file based on a user operation .
連続的に順序付けられる複数のファイルの暗号方法であって、
コンピュータが備えるファイル入力手段が、前記順序に従ってn番目(n=0,1,2,…)のファイルを入力する第1のステップと、
コンピュータが備える判別手段が、前記ファイルが最初のファイル(n=1)か否かを判定する第2のステップと、
最初のファイルであるとき、コンピュータが備える初期鍵要素情報生成手段が、予め決められているしきい値をmとし、n=1番目の鍵要素情報として、βn-m+1,1,…,βn-1,m-1,βn,m,βn+1,m+1,…,βn+m-1,2m-1を生成し(ただし、第1添字が0以下のとき、または第2添字が0以上2m以下の範囲を外れているときは、0とする)、鍵要素情報保管部に保管し、さらに前鍵要素情報保管部に保管する鍵要素であるβn-m,1,…,βn-2,m-1,βn-1,m,βn,m+1,…,βn+m-2,2m-1を全て0とする第3のステップと、
コンピュータが備える暗号化手段が、前記入力したn番目のファイルを、前記鍵要素情報保管部に保管されているβn,mを共通鍵として暗号化することにより、暗号済みファイルデータを生成する第4のステップと、
コンピュータが備える鍵要素生成手段が、次のn+1番目の鍵要素情報として、βn-m+2,1,…,βn,m-1,βn+1,m,βn+2,m+1,…,βn+m,2m-1を生成し(ただし、第1添字が0以下のとき、または第2添字が0以上2m以下の範囲を外れているときは、0とする)、次鍵要素情報保管部に保管する第5のステップと、
コンピュータが備える鍵差分要素生成手段が、前鍵要素情報保管部と鍵要素情報保管部と次鍵要素情報保管部に保管されている情報から、αn-m,0=βn-m,1,αn-m+1,1=βn-m+1,2−βn-m+1,1,…,αn-2,m-2=βn-2,m-1−βn-2,m-2,αn-1,m-1=βn-1,m−βn-1,m-1,-αn+1,m=βn+1,m−βn+1,m+1,-αn+2,m+1=βn+2,m+1−βn+2,m+2,…,-αn+m-1,2m-2=βn+m-1,2m-2−βn+m-1,2m-1,-αn+m,2m-1=βn+m,2m-1を算出し、鍵差分要素として鍵差分要素情報保管部に保管する第6のステップと、
コンピュータが備える暗号処理手段が、鍵要素情報保管部に保管されている情報を公開鍵を用いて暗号化して暗号済み鍵要素データを生成し、鍵差分要素情報保管部に保管されている情報を前記第4のステップで使用した共通鍵βn,mを用いて暗号化して暗号済み鍵差分要素データを生成する第7のステップと、
コンピュータが備えるコピー処理手段が、鍵要素情報保管部に保管されている情報を前鍵要素情報保管部にコピーし、次鍵要素情報保管部に保管されている情報を鍵要素情報保管部にコピーする第8のステップと、
コンピュータが備える結合手段が、前記暗号済みファイルデータと暗号済み鍵要素データと暗号済み鍵差分要素データとを結合して鍵情報付きファイルを生成する第9のステップと
を備え、ファイルの順序を示すnの値を歩進しながら前記第1〜第9のステップを実行することにより当該複数のファイルを暗号化することを特徴とするファイルの暗号方法。
A method of encrypting a plurality of files that are sequentially ordered,
A first step in which a file input means included in the computer inputs an n-th (n = 0, 1, 2,...) File according to the order;
A second step in which a determination unit included in the computer determines whether the file is the first file (n = 1);
When it is the first file, the initial key element information generating means provided in the computer sets m as a predetermined threshold, and β = 1 −m + 1,1,. , Β n−1, m−1 , β n, m , β n + 1, m + 1 ,..., Β n + m−1,2m−1 are generated (when the first subscript is 0 or less) Or 0 nm when the second subscript is outside the range of 0 to 2 m), β nm, which is a key element stored in the key element information storage unit and further stored in the previous key element information storage unit 1 ,..., Β n−2, m−1 , β n−1, m , β n, m + 1 ,..., Β n + m−2, 2m−1 are all set to 0;
The encryption means included in the computer generates encrypted file data by encrypting the input n-th file using β n, m stored in the key element information storage unit as a common key. 4 steps,
The key element generation means included in the computer has the following (n + 1) th key element information as β n-m + 2,1 ,..., Β n, m−1 , β n + 1, m , β n + 2, m +1 , ..., β n + m, 2m-1 is generated (however, when the first subscript is 0 or less, or when the second subscript is outside the range of 0 to 2 m, it is set to 0) A fifth step of storing in the next key element information storage unit;
The key difference element generation means provided in the computer is based on information stored in the previous key element information storage unit, the key element information storage unit, and the next key element information storage unit, α nm, 0 = β nm, 1 , α n− m + 1,1 = β n-m + 1,2 −β n-m + 1,1 ,..., α n-2, m-2 = β n-2, m-1 −β n-2, m -2 , α n-1, m-1 = β n-1, m −β n-1, m-1 , -α n + 1, m = β n + 1, m −β n + 1, m + 1 , -α n + 2, m + 1 = β n + 2, m + 1 −β n + 2, m + 2 , ..., -α n + m-1,2m-2 = β n + m-1 , 2m-2n + m-1,2m-1 , -α n + m, 2m-1 = β n + m, 2m-1 is calculated and stored in the key difference element information storage unit as a key difference element A sixth step,
The encryption processing means included in the computer generates encrypted key element data by encrypting the information stored in the key element information storage unit using a public key, and the information stored in the key difference element information storage unit A seventh step of generating encrypted key difference element data by encrypting with the common key β n, m used in the fourth step;
The copy processing means provided in the computer copies the information stored in the key element information storage unit to the previous key element information storage unit, and copies the information stored in the next key element information storage unit to the key element information storage unit An eighth step to:
A combining unit included in the computer includes: a ninth step of generating a file with key information by combining the encrypted file data, the encrypted key element data, and the encrypted key difference element data, and indicating a file order; A method for encrypting a file, wherein the plurality of files are encrypted by executing the first to ninth steps while incrementing the value of n.
請求項4に記載のファイルの暗号方法により暗号化されたファイルの復号化に使用する鍵情報を抽出する鍵情報抽出方法であって、
コンピュータが備える範囲入力手段が、復号化を許可するn番目の暗号済みファイルデータを特定する情報とそのファイルの前後の復号化を許可する範囲を入力する第1のステップと、
コンピュータが備える鍵要素抽出手段が、前記特定された暗号済みファイルデータを含む鍵情報付きファイルから、暗号済み鍵要素データを取り出し、秘密鍵を用いて復号化して得たβn-m+1,1,…,βn-1,m-1,βn,m,βn+1,m+1,…,βn+m-1,2m-1を鍵要素として鍵要素情報保管部に保管する第2のステップと、
コンピュータが備える範囲外情報削除手段が、第1のステップで入力された範囲に基づいて、前記鍵要素情報保管部に保管されている鍵要素のうち、指定された範囲外の鍵要素を排除する第3のステップと、
コンピュータが備える鍵ファイル生成出力手段が、前記排除後の結果を1つの鍵情報ファイルとして出力する第4のステップと
を備えることを特徴とする鍵情報抽出方法。
A key information extraction method for extracting key information used for decrypting a file encrypted by the file encryption method according to claim 4,
A first step in which range input means provided in the computer inputs information for identifying n-th encrypted file data that permits decryption and a range that permits decryption before and after the file;
The key element extraction means provided in the computer extracts the encrypted key element data from the file with key information including the specified encrypted file data, and obtains β n-m + 1, obtained by decrypting using the secret key 1 , ..., β n-1, m-1 , β n, m , β n + 1, m + 1 , ..., β n + m-1,2m-1 are stored in the key element information storage unit as key elements A second step of:
The out-of-range information deleting means provided in the computer excludes key elements outside the specified range from the key elements stored in the key element information storage unit based on the range input in the first step. A third step;
A key information extraction method comprising: a key file generation / output unit provided in the computer, and a fourth step of outputting the result after the exclusion as one key information file.
請求項4に記載のファイルの暗号方法により暗号化されたファイルを、請求項5に記載の鍵情報抽出方法により出力された鍵情報ファイルを用いて、復号するファイルの復号方法であって、
コンピュータが備える入力手段が、請求項5に記載の鍵情報抽出方法により出力された鍵情報ファイルと、前記復号化を許可されたn番目の暗号済みファイルデータを特定する情報と、前記復号化を許可された範囲の鍵情報付き暗号ファイル群とを入力する第1のステップと、
コンピュータが備える鍵情報入力手段が、前記入力した鍵情報ファイルの鍵要素に基づいて、βn-m+1,1,…,βn-1,m-1,βn,m,βn+1,m+1,…,βn+m-1,2m-1を、鍵要素として鍵要素情報保管部に保管する第2のステップと、
コンピュータが備えるデータ分離手段が、前記n番目の暗号済みファイルデータから、暗号済みファイルデータと暗号済み鍵差分要素データとを取り出す第3のステップと、
コンピュータが備える鍵差分要素情報復号手段が、前記鍵要素情報保管部内の共通鍵βn,mを用いて、取り出した暗号済み鍵差分要素データを復号し、得られたαn-m,0,αn-m+1,1,…,αn-2,m-2,αn-1,m-1,-αn+1,m,-αn+2,m+1,…,-αn+m-1,2m-2,-αn+m,2m-1を鍵差分要素情報として鍵差分要素情報保管部に保管する第4のステップと、
コンピュータが備える前・次鍵要素情報処理手段が、前記鍵差分要素情報保管部の情報と鍵要素情報保管部の情報から、βn-m,1=αn-m,0,βn-m+1,2=βn-m+1,1+αn-m+1,1,…,βn-1,m=βn-1,m-1+αn-1,m-1,βn+1,m=βn+1,m+1n+1,m,…,βn+m-1,2m-2=βn+m-1,2m-1n+m-1,2m-2,βn+m,2m-1=-αn+m,2m-1を算出し、前鍵要素または次鍵要素として前鍵要素情報保管部または次鍵要素情報保管部に保管する第5のステップと、
コンピュータが備える復号手段が、前記鍵差分要素情報保管部に保管されている共通鍵βn,mを用いて、前記第3のステップで取り出した暗号済みファイルデータを復号する第6のステップと、
コンピュータが備える画面出力手段が、前記復号したファイルデータを画面表示する第7のステップと、
コンピュータが備える鍵要素情報変更手段が、
(a)1つ前のファイルの参照を指示する操作が為されたことを検出したときは、鍵要素情報保管部に保管されている情報を次鍵要素情報保管部にコピーし、前鍵要素情報保管部に保管されている情報を鍵要素情報保管部にコピーし、1つ前のファイルを参照すべきn番目のファイルとして前記第3のステップに戻り、
(b)1つ後のファイルの参照を指示する操作が為されたことを検出したときは、鍵要素情報保管部に保管されている情報を前鍵要素情報保管部にコピーし、次鍵要素情報保管部に保管されている情報を鍵要素情報保管部にコピーし、1つ後のファイルを参照すべきn番目のファイルとして前記第3のステップに戻る第8のステップと
を備えることを特徴とする鍵情報付きファイルの復号方法。
A file decryption method for decrypting a file encrypted by the file encryption method according to claim 4, using the key information file output by the key information extraction method according to claim 5,
An input means included in the computer includes: a key information file output by the key information extraction method according to claim 5; information specifying the nth encrypted file data permitted to be decrypted; and the decryption. A first step of inputting an encrypted file group with key information in an allowed range;
Based on the key elements of the input key information file, the key information input means provided in the computer is based on β n-m + 1,1 ,..., Β n−1, m−1 , β n, m , β n + A second step of storing 1, m + 1 , ..., β n + m-1,2m-1 as key elements in the key element information storage unit;
A third step in which data separation means included in the computer extracts the encrypted file data and the encrypted key difference element data from the n-th encrypted file data;
The key difference element information decryption means provided in the computer decrypts the extracted encrypted key difference element data using the common key β n, m in the key element information storage unit, and the obtained α nm, 0 , α n -m + 1,1 , ..., α n-2, m-2 , α n-1, m-1 , -α n + 1, m , -α n + 2, m + 1 , ..., -α n a fourth step of storing + m-1,2m-2 , -α n + m, 2m-1 as key difference element information in the key difference element information storage unit;
The previous / next key element information processing means included in the computer calculates β nm, 1 = α nm, 0 , β n-m + 1,2 from the information of the key difference element information storage unit and the information of the key element information storage unit. = Β n-m + 1,1 + α n-m + 1,1 ,..., Β n-1, m = β n-1, m-1 + α n-1, m-1 , β n + 1, m = Β n + 1, m + 1n + 1, m , ..., β n + m-1,2m-2 = β n + m-1,2m-1n + m-1,2m- 2 , β n + m, 2m−1 = −α n + m, 2m−1 is calculated and stored in the previous key element information storage unit or the next key element information storage unit as the previous key element or the next key element. And the steps
A decrypting means provided in the computer, using a common key β n, m stored in the key difference element information storage unit, decrypting the encrypted file data extracted in the third step;
A screen output means provided in the computer for displaying the decrypted file data on a screen;
The key element information changing means provided in the computer is
(A) When it is detected that an operation for instructing reference to the previous file has been made, the information stored in the key element information storage unit is copied to the next key element information storage unit, and the previous key element The information stored in the information storage unit is copied to the key element information storage unit, and the previous file is returned to the third step as the nth file to be referred to,
(B) When it is detected that an operation for instructing reference to the next file has been made, the information stored in the key element information storage unit is copied to the previous key element information storage unit, and the next key element And an eighth step of copying the information stored in the information storage unit to the key element information storage unit and returning to the third step as the nth file to be referred to by the next file. A method for decrypting a file with key information.
連続的に順序付けられる複数のファイルの暗号化を行うファイル暗号化装置であって、
前記順序に従ってファイルを入力するファイル入力手段と、
前記入力したファイルを、そのファイル毎に生成した共通鍵で、暗号化する暗号化手段と、
前後に連なるファイルの共通鍵を算出するための鍵要素を生成し、公開鍵で暗号化する鍵要素生成手段と、
前後に連なるファイルの共通鍵を算出するための鍵差分要素を算出し、ファイルを暗号化した際に生成した前記共通鍵で暗号化する鍵差分要素生成手段と、
前記手段で暗号化したものを一つの鍵情報付きファイルに結合する結合手段と
を備えることを特徴とするファイル暗号化装置。
A file encryption apparatus that encrypts a plurality of files that are sequentially ordered,
File input means for inputting files according to the order;
Encryption means for encrypting the input file with a common key generated for each file;
A key element generating means for generating a key element for calculating a common key of a file that is continuous before and after, and encrypting with a public key;
A key difference element generating means for calculating a key difference element for calculating a common key of a file that continues before and after, and encrypting with the common key generated when the file is encrypted;
A file encryption apparatus comprising: a combination unit configured to combine the one encrypted by the unit into a file with key information.
請求項7に記載のファイル暗号化装置により暗号化された鍵情報付きファイルを復号化するための鍵情報を抽出する鍵情報抽出装置であって、
復号化する1つのファイルを特定する情報とそのファイルの前後の復号化したいファイルの範囲を入力する範囲入力手段と、
前記特定された鍵情報付きファイルから、暗号化されている鍵要素を抽出する鍵要素抽出手段と、
前記暗号化されている鍵要素を、秘密鍵で復号化する鍵要素復号手段と、
前記復号化された鍵要素のうち、指定された範囲以外の鍵要素の情報を排除する範囲外削除手段と、
前記排除した結果を、一つの鍵情報ファイルに結合して出力する鍵ファイル生成手段と
を備えることを特徴とする鍵情報抽出装置。
A key information extraction device for extracting key information for decrypting a file with key information encrypted by the file encryption device according to claim 7,
Range input means for inputting information for specifying one file to be decrypted and a range of files to be decrypted before and after the file;
Key element extraction means for extracting an encrypted key element from the identified file with key information;
Key element decryption means for decrypting the encrypted key element with a secret key;
Out-of-range deletion means for excluding information on key elements other than the specified range among the decrypted key elements;
A key information extraction apparatus comprising: a key file generation unit that outputs the result of the exclusion combined with one key information file.
請求項7に記載のファイル暗号化装置により暗号化された鍵情報付きファイルを、請求項8に記載の鍵情報抽出装置により出力された鍵情報ファイルを用いて、復号するファイル復号化装置であって、
復号化する鍵情報付き暗号ファイル群と鍵情報ファイルとを入力する入力手段と、
前記鍵情報ファイルの鍵要素を抽出した鍵情報付き暗号ファイルから、暗号済みファイルデータと暗号済み鍵差分要素データと暗号済み鍵要素データとを分離するデータ分離手段と、
前記分離した暗号済みファイルデータを前記鍵情報ファイルから取り出した共通鍵で復号し画面出力する復号手段と、
前記鍵情報ファイルで指定された範囲の鍵情報付きファイルを、利用者の操作に基づき順に復号し出力する手段と
を備えることを特徴とする鍵情報付きファイル復号装置。
A file decryption device for decrypting a file with key information encrypted by the file encryption device according to claim 7 by using the key information file output by the key information extraction device according to claim 8. And
An input means for inputting an encrypted file group with key information to be decrypted and a key information file;
Data separating means for separating encrypted file data, encrypted key difference element data, and encrypted key element data from an encrypted file with key information obtained by extracting the key element of the key information file;
Decrypting means for decrypting the separated encrypted file data with a common key extracted from the key information file and outputting a screen;
A file decrypting apparatus with key information, comprising: means for sequentially decrypting and outputting a file with key information in a range specified by the key information file based on a user's operation.
JP2005048126A 2005-02-24 2005-02-24 File encryption / decryption method, key information extraction method and apparatus Expired - Fee Related JP4684680B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005048126A JP4684680B2 (en) 2005-02-24 2005-02-24 File encryption / decryption method, key information extraction method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005048126A JP4684680B2 (en) 2005-02-24 2005-02-24 File encryption / decryption method, key information extraction method and apparatus

Publications (2)

Publication Number Publication Date
JP2006237908A true JP2006237908A (en) 2006-09-07
JP4684680B2 JP4684680B2 (en) 2011-05-18

Family

ID=37045098

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005048126A Expired - Fee Related JP4684680B2 (en) 2005-02-24 2005-02-24 File encryption / decryption method, key information extraction method and apparatus

Country Status (1)

Country Link
JP (1) JP4684680B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108833091A (en) * 2018-05-28 2018-11-16 武汉斗鱼网络科技有限公司 A kind of encryption method of journal file, decryption method and device
CN109861820A (en) * 2019-02-18 2019-06-07 吉林大学珠海学院 Encrypting and decrypting method and device based on random hash and bit arithmetic

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09204330A (en) * 1995-10-26 1997-08-05 Hitachi Ltd Device and method for ciphering and deciphering information
JPH10303881A (en) * 1997-04-25 1998-11-13 Sony Corp Enciphering and decoding device, and method
JP2000138666A (en) * 1999-11-29 2000-05-16 Hitachi Software Eng Co Ltd Data multistep reference controlling method and data multistep referring system
JP2000293936A (en) * 1999-04-08 2000-10-20 Hitachi Ltd Digital signal recorder, reproducing device and recording medium
JP2001516913A (en) * 1997-09-16 2001-10-02 マイクロソフト コーポレイション Encrypted file system and method
JP2002297540A (en) * 2001-03-29 2002-10-11 Japan Research Institute Ltd Log collection system, server for use in log collection system and medium recorded with server control program
JP2003115830A (en) * 2001-10-03 2003-04-18 Victor Co Of Japan Ltd Information recording device and information recording and reproducing device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09204330A (en) * 1995-10-26 1997-08-05 Hitachi Ltd Device and method for ciphering and deciphering information
JPH10303881A (en) * 1997-04-25 1998-11-13 Sony Corp Enciphering and decoding device, and method
JP2001516913A (en) * 1997-09-16 2001-10-02 マイクロソフト コーポレイション Encrypted file system and method
JP2000293936A (en) * 1999-04-08 2000-10-20 Hitachi Ltd Digital signal recorder, reproducing device and recording medium
JP2000138666A (en) * 1999-11-29 2000-05-16 Hitachi Software Eng Co Ltd Data multistep reference controlling method and data multistep referring system
JP2002297540A (en) * 2001-03-29 2002-10-11 Japan Research Institute Ltd Log collection system, server for use in log collection system and medium recorded with server control program
JP2003115830A (en) * 2001-10-03 2003-04-18 Victor Co Of Japan Ltd Information recording device and information recording and reproducing device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108833091A (en) * 2018-05-28 2018-11-16 武汉斗鱼网络科技有限公司 A kind of encryption method of journal file, decryption method and device
CN108833091B (en) * 2018-05-28 2021-03-12 武汉斗鱼网络科技有限公司 Encryption method, decryption method and device for log file
CN109861820A (en) * 2019-02-18 2019-06-07 吉林大学珠海学院 Encrypting and decrypting method and device based on random hash and bit arithmetic

Also Published As

Publication number Publication date
JP4684680B2 (en) 2011-05-18

Similar Documents

Publication Publication Date Title
CN101118586B (en) Information processing apparatus, data processing apparatus, and methods thereof
CN108140334B (en) Confidential search system, management device, confidential search method, and recording medium
KR100753932B1 (en) contents encryption method, system and method for providing contents through network using the encryption method
KR101405720B1 (en) Accelerated cryptography with an encryption attribute
JP5167348B2 (en) Software encryption method, software decryption method, software encryption device, and software decryption device
CN104040937A (en) Multi-key cryptography for encrypting file system acceleration
US20090158037A1 (en) System and method for protecting an electronic file
JP2014524687A (en) System and method for wireless data protection
US20080235521A1 (en) Method and encryption tool for securing electronic data storage devices
EP3817323B1 (en) Encryption processing system, encryption processing method, and program
Prakash et al. Implementation of trapdoor functionality to two-layer encryption and decryption by using RSA-AES cryptography algorithms
JP5703714B2 (en) Data processing apparatus, data processing system, data processing program, and access restriction method
KR101553986B1 (en) System and method of distrubuted data storage, restoration
JP4684680B2 (en) File encryption / decryption method, key information extraction method and apparatus
JP5113630B2 (en) Secret sharing method, program, and apparatus
WO1999010859A2 (en) Steganographic encryption system for secure data
JP2008312156A (en) Information processing apparatus, encryption processing method, and encryption processing program
Kapusta et al. Circular AON: A very fast scheme to protect encrypted data against key exposure
JP4569593B2 (en) Encryption communication system, encryption communication method, encryption device, and decryption device
Aghili Improving security using blow fish algorithm on deduplication cloud storage
WO2021044465A1 (en) Encrypting device, decrypting device, computer program, encryption method, decryption method, and data structure
Saudagar et al. Image Encryption based on Advanced Encryption Standard (AES)
CN111008837A (en) Block chain account private key recovery method and device, computer equipment and storage medium
JP6296589B2 (en) Cryptographic processing system
JP2004184516A (en) Digital data transmitting terminal

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070612

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101029

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110111

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

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

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

Free format text: PAYMENT UNTIL: 20140218

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