Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4485175B2 - Key sharing system, shared key generating device, and shared key restoring device - Google Patents
[go: Go Back, main page]

JP4485175B2 - Key sharing system, shared key generating device, and shared key restoring device - Google Patents

Key sharing system, shared key generating device, and shared key restoring device Download PDF

Info

Publication number
JP4485175B2
JP4485175B2 JP2003396217A JP2003396217A JP4485175B2 JP 4485175 B2 JP4485175 B2 JP 4485175B2 JP 2003396217 A JP2003396217 A JP 2003396217A JP 2003396217 A JP2003396217 A JP 2003396217A JP 4485175 B2 JP4485175 B2 JP 4485175B2
Authority
JP
Japan
Prior art keywords
value
decryption
shared key
encryption
generated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003396217A
Other languages
Japanese (ja)
Other versions
JP2004201292A (en
Inventor
将人 山道
裕一 布田
基司 大森
誠 館林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial 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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2003396217A priority Critical patent/JP4485175B2/en
Publication of JP2004201292A publication Critical patent/JP2004201292A/en
Application granted granted Critical
Publication of JP4485175B2 publication Critical patent/JP4485175B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、情報セキュリティ技術としての暗号技術に関し、特に、第三者に知られることなく、鍵を配送する技術に関する。   The present invention relates to a cryptographic technique as an information security technique, and more particularly to a technique for distributing a key without being known to a third party.

従来より、送信装置から受信装置へ情報を秘密に送信するために、公開鍵暗号方式が用いられる。
公開鍵暗号方式では、送信装置は、通信内容を受信装置の公開鍵を用いて暗号化して送信し、受信装置は、暗号化された通信内容を受信し、受信した通信内容を自身の秘密鍵を用いて復号して元の通信内容を得る。(例えば、非特許文献1参照)。
Conventionally, a public key cryptosystem is used to secretly transmit information from a transmitting device to a receiving device.
In the public key cryptosystem, the transmission device encrypts and transmits the communication content using the public key of the reception device, the reception device receives the encrypted communication content, and receives the received communication content in its own private key. Is used to obtain the original communication content. (For example, refer nonpatent literature 1).

1996年、高速処理が可能な公開鍵暗号として、NTRU暗号が提案された(例えば、非特許文献2参照)。NTRU暗号では、高速に演算可能な多項式演算を用いて暗号化と復号化とを行うので、べき乗演算を行うRSA暗号や楕円曲線上の点のスカラ倍演算を行う楕円曲線暗号と比較すると、これら従来の公開鍵暗号よりもソフトウェアにより高速に処理することが可能である。   In 1996, NTRU encryption was proposed as public key encryption capable of high-speed processing (see, for example, Non-Patent Document 2). In NTRU cryptography, encryption and decryption are performed using polynomial operations that can be performed at high speed, so when compared with RSA cryptography that performs exponentiation and elliptic curve cryptography that performs scalar multiplication of points on an elliptic curve, It is possible to perform processing by software faster than conventional public key cryptography.

しかし、このNTRU暗号では、公開鍵を用いて平文を暗号化して暗号文を生成し、正規の秘密鍵を用いて暗号文を復号して復号文を生成する際に、復号文が元の平文と異なる場合が発生する。このことを復号エラーが発生するという。なお、復号エラーを回避する方法として、平文に付加情報を付加して暗号化し、平文のハッシュ関数値と共に送信する方法が開示されている(例えば、特許文献1参照)。   However, in this NTRU cipher, when a plaintext is encrypted using a public key to generate a ciphertext, and a decrypted text is generated by decrypting a ciphertext using a regular secret key, the decrypted text is the original plaintext. And a different case occurs. This is called a decoding error. As a method for avoiding a decryption error, a method is disclosed in which additional information is added to plaintext, encrypted, and transmitted together with a plaintext hash function value (see, for example, Patent Document 1).

一方で、近年、公開鍵暗号の新しい概念として、鍵カプセル化メカニズム(Key Encapsulation Mechanisms)と呼ばれる方式が提案されている(例えば、非特許文献3参照)。この鍵カプセル化メカニズムは、公開鍵暗号を用いて送信装置と受信装置との間で共有鍵を配送するアルゴリズムであり、送信装置は、暗号化アルゴリズムEに受信者の公開鍵pkを入力して暗号文Cと共有鍵Kを生成し、暗号文Cを受信装置に伝送する。次に、受信装置は、復号アルゴリズムDに、秘密鍵skと暗号文Cを入力して送信装置と同じ共有鍵Kを求める。   On the other hand, in recent years, as a new concept of public key cryptography, a method called a key encapsulation mechanism has been proposed (see, for example, Non-Patent Document 3). This key encapsulation mechanism is an algorithm for distributing a shared key between a transmitting device and a receiving device using public key cryptography, and the transmitting device inputs the recipient's public key pk to the encryption algorithm E. A ciphertext C and a shared key K are generated, and the ciphertext C is transmitted to the receiving device. Next, the receiving apparatus inputs the secret key sk and the ciphertext C to the decryption algorithm D and obtains the same shared key K as that of the transmitting apparatus.

このようにして鍵カプセル化メカニズムを用いて共有鍵Kを送信装置と受信装置とで共有した後に、送信装置は、受信装置ヘ送信すべき平文を、共有鍵Kを用いて共通鍵暗号方式により暗号化して暗号文を生成し、生成した暗号文を受信装置へ送信する。受信装置は、暗号文を受信し、受信した暗号文を共有鍵Kを用いて前記共通鍵暗号方式により復号して復号文を生成する。   After the shared key K is shared between the transmission device and the reception device using the key encapsulation mechanism in this way, the transmission device uses the shared key K to transmit the plaintext to be transmitted to the reception device. The ciphertext is generated by encryption, and the generated ciphertext is transmitted to the receiving device. The receiving device receives the ciphertext and decrypts the received ciphertext using the shared key K by the common key cryptosystem to generate a decrypted text.

鍵カプセル化メカニズムでは、送信者から受信者に一方的に情報の送信が行われていながら、送信者が作為的に共有鍵を作成できず、送信者による不正が抑制されている点が従来にない特徴である。
このような鍵カプセル化メカニズムとして、PSEC−KEMと呼ばれるアルゴリズムが開示されている(例えば非特許文献3、非特許文献4参照)。以下に、非特許文献4に記載されているPSEC−KEMアルゴリズムについて説明する。
In the conventional key encapsulation mechanism, information is unilaterally transmitted from the sender to the receiver, but the sender is not able to create a shared key intentionally. There is no feature.
As such a key encapsulation mechanism, an algorithm called PSEC-KEM has been disclosed (see, for example, Non-Patent Document 3 and Non-Patent Document 4). Below, the PSEC-KEM algorithm described in the nonpatent literature 4 is demonstrated.

(1)PSEC−KEMのシステムパラメータ
PSEC−KEMは、以下のシステムパラメータを持つ。
・楕円曲線:E
・楕円曲線上の位数nの点:P
・ハッシュ関数:G、H
なお、楕円曲線、位数及びハッシュ関数については、非特許文献1に詳細が記述されているので、ここでは説明を省略する。
(1) System parameters of PSEC-KEM PSEC-KEM has the following system parameters.
・ Elliptic curve: E
-A point of order n on an elliptic curve: P
-Hash function: G, H
Note that details of the elliptic curve, the order, and the hash function are described in Non-Patent Document 1, and thus description thereof is omitted here.

(2)PSEC−KEMの公開鍵と秘密鍵
・ランダムにZnの要素xを選び、W=x*Pを生成する。
ここで、Znは、{0,1,...,n−1}からなる集合であり、x*Pは、楕円曲線上の点Pをx個、加算することにより得られる楕円曲線上の点を表す。なお、楕円曲線上の点の加算方法については、非特許文献1に記述されている。
(2) Public key and private key of PSEC-KEM-Select an element x of Zn at random and generate W = x * P.
Here, Zn is {0, 1,. . . , N−1}, and x * P represents a point on the elliptic curve obtained by adding x points P on the elliptic curve. A method for adding points on an elliptic curve is described in Non-Patent Document 1.

・公開鍵pkを(E,P,W,n)とし、秘密鍵skをxとする。
(3)PSEC−KEMの暗号化
暗号化時には、以下に述べる暗号化アルゴリズムKemEに公開鍵pkを入力して共有鍵Kと暗号文Cを出力する。以下に暗号化アルゴリズムKemEについて説明する。
・ハッシュ関数Hの出力ビット長と同じ長さのsをランダムに生成する。
The public key pk is (E, P, W, n), and the secret key sk is x.
(3) Encryption of PSEC-KEM At the time of encryption, the public key pk is input to the encryption algorithm KemE described below, and the shared key K and the ciphertext C are output. The encryption algorithm KemE will be described below.
Generate s having the same length as the output bit length of the hash function H at random.

・G(s)を生成し、G(s)を分割して、aとKとを生成する。aは、G(s)の上位複数ビットからなるビット列であり、Kは、残りのビットからなるビット列である。ここで、G(s)=a||Kである。「||」は、ビット結合を表す演算子である。つまり、aとKとを結合すると、G(s)が得られる。
・R=a*P、Q=a*Wを生成する。
Generate G (s) and divide G (s) to generate a and K. a is a bit string composed of a plurality of upper bits of G (s), and K is a bit string composed of the remaining bits. Here, G (s) = a || K. “||” is an operator representing bit combination. That is, when a and K are combined, G (s) is obtained.
Generate R = a * P, Q = a * W.

・v=s xor H(R||Q)を生成する。ここで、xorは排他的論理和演算を表す。
・共有鍵Kと暗号文C=(R,v)を出力する。
(4)PSEC−KEMの復号化
復号化時には、以下に述べる復号アルゴリズムKemDに暗号文C=(R,v)と公開鍵pkと秘密鍵skを入力して共有鍵Kを出力する。以下に復号アルゴリズムKemDについて説明する。
Generate v = s xor H (R || Q). Here, xor represents an exclusive OR operation.
-Outputs shared key K and ciphertext C = (R, v).
(4) Decryption of PSEC-KEM At the time of decryption, the ciphertext C = (R, v), the public key pk, and the secret key sk are input to the decryption algorithm ChemD described below, and the shared key K is output. The decoding algorithm KemD will be described below.

・Q=x*Rを生成する。
・s=v xor H(R||Q)を生成する。
・G(s)を生成し、G(s)をG(s)=a||Kと分割する。
・R=a*Pが成立するかどうかチェックする。成立すれば共有鍵Kを出力する。
このPSEC−KEMアルゴリズムを、送信装置と受信装置の間で暗号化通信を行う暗号システムに応用する場合、まず、送信装置は、通信先受信装置の公開鍵pkを取得し、取得した公開鍵pkを前述の暗号化アルゴリズムKemEに入力して共有鍵Kと暗号文Cを導出して、暗号文Cを受信装置へ送信する。
Generate Q = x * R.
Generate s = v xor H (R || Q).
Generate G (s) and divide G (s) into G (s) = a || K.
Check whether R = a * P is true. If established, the shared key K is output.
When this PSEC-KEM algorithm is applied to an encryption system that performs encrypted communication between a transmission device and a reception device, the transmission device first acquires the public key pk of the communication destination reception device, and acquires the acquired public key pk. Is input to the encryption algorithm KemE described above, the shared key K and the ciphertext C are derived, and the ciphertext C is transmitted to the receiving device.

次に、受信装置は、送信装置から暗号文Cを受信し、受信した暗号文Cと自身が有する公開鍵pk・秘密鍵skを前述の復号アルゴリズムKemDに入力して、送信装置が導出したものと等しい共有鍵Kを導出する。
以下に、さらに詳細に説明する。
今、PSEC−KEMアルゴリズムは、ハッシュ関数Hの入力を(a*P||a*W)としており、暗号化アルゴリズムKemEで、ランダムに生成した要素sにH(a*P||a*W)の値を作用させてvを生成する。そして、復号アルゴリズムKemDでは、R=a*Pから秘密鍵sk(=x)を用いてQ=x*R=x*(a*P)=a*(x*P)=a*Wを求めることができるので、vにH(a*P||a*W)の値を作用させて、暗号化アルゴリズムKemEにおいて生成されたランダムな要素sを求めることができる。
Next, the receiving device receives the ciphertext C from the transmitting device, inputs the received ciphertext C and its own public key pk / secret key sk to the decryption algorithm KemD, and is derived by the transmitting device. A shared key K equal to is derived.
This will be described in more detail below.
Now, in the PSEC-KEM algorithm, the input of the hash function H is (a * P || a * W), and H (a * P || a * W) is added to the element s randomly generated by the encryption algorithm KemE. ) To generate v. In the decryption algorithm KemD, Q = x * R = x * (a * P) = a * (x * P) = a * W is obtained from R = a * P using the secret key sk (= x). Since the value of H (a * P || a * W) is applied to v, the random element s generated in the encryption algorithm KemE can be obtained.

従って、暗号化アルゴリズムKemEと復号アルゴリズムKemDは、ハッシュ関数Gに同じsの値を入力することができ、同じ共有鍵Kを導出することができる。この結果、秘密鍵skを有する受信装置は、送信装置が導出したものと同じ共有鍵Kを導出できることになる。
一方で、秘密鍵skを知らない他の受信装置は、たとえ公開鍵pkを取得して暗号文Cを受信したとしても、秘密鍵sk(=x)を知らないのでR=a*PからQ=a*W(=(ax)*P)を計算できず、送信装置が導出したものと同じ共有鍵Kを導出できない。
Therefore, the encryption algorithm KemE and the decryption algorithm KemD can input the same value of s to the hash function G, and can derive the same shared key K. As a result, the receiving device having the secret key sk can derive the same shared key K as that derived by the transmitting device.
On the other hand, even if the other receiving device that does not know the secret key sk does not know the secret key sk (= x) even if it obtains the public key pk and receives the ciphertext C, R = a * P to Q = A * W (= (ax) * P) cannot be calculated, and the same shared key K as that derived by the transmitting apparatus cannot be derived.

なぜならば、秘密鍵skを知らない他の受信装置は、公開鍵pkしか利用できないので、上記Qの計算には秘密鍵sk(=x)の代わりに公開鍵pkのW=x*Pを利用することになるが、一般に、a*PとW=x*Pから、Q=a*W(=(ax)*P)を求めることは、楕円曲線上のDiffie−Hellman問題と呼ばれ、aやxの値を知らない限り計算困難だからである(例えば、非特許文献5参照)。   This is because other receiving devices that do not know the secret key sk can use only the public key pk, and therefore, W = x * P of the public key pk is used instead of the secret key sk (= x) for the calculation of Q. However, generally, obtaining Q = a * W (= (ax) * P) from a * P and W = x * P is called Diffie-Hellman problem on an elliptic curve, and a This is because calculation is difficult unless the values of x and x are known (for example, see Non-Patent Document 5).

すなわち、PSEC−KEMアルゴリズムは、秘密鍵を用いずにa*Pからa*Wを計算することが困難なDiffie−Hellman問題を用いて、最終的に共有鍵Kを導出することにより、秘密鍵を知らなければその共有鍵Kを導出できないようにしている。
以上により、送信装置と受信装置とは、共有鍵Kを秘密に共有することができ、この後、秘密鍵暗号を用いて、送信装置から受信装置へ通信される通信内容データを、共有鍵Kを用いて共通鍵暗号で暗号化する。
特開2002−252611号公報 岡本龍明、山本博資、「現代暗号」、シリーズ/情報科学の数学、産業図書、1997. Jeffery Hoffstein, Jill Pipher, and Joseph H. Silverman, ”NTRU: A ring based public key cryptosystem”, Lecture Notes in Computer Science, 1423, pp.267-288, Springer-Verlag, 1998. Victor Shoup, ”A proposal for an ISO standard for public key encryption (version 2.1)”、[online]、2001年12月20日、[2002年9月29日検索]、インターネット<URL: http://shoup.net/papers/iso-2_1.pdf> Tatsuaki Okamoto, ”Generic conversions for constructing IND-CCA2 public-key encryption in the random oracle model”、[online]、The 5th Workshop on Elliptic Curve Cryptography(ECC 2001)、2001年10月30日、[2002年9月29日検索]、インターネット<URL: http://www.cacr.math.uwaterloo.ca/conferences/2001/ecc/okamoto.ppt> Neal Koblitz, ”Algebraic Aspects of Cryptography”, Algorithms and Computation in Mathematics Vol.3, pp.132-133, Springer-Verlag, 1998.
That is, the PSEC-KEM algorithm uses the Diffie-Hellman problem, which is difficult to calculate a * W from a * P without using a secret key, and finally derives the shared key K, thereby If the key is not known, the shared key K cannot be derived.
As described above, the transmission device and the reception device can share the shared key K in a secret manner, and thereafter, the communication content data communicated from the transmission device to the reception device is transferred to the shared key K using secret key encryption. Encrypt using common key encryption.
JP 2002-252611 A Okamoto Tatsuaki, Yamamoto Hiroshi, “Contemporary Cryptography”, Series / Mathematics of Information Science, Industrial Books, 1997. Jeffery Hoffstein, Jill Pipher, and Joseph H. Silverman, “NTRU: A ring based public key cryptosystem”, Lecture Notes in Computer Science, 1423, pp.267-288, Springer-Verlag, 1998. Victor Shoup, “A proposal for an ISO standard for public key encryption (version 2.1)”, [online], December 20, 2001, [searched September 29, 2002], Internet <URL: http: // shoup .net / papers / iso-2_1.pdf> Tatsuaki Okamoto, “Generic conversions for constructing IND-CCA2 public-key encryption in the random oracle model”, [online], The 5th Workshop on Elliptic Curve Cryptography (ECC 2001), October 30, 2001, [September 2002 29 days search], Internet <URL: http://www.cacr.math.uwaterloo.ca/conferences/2001/ecc/okamoto.ppt> Neal Koblitz, “Algebraic Aspects of Cryptography”, Algorithms and Computation in Mathematics Vol.3, pp.132-133, Springer-Verlag, 1998.

上述したように、従来のPSEC−KEMアルゴリズムは、ハッシュ関数Hの入力にa*P,a*Wを用い、秘密鍵を用いずにa*Pからa*Wを計算することが困難なDiffie−Hellman問題を用いて、最終的に共有鍵Kを導出することにより、秘密鍵を知らなければその共有鍵Kを導出できないようにしている。
しかしながら、NTRU暗号をはじめ、Diffie−Hellman問題を利用しない他の公開鍵暗号には、Diffie−Hellman問題のa*P、a*Wに相当するものがないため、PSEC−KEMアルゴリズムを適用できない。すなわち、高速処理が可能なNTRU暗号は、鍵カプセル化メカニズムであるPSEC−KEMアルゴリズムを適用して共有鍵の配送を行うことができず、従って、送信装置と受信装置とは、その共有鍵を用いた送信装置から受信装置への暗号化通信ができないという問題点がある。
As described above, in the conventional PSEC-KEM algorithm, Diffie is difficult to calculate a * W from a * P without using a secret key by using a * P, a * W as the input of the hash function H. -By finally deriving the shared key K using the Hellman problem, the shared key K cannot be derived without knowing the secret key.
However, since there are no NTRU ciphers or other public key ciphers that do not use the Diffie-Hellman problem, the PSEC-KEM algorithm cannot be applied because none of them corresponds to the Diffie-Hellman problem a * P or a * W. That is, the NTRU cipher capable of high-speed processing cannot distribute the shared key by applying the PSEC-KEM algorithm which is a key encapsulation mechanism, and therefore the transmitting device and the receiving device use the shared key. There is a problem that encrypted communication from the used transmitting apparatus to the receiving apparatus is not possible.

そこで、本発明は上記の問題点を解決するために、Diffie−Hellman問題を利用しない暗号化方式を用いる場合であっても、共有鍵生成装置から共有鍵復元装置へ第三者に知られることなく共有鍵を配送し、この際に、共有鍵生成装置と共有鍵復元装置との間で異なる共有鍵が導出されるのを防止できる鍵共有システム、共有鍵生成装置、共有鍵復元装置、共有鍵生成方法、共有鍵復元方法、共有鍵生成プログラム及び共有鍵復元プログラムを提供することを目的とする。   Therefore, in order to solve the above problem, the present invention is known to a third party from the shared key generation device to the shared key recovery device even when an encryption method that does not use the Diffie-Hellman problem is used. A key sharing system, a shared key generation device, a shared key recovery device, and a shared key that can prevent a different shared key from being derived between the shared key generation device and the shared key recovery device An object is to provide a key generation method, a shared key restoration method, a shared key generation program, and a shared key restoration program.

上記目的を達成するために、本発明は、第3者に知られることなく共有鍵を生成する共有鍵生成装置及び共有鍵復元装置から構成される鍵共有システムであって、前記共有鍵生成装置は、シード値を生成するシード値生成手段と、生成された前記シード値から検証値及び共有鍵を生成する第1共有鍵生成手段と、生成された前記検証値を暗号化して、第1暗号化情報を生成する第1暗号化手段と、生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成する第2暗号化手段と、生成された前記第1暗号化情報及び前記第2暗号化情報を送信する送信手段とを備え、前記共有鍵復元装置は、前記第1暗号化情報及び前記第2暗号化情報を受信する受信手段と、受信された前記第1暗号化情報を復号して第1復号検証値を生成する第1復号手段と、生成された前記第1復号検証値に基づいて、受信された前記第2暗号化情報を復号して、復号シード値を生成する第2復号手段と、前記第1共有鍵生成手段と同一の方法により、生成された前記復号シード値から第2復号検証値及び復号共有鍵を生成する第2共有鍵生成手段と、生成された前記第1復号検証値及び前記第2復号検証値に基づいて、生成された前記復号共有鍵を出力するか否かを判断する判断手段と、出力すると判断される場合に、生成された前記復号共有鍵を出力する出力手段とを備える。   In order to achieve the above object, the present invention provides a key sharing system including a shared key generating device and a shared key restoring device that generate a shared key without being known to a third party, and the shared key generating device Includes: a seed value generating unit configured to generate a seed value; a first shared key generating unit configured to generate a verification value and a shared key from the generated seed value; A first encryption unit for generating encrypted information, a second encryption unit for generating second encrypted information by encrypting the generated seed value based on the generated verification value, and Transmission means for transmitting the first encrypted information and the second encrypted information, and the shared key restoration device receives the first encrypted information and the second encrypted information; Decrypting the received first encrypted information A first decryption unit for generating one decryption verification value; and a second decryption unit for decrypting the received second encrypted information based on the generated first decryption verification value to generate a decryption seed value. And second shared key generation means for generating a second decryption verification value and a decryption shared key from the generated decryption seed value by the same method as the first shared key generation means, and the generated first decryption Based on a verification value and the second decryption verification value, a determination means for determining whether or not to output the generated decryption shared key, and output the generated decryption shared key when it is determined to output Output means.

上記の構成によると、前記共有鍵生成装置は、シード値から検証値及び共有鍵を生成し、前記検証値を暗号化して第1暗号化情報を生成し、前記検証値に基づいて、前記シード値を暗号化して第2暗号化情報を生成し、前記共有鍵復元装置は、前記第1暗号化情報を復号して第1復号検証値を生成し、前記第1復号検証値に基づいて、前記第2暗号化情報を復号して、復号シード値を生成し、前記共有鍵生成装置と同様にして、前記復号シード値から第2復号検証値及び復号共有鍵を生成し、生成された前記第1復号検証値及び前記第2復号検証値に基づいて、生成された前記復号共有鍵を出力するか否かを判断するので、共有鍵生成装置から共有鍵復元装置へ第三者に知られることなく共有鍵を配送できると共に、この際に、共有鍵生成装置と共有鍵復元装置との間で異なる共有鍵が導出されるのを防止できるという効果がある。   According to the above configuration, the shared key generation device generates a verification value and a shared key from a seed value, encrypts the verification value to generate first encrypted information, and based on the verification value, the seed Encrypting the value to generate the second encrypted information, the shared key restoration device decrypts the first encrypted information to generate a first decryption verification value, and based on the first decryption verification value, Decrypting the second encryption information to generate a decryption seed value, and generating a second decryption verification value and a decryption shared key from the decryption seed value in the same manner as the shared key generation device, Since it is determined whether to output the generated decryption shared key based on the first decryption verification value and the second decryption verification value, it is known to the third party from the shared key generation device to the shared key restoration device Shared key can be delivered without any There is an effect that it is possible to prevent the different shared keys between the shared-key recovery apparatus is derived and.

ここで、前記共有鍵生成装置は、さらに、コンテンツを取得する取得手段と、生成された前記共有鍵を用いて、取得されたコンテンツを暗号化して、暗号化コンテンツを生成する暗号化手段とを備え、前記送信手段は、さらに、生成された前記暗号化コンテンツを送信し、前記受信手段は、さらに、前記暗号化コンテンツを受信し、前記共有鍵復元装置は、さらに、出力された前記復号共有鍵を用いて、受信された前記暗号化コンテンツを復号して、復号コンテンツを生成する復号手段と、生成された復号コンテンツを出力する出力手段とを備える。   Here, the shared key generation apparatus further includes an acquisition unit for acquiring content, and an encryption unit for generating the encrypted content by encrypting the acquired content using the generated shared key. The transmitting means further transmits the generated encrypted content, the receiving means further receives the encrypted content, and the shared key recovery device further outputs the decrypted shared content. Decryption means for decrypting the received encrypted content using a key to generate decrypted content, and output means for outputting the generated decrypted content.

この構成によると、共有鍵生成装置は、生成された前記共有鍵を用いて、取得されたコンテンツを暗号化して、暗号化コンテンツを生成し、前記共有鍵復元装置は、出力された前記復号共有鍵を用いて、受信された前記暗号化コンテンツを復号して、復号コンテンツを生成するので、第三者に知られることなく、共有鍵生成装置から共有鍵復元装置へコンテンツを送信することができるという効果がある。   According to this configuration, the shared key generation device generates encrypted content by encrypting the acquired content using the generated shared key, and the shared key restoration device outputs the decrypted shared Since the received encrypted content is decrypted using a key to generate decrypted content, the content can be transmitted from the shared key generating device to the shared key restoring device without being known by a third party. There is an effect.

また、本発明は、第3者に知られることなく共有鍵を相手の装置へ伝える共有鍵生成装置であって、シード値を生成するシード値生成手段と、生成された前記シード値から検証値及び共有鍵を生成する共有鍵生成手段と、生成された前記検証値を暗号化して、第1暗号化情報を生成する第1暗号化手段と、生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成する第2暗号化手段と、生成された前記第1暗号化情報及び前記第2暗号化情報を送信する送信手段とを備える。   Further, the present invention is a shared key generation device that transmits a shared key to a partner device without being known to a third party, a seed value generation unit that generates a seed value, and a verification value from the generated seed value And a shared key generating means for generating a shared key, a first encryption means for generating the first encrypted information by encrypting the generated verification value, and a generated based on the generated verification value. A second encryption unit that encrypts the seed value to generate second encryption information; and a transmission unit that transmits the generated first encryption information and the second encryption information.

この構成によると、共有鍵生成装置は、検証値を暗号化して第1暗号化情報を生成し、前記検証値に基づいて、シード値を暗号化して第2暗号化情報を生成するので、二重の暗号化により、より安全性を高めることができるという効果がある。不正な第三者は、第1及び第2暗号化手段による2種の暗号化を知っていなければ、共有鍵を得ることはできない。   According to this configuration, the shared key generating device generates the first encrypted information by encrypting the verification value, and generates the second encrypted information by encrypting the seed value based on the verification value. There is an effect that the security can be further improved by the heavy encryption. An unauthorized third party cannot obtain a shared key unless he / she knows two types of encryption by the first and second encryption means.

ここで、前記シード値生成手段は、乱数を生成し、生成した乱数を前記シード値とすることにより、前記シード値を生成する。
この構成によると、共有鍵生成装置は、乱数を生成し、生成した乱数を前記シード値とするので、シード値を生成し、検証値及び共有鍵を生成し、第1暗号化情報及び第2暗号化情報を生成し、第1暗号化情報及び第2暗号化情報を送信した後、次に、シード値を生成する際に、最初に生成されたシード値とは異なるように、後のシード値を生成することができる。従って、共有鍵生成装置により送信される第1暗号化情報及び第2暗号化情報は、毎回異なるものとなる。このため、不正な第三者が、共有鍵生成装置から相手の装置へ送信される第1暗号化情報及び第2暗号化情報をその都度、盗聴し、記録したとしても、記録している各第1暗号化情報及び第2暗号化情報から元のシード値を類推することは困難である。
Here, the seed value generating means generates a seed value by generating a random number and using the generated random number as the seed value.
According to this configuration, the shared key generation device generates a random number, and uses the generated random number as the seed value. Therefore, the shared key generation device generates a seed value, generates a verification value and a shared key, and generates the first encryption information and the second encryption information. After generating the encryption information and transmitting the first encryption information and the second encryption information, when generating the seed value, the subsequent seed is set to be different from the seed value generated first. A value can be generated. Therefore, the first encryption information and the second encryption information transmitted by the shared key generation device are different each time. For this reason, even if an unauthorized third party intercepts and records the first encryption information and the second encryption information transmitted from the shared key generation device to the partner device, It is difficult to infer the original seed value from the first encrypted information and the second encrypted information.

ここで、前記共有鍵生成手段は、前記シード値に一方向性関数を施して関数値を生成し、生成した前記関数値から前記検証値及び前記共有鍵を生成する。
この構成によると、前記シード値に一方向性関数を施して、前記検証値を生成するので、前記検証値を第三者が知り得たとしても、前記検証値から前記シード値を求めることは困難である。このため、前記検証値からシード値を求め、さらに、共有鍵を求めることは事実上不可能である。
Here, the shared key generation unit generates a function value by applying a one-way function to the seed value, and generates the verification value and the shared key from the generated function value.
According to this configuration, since the verification value is generated by applying a one-way function to the seed value, even if a third party can know the verification value, the seed value is obtained from the verification value. Have difficulty. For this reason, it is practically impossible to obtain a seed value from the verification value and further obtain a shared key.

ここで、前記共有鍵生成手段は、前記シード値に、前記一方向性関数として、ハッシュ関数を施して前記関数値を生成する。
この構成によると、前記一方向性関数は、ハッシュ関数であるので、その演算アルゴリズムがよく知られており、適用が容易である。
ここで、前記共有鍵生成手段は、生成された前記関数値の一部を前記検証値とし、他の一部を前記共有鍵とすることにより、前記検証値及び前記共有鍵を生成する。
Here, the shared key generation unit performs the hash function as the one-way function on the seed value to generate the function value.
According to this configuration, since the one-way function is a hash function, its calculation algorithm is well known and easy to apply.
Here, the shared key generation unit generates the verification value and the shared key by using a part of the generated function value as the verification value and the other part as the shared key.

この構成によると、前記関数値の一部を前記検証値とし、他の一部を前記共有鍵とするので、前記検証値及び前記共有鍵の生成が容易である。
ここで、前記共有鍵生成手段は、前記シード値に一方向性関数を施して関数値を生成し、生成した前記関数値から前記検証値、前記共有鍵及びブラインド値を生成する。
この構成によると、前記シード値に一方向性関数を施して、前記検証値を生成するので、前記検証値を第三者が知り得たとしても、前記検証値から前記シード値を求めることは困難である。このため、前記検証値からシード値を求め、さらに、共有鍵を求めることは事実上不可能である。
According to this configuration, part of the function value is used as the verification value, and the other part is used as the shared key. Therefore, it is easy to generate the verification value and the shared key.
Here, the shared key generation unit generates a function value by applying a one-way function to the seed value, and generates the verification value, the shared key, and a blind value from the generated function value.
According to this configuration, since the verification value is generated by applying a one-way function to the seed value, even if a third party can know the verification value, the seed value is obtained from the verification value. Have difficulty. For this reason, it is practically impossible to obtain a seed value from the verification value and further obtain a shared key.

ここで、前記第1暗号化手段は、公開鍵を取得する公開鍵取得部と、取得された前記公開鍵及び生成された前記ブラインド値を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成する公開鍵暗号化部と含む。
また、前記第1暗号化手段は、公開鍵を取得する公開鍵取得部と、取得された前記公開鍵を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成する公開鍵暗号化部と含む。
Here, the first encryption means performs a public key encryption algorithm on the verification value using the public key acquisition unit that acquires a public key, and the acquired public key and the generated blind value. And a public key encryption unit for generating the first encryption information.
Further, the first encryption means performs a public key encryption algorithm on the verification value by using a public key acquisition unit that acquires a public key and the acquired public key, and converts the first encryption information into the first encryption information. Including a public key encryption unit to be generated.

この構成によると、第1暗号化手段は、公開鍵暗号方式を用いるので、共有鍵暗号方式を用いる場合と比較すると、鍵の管理が容易である。
ここで、前記公開鍵暗号化アルゴリズムは、NTRU暗号方式によるものであり、前記公開鍵取得部は、前記公開鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された公開鍵多項式を取得し、前記公開鍵暗号化部は、前記検証値から検証値多項式を生成し、前記ブラインド値からブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記検証値多項式を攪乱するために前記ブラインド値多項式を用いて、前記検証値多項式を暗号化して、多項式としての前記第1暗号化情報を生成する。
According to this configuration, since the first encryption unit uses a public key cryptosystem, key management is easier than in the case where a shared key cryptosystem is used.
Here, the public key encryption algorithm is based on the NTRU cryptosystem, and the public key acquisition unit acquires a public key polynomial generated by a key generation algorithm of the NTRU cryptosystem as the public key, The public key encryption unit generates a verification value polynomial from the verification value, generates a blind value polynomial from the blind value, and uses the public key polynomial as a key by an encryption algorithm of an NTRU cryptosystem, Using the blind value polynomial to disrupt the polynomial, the verification value polynomial is encrypted to generate the first encrypted information as a polynomial.

また、前記公開鍵暗号化アルゴリズムは、NTRU暗号方式によるものであり、前記公開鍵取得部は、前記公開鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された公開鍵多項式を取得し、前記公開鍵暗号化部は、前記検証値から検証値多項式を生成し、ブラインド値を生成し、生成した前記ブラインド値からブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記検証値多項式を攪乱するために前記ブラインド値多項式を用いて、前記検証値多項式を暗号化して、多項式としての前記第1暗号化情報を生成する。   The public key encryption algorithm is based on the NTRU cryptosystem, and the public key acquisition unit acquires a public key polynomial generated by an NTRU cryptosystem key generation algorithm as the public key, and The key encryption unit generates a verification value polynomial from the verification value, generates a blind value, generates a blind value polynomial from the generated blind value, and uses the NTRU encryption algorithm to convert the public key polynomial Using the blind value polynomial as a key and using the blind value polynomial to disturb the verification value polynomial, the verification value polynomial is encrypted to generate the first encrypted information as a polynomial.

この構成によると、NTRU暗号を採用することができる。
ここで、前記第2暗号化手段は、前記検証値に一方向性関数を施して関数値を生成し、生成した前記関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成する。
この構成によると、前記検証値に一方向性関数を施して得られた関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成するので、不正な第三者は、少なくとも、前記一方向性関数及び前記暗号化アルゴリズムを知っていなければ、前記第2暗号化情報から前記シード値を得ることはできない。
According to this configuration, NTRU encryption can be employed.
Here, the second encryption means generates a function value by applying a one-way function to the verification value, and applies an encryption algorithm to the seed value using the generated function value. Generate encryption information.
According to this configuration, since the second encryption information is generated by applying an encryption algorithm to the seed value using a function value obtained by applying a one-way function to the verification value, an illegal third If the person does not know at least the one-way function and the encryption algorithm, the seed value cannot be obtained from the second encryption information.

ここで、前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして排他的論理和を施すことにより、前記第2暗号化情報を生成する。
この構成によると、前記暗号化アルゴリズムは、排他的論理和であるので、演算が容易である。また、逆演算が可能である。
ここで、前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして共通鍵暗号化アルゴリズムを施すことにより、前記第2暗号化情報を生成する。
Here, the second encryption unit generates the second encryption information by performing an exclusive OR as the encryption algorithm on the generated function value and the seed value.
According to this configuration, since the encryption algorithm is exclusive OR, the calculation is easy. Inverse calculation is also possible.
Here, the second encryption unit generates the second encryption information by applying a common key encryption algorithm as the encryption algorithm to the generated function value and the seed value.

この構成によると、前記暗号化アルゴリズムは、共通鍵暗号化アルゴリズムであるので、よく知られており、適用が容易である。また、逆演算が可能である。
ここで、前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして加算を施すことにより、前記第2暗号化情報を生成する。
この構成によると、前記暗号化アルゴリズムは、加算であるので、演算が容易である。また、逆演算が可能である。
According to this configuration, since the encryption algorithm is a common key encryption algorithm, it is well-known and easy to apply. Inverse calculation is also possible.
Here, the second encryption unit generates the second encryption information by performing addition as the encryption algorithm to the generated function value and the seed value.
According to this configuration, since the encryption algorithm is addition, calculation is easy. Inverse calculation is also possible.

ここで、前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして乗算を施すことにより、前記第2暗号化情報を生成する。
この構成によると、前記暗号化アルゴリズムは、乗算であるので、演算が容易である。また、逆演算が可能である。
ここで、前記第2暗号化手段は、前記検証値に、前記一方向性関数としてハッシュ関数を施して前記関数値を生成する。
Here, the second encryption means generates the second encryption information by multiplying the generated function value and the seed value as the encryption algorithm.
According to this configuration, since the encryption algorithm is multiplication, calculation is easy. Inverse calculation is also possible.
Here, the second encryption unit performs the hash function as the one-way function on the verification value to generate the function value.

この構成によると、前記一方向性関数は、ハッシュ関数であるので、その演算アルゴリズムがよく知られており、適用が容易である。
ここで、前記第2暗号化手段は、前記検証値を用いて、前記シード値に暗号化アルゴリズムを施して第2暗号化情報を生成する。
この構成によると、前記検証値を用いて、前記シード値に暗号化アルゴリズムを施すので、演算が単純であり、適用が容易である。
According to this configuration, since the one-way function is a hash function, its calculation algorithm is well known and easy to apply.
Here, the second encryption means generates an encryption information by applying an encryption algorithm to the seed value using the verification value.
According to this configuration, since the verification algorithm is used to apply an encryption algorithm to the seed value, the calculation is simple and easy to apply.

ここで、前記第2暗号化手段は、前記検証値及び前記第1暗号化情報を用いて、前記シード値を暗号化する。
この構成によると、前記検証値及び前記第1暗号化情報を用いて、前記シード値を暗号化するので、不正な第三者は、前記検証値及び前記第1暗号化情報を知らなければ、シード値を得ることができず、安全性が高まる。
Here, the second encryption unit encrypts the seed value using the verification value and the first encryption information.
According to this configuration, since the seed value is encrypted using the verification value and the first encrypted information, an unauthorized third party does not know the verification value and the first encrypted information, The seed value cannot be obtained, and safety is increased.

ここで、前記第2暗号化手段は、前記検証値及び前記第1暗号化情報に一方向性関数を施して関数値を生成し、生成した前記関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成する。
この構成によると、一方向性関数と暗号化アルゴリズムとを用いるので、不正な第三者は、第1暗号化情報及び第2暗号化情報を知っていても、少なくとも一方向性関数と暗号化アルゴリズムとを知らなければ、シード値を得ることができず、安全性が高まる。
Here, the second encryption means generates a function value by applying a one-way function to the verification value and the first encryption information, and encrypts the seed value using the generated function value. An algorithm is applied to generate the second encrypted information.
According to this configuration, since the one-way function and the encryption algorithm are used, even if an unauthorized third party knows the first encryption information and the second encryption information, at least the one-way function and the encryption function are used. If the algorithm is not known, the seed value cannot be obtained, and safety is increased.

ここで、前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして排他的論理和を施すことにより、前記第2暗号化情報を生成する。
この構成によると、前記暗号化アルゴリズムは、排他的論理和であるので、演算が容易である。また、逆演算が可能である。
ここで、前記共有鍵生成装置は、さらに、コンテンツを取得する取得手段と、生成された前記共有鍵を用いて、取得されたコンテンツを暗号化して、暗号化コンテンツを生成する暗号化手段とを備え、前記送信手段は、さらに、生成された前記暗号化コンテンツを送信する。
Here, the second encryption unit generates the second encryption information by performing an exclusive OR as the encryption algorithm on the generated function value and the seed value.
According to this configuration, since the encryption algorithm is exclusive OR, the calculation is easy. Inverse calculation is also possible.
Here, the shared key generation apparatus further includes an acquisition unit for acquiring content, and an encryption unit for generating the encrypted content by encrypting the acquired content using the generated shared key. The transmission means further transmits the generated encrypted content.

この構成によると、共有鍵生成装置は、第三者に知られることなく、コンテンツを相手の装置へ送信することができる。
ここで、第3者に知られることなく共有鍵生成装置から共有鍵を受け取る共有鍵復元装置であって、前記共有鍵生成装置は、シード値を生成し、生成された前記シード値から検証値及び共有鍵を生成し、生成された前記検証値を暗号化して、第1暗号化情報を生成し、生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成し、生成された前記第1暗号化情報及び前記第2暗号化情報を送信し、前記共有鍵復元装置は、前記第1暗号化情報及び前記第2暗号化情報を受信する受信手段と、受信された前記第1暗号化情報を復号して第1復号検証値を生成する第1復号手段と、生成された前記第1復号検証値に基づいて、受信された前記第2暗号化情報を復号して、復号シード値を生成する第2復号手段と、前記共有鍵生成装置と同一の方法により、生成された前記復号シード値から第2復号検証値及び復号共有鍵を生成する共有鍵生成手段と、生成された前記第1復号検証値及び前記第2復号検証値に基づいて、生成された前記復号共有鍵を出力するか否かを判断する判断手段と、出力すると判断される場合に、生成された前記復号共有鍵を出力する出力手段とを備える。
According to this configuration, the shared key generation device can transmit the content to the other device without being known to a third party.
Here, it is a shared key restoration device that receives a shared key from a shared key generation device without being known to a third party, the shared key generation device generates a seed value, and a verification value from the generated seed value And generating a shared key, encrypting the generated verification value, generating first encrypted information, encrypting the generated seed value based on the generated verification value, and Generate encrypted information, transmit the generated first encrypted information and the second encrypted information, and the shared key restoration device receives the first encrypted information and the second encrypted information Receiving means; first decryption means for decrypting the received first encrypted information to generate a first decryption verification value; and receiving the second decryption based on the generated first decryption verification value. A second decryptor that decrypts the encrypted information and generates a decryption seed value And a shared key generation means for generating a second decryption verification value and a decryption shared key from the generated decryption seed value by the same method as the shared key generation device, the generated first decryption verification value and the A determination unit that determines whether or not to output the generated decryption shared key based on a second decryption verification value; and an output unit that outputs the generated decryption shared key when it is determined to output. Is provided.

この構成によると、共有鍵生成装置から第三者に知られることなく共有鍵を受信できると共に、この際に、共有鍵生成装置と共有鍵復元装置との間で異なる共有鍵が導出されるのを防止できるという効果がある。
ここで、前記共有鍵生成装置は、公開鍵を取得し、取得された前記公開鍵を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成し、前記第1復号手段は、前記公開鍵に対応する秘密鍵を取得する秘密鍵取得部と、取得された前記秘密鍵を用いて、受信した前記第1暗号化情報に、前記公開鍵暗号化アルゴリズムに対応する公開鍵復号アルゴリズムを施して前記第1復号検証値を生成する公開鍵復号部と含む。
According to this configuration, a shared key can be received from a shared key generation device without being known to a third party, and at this time, a different shared key is derived between the shared key generation device and the shared key restoration device. There is an effect that can be prevented.
Here, the shared key generation device acquires a public key, generates a first encryption information by applying a public key encryption algorithm to the verification value using the acquired public key, and 1 decryption means corresponds to the public key encryption algorithm in the received first encryption information using a secret key acquisition unit that acquires a secret key corresponding to the public key and the acquired secret key And a public key decryption unit that applies the public key decryption algorithm to generate the first decryption verification value.

この構成によると、第1復号手段は、公開鍵暗号方式を用いるので、共有鍵暗号方式を用いる場合と比較すると、鍵の管理が容易である。
ここで、前記公開鍵暗号化アルゴリズム及び前記公開鍵復号アルゴリズムは、NTRU暗号方式によるものであり、前記共有鍵生成装置は、前記公開鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された公開鍵多項式を取得し、前記検証値から検証値多項式を生成し、ブラインド値を生成し、生成した前記ブラインド値からブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記検証値多項式を攪乱するために前記ブラインド値多項式を用いて、前記検証値多項式を暗号化して、多項式としての前記第1暗号化情報を生成し、前記受信手段は、多項式としての前記第1暗号化情報を受信し、前記秘密鍵取得部は、前記秘密鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された秘密鍵多項式を取得し、前記公開鍵復号部は、NTRU暗号方式の前記暗号化アルゴリズムに対応する復号アルゴリズムにより、前記秘密鍵多項式を鍵として用いて、多項式としての前記第1暗号化情報を復号して、復号検証値多項式を生成し、生成した前記復号検証値多項式から前記第1復号検証値を生成する。
According to this configuration, since the first decryption unit uses a public key cryptosystem, key management is easier than in the case where a shared key cryptosystem is used.
Here, the public key encryption algorithm and the public key decryption algorithm are based on the NTRU encryption method, and the shared key generation device uses the public key generated by the key generation algorithm of the NTRU encryption method as the public key. A polynomial is obtained, a verification value polynomial is generated from the verification value, a blind value is generated, a blind value polynomial is generated from the generated blind value, and the public key polynomial is keyed by an encryption algorithm of the NTRU cryptosystem. And using the blind value polynomial to disrupt the verification value polynomial, encrypting the verification value polynomial to generate the first encrypted information as a polynomial, and the receiving means as a polynomial The first encryption information is received, and the secret key acquisition unit uses the NTRU encryption key generation algorithm as the secret key. The public key decryption unit obtains a secret key polynomial generated by a gothism, and the public key decryption unit uses the secret key polynomial as a key by the decryption algorithm corresponding to the encryption algorithm of the NTRU cryptosystem, and the first as a polynomial The encrypted information is decrypted to generate a decryption verification value polynomial, and the first decryption verification value is generated from the generated decryption verification value polynomial.

この構成によると、NTRU暗号を採用することができる。
ここで、前記共有鍵生成装置は、前記検証値に一方向性関数を施して関数値を生成し、生成した前記関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成し、前記第2復号手段は、生成された前記第1復号検証値に、前記一方向性関数を施して復号関数値を生成し、生成した前記復号関数値を用いて、受信された前記第2暗号化情報に、前記暗号化アルゴリズムに対応する復号アルゴリズムを施して前記復号シード値を生成する。
According to this configuration, NTRU encryption can be employed.
Here, the shared key generation device generates a function value by applying a one-way function to the verification value, and applies an encryption algorithm to the seed value by using the generated function value. The second decoding means generates a decoding function value by applying the one-way function to the generated first decoding verification value, and receives the generated decoding function value using the generated decoding function value. The decrypted seed value is generated by applying a decryption algorithm corresponding to the encryption algorithm to the second encrypted information.

この構成によると、第2復号手段は、一方向性関数及び復号アルゴリズムの2段階による演算方法を採用しているので、不正な第三者は、第1暗号化情報及び第2暗号化情報を知っていても、少なくとも一方向性関数と復号アルゴリズムとを知らなければ、シード値を得ることができず、安全性が高まる。
ここで、前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして排他的論理和を施すことにより、前記第2暗号化情報を生成し、前記第2復号手段は、生成した前記復号関数値と前記第2暗号化情報とに、前記復号アルゴリズムとして排他的論理和を施すことにより、前記復号シード値を生成する。
According to this configuration, since the second decryption means employs a two-stage calculation method of a one-way function and a decryption algorithm, an unauthorized third party can obtain the first encrypted information and the second encrypted information. Even if it is known, if at least the one-way function and the decoding algorithm are not known, the seed value cannot be obtained, and safety is increased.
Here, the shared key generation device generates the second encryption information by performing an exclusive OR as the encryption algorithm on the generated function value and the seed value, and generates the second decryption information. The means generates the decryption seed value by performing an exclusive OR as the decryption algorithm on the generated decryption function value and the second encryption information.

この構成によると、前記復号アルゴリズムは、排他的論理和であるので、演算が容易である。また、前記暗号化アルゴリズムの逆演算である。
ここで、前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして共通鍵暗号化アルゴリズムを施すことにより、前記第2暗号化情報を生成し、前記第2復号手段は、生成した前記復号関数値と前記第2暗号化情報とに、前記復号アルゴリズムとして、前記共通鍵暗号化アルゴリズムに対応する共通鍵復号アルゴリズムを施すことにより、前記復号シード値を生成する。
According to this configuration, since the decoding algorithm is exclusive OR, the calculation is easy. Further, it is an inverse operation of the encryption algorithm.
Here, the shared key generation apparatus generates the second encryption information by applying a common key encryption algorithm as the encryption algorithm to the generated function value and the seed value, and generates the second encryption information. The decrypting means generates the decryption seed value by applying a common key decryption algorithm corresponding to the common key encryption algorithm as the decryption algorithm to the generated decryption function value and the second encryption information. .

この構成によると、前記復号アルゴリズムは、共有鍵復号アルゴリズムであるので、よく知られており、適用が容易である。また、前記暗号化アルゴリズムの逆演算である。
ここで、前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして加算を施すことにより、前記第2暗号化情報を生成し、前記第2復号手段は、生成した前記復号関数値と前記第2暗号化情報とに、前記復号アルゴリズムとして、減算を施すことにより、前記復号シード値を生成する。
According to this configuration, since the decryption algorithm is a shared key decryption algorithm, it is well known and easy to apply. Further, it is an inverse operation of the encryption algorithm.
Here, the shared key generation device generates the second encryption information by adding the generated function value and the seed value as the encryption algorithm, and the second decryption unit includes: The decryption seed value is generated by subtracting the generated decryption function value and the second encryption information as the decryption algorithm.

この構成によると、前記復号アルゴリズムは、減算であるので、演算が容易である。また、前記暗号化アルゴリズムの逆演算である。
ここで、前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして乗算を施すことにより、前記第2暗号化情報を生成し、前記第2復号手段は、生成した前記復号関数値と前記第2暗号化情報とに、前記復号アルゴリズムとして、除算を施すことにより、前記復号シード値を生成する。
According to this configuration, since the decoding algorithm is subtraction, the calculation is easy. Further, it is an inverse operation of the encryption algorithm.
Here, the shared key generation device generates the second encryption information by multiplying the generated function value and the seed value as the encryption algorithm, and the second decryption means includes: The decryption seed value is generated by subjecting the generated decryption function value and the second encrypted information to division as the decryption algorithm.

この構成によると、前記復号アルゴリズムは、除算であるので、演算が容易である。また、前記暗号化アルゴリズムの逆演算である。
ここで、前記共有鍵生成装置は、前記検証値に、前記一方向性関数としてハッシュ関数を施して前記関数値を生成し、前記第2復号手段は、生成された前記第1復号検証値に、前記一方向性関数として前記ハッシュ関数を施して前記復号関数値を生成する。
According to this configuration, since the decoding algorithm is division, the calculation is easy. Further, it is an inverse operation of the encryption algorithm.
Here, the shared key generation device generates a function value by applying a hash function as the one-way function to the verification value, and the second decryption means adds the generated decryption value to the first decryption verification value. The hash function is applied as the one-way function to generate the decryption function value.

この構成によると、前記一方向性関数は、ハッシュ関数であるので、その演算アルゴリズムがよく知られており、適用が容易である。
ここで、前記共有鍵生成装置は、前記検証値を用いて、前記シード値に暗号化アルゴリズムを施して第2暗号化情報を生成し、前記第2復号手段は、生成された前記第1復号検証値を用いて、前記第2暗号化情報に、前記暗号化アルゴリズムに対応する復号アルゴリズムを施して、前記復号シード値を生成する。
According to this configuration, since the one-way function is a hash function, its calculation algorithm is well known and easy to apply.
Here, the shared key generation apparatus generates second encrypted information by applying an encryption algorithm to the seed value using the verification value, and the second decryption means generates the generated first decryption Using the verification value, the decryption algorithm corresponding to the encryption algorithm is applied to the second encryption information to generate the decryption seed value.

この構成によると、第1復号検証値を用いて、第2暗号化情報を復号するので、演算が容易である。
ここで、前記共有鍵生成装置は、前記検証値及び前記第1暗号化情報を用いて、前記シード値を暗号化し、前記第2復号手段は、生成された前記第1復号検証値及び受信された前記第1暗号化情報を用いて、前記第2暗号化情報を復号して前記復号シード値を生成する。
According to this configuration, since the second encrypted information is decrypted using the first decryption verification value, the calculation is easy.
Here, the shared key generation device encrypts the seed value using the verification value and the first encryption information, and the second decryption means receives the generated first decryption verification value and the received first decryption verification value. The second encrypted information is decrypted using the first encrypted information to generate the decryption seed value.

この構成によると、第1復号検証値及び第1暗号化情報を用いて、第2暗号化情報を復号するので、不正な第三者は、前記第1復号検証値及び前記第1暗号化情報を知らなければ、シード値を得ることができず、安全性が高まる。
ここで、前記共有鍵生成装置は、前記検証値及び前記第1暗号化情報に一方向性関数を施して関数値を生成し、生成した前記関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成し、前記第2復号手段は、前記第1復号検証値及び前記第1暗号化情報に前記一方向性関数を施して復号関数値を生成し、生成した前記復号関数値を用いて、前記第2暗号化情報に、前記暗号化アルゴリズムに対応する復号アルゴリズムを施して、前記復号シード値を生成する。
According to this configuration, since the second encrypted information is decrypted using the first decryption verification value and the first encryption information, an unauthorized third party can use the first decryption verification value and the first encryption information. If it is not known, the seed value cannot be obtained, and safety is improved.
Here, the shared key generation device generates a function value by applying a one-way function to the verification value and the first encryption information, and uses the generated function value to generate an encryption algorithm for the seed value. To generate the second encrypted information, and the second decryption means generates the decryption function value by applying the one-way function to the first decryption verification value and the first encrypted information. Using the decryption function value, the decryption algorithm corresponding to the encryption algorithm is applied to the second encryption information to generate the decryption seed value.

この構成によると、第2復号手段は、一方向性関数及び復号アルゴリズムの2段階による演算方法を採用しているので、不正な第三者は、第1暗号化情報及び第2暗号化情報を知っていても、少なくとも一方向性関数と復号アルゴリズムとを知らなければ、シード値を得ることができず、安全性が高まる。
ここで、前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして排他的論理和を施すことにより、前記第2暗号化情報を生成し、前記第2復号手段は、前記復号関数値及び前記第2暗号化情報に、前記復号アルゴリズムとして、排他的論理和を施すことにより、前記復号シード値を生成する。
According to this configuration, since the second decryption means employs a two-stage calculation method of a one-way function and a decryption algorithm, an unauthorized third party can obtain the first encrypted information and the second encrypted information. Even if it is known, if at least the one-way function and the decoding algorithm are not known, the seed value cannot be obtained, and safety is increased.
Here, the shared key generation device generates the second encryption information by performing an exclusive OR as the encryption algorithm on the generated function value and the seed value, and generates the second decryption information. The means generates the decryption seed value by performing an exclusive OR as the decryption algorithm on the decryption function value and the second encryption information.

この構成によると、前記復号アルゴリズムは、排他的論理和であるので、演算が容易である。また、前記暗号化アルゴリズムの逆演算である。
ここで、前記共有鍵生成装置は、前記シード値に一方向性関数を施して関数値を生成し、生成した前記関数値から前記検証値及び前記共有鍵を生成し、前記共有鍵生成手段は、生成された前記復号シード値に、前記一方向性関数を施して復号関数値を生成し、生成した前記復号関数値から前記第2復号検証値及び前記復号共有鍵を生成する。
According to this configuration, since the decoding algorithm is exclusive OR, the calculation is easy. Further, it is an inverse operation of the encryption algorithm.
Here, the shared key generation device generates a function value by applying a one-way function to the seed value, generates the verification value and the shared key from the generated function value, and the shared key generation means A decryption function value is generated by applying the one-way function to the generated decryption seed value, and the second decryption verification value and the decryption shared key are generated from the generated decryption function value.

この構成によると、前記復号シード値に一方向性関数を施して、前記第2復号検証値を生成するので、前記第2復号検証値を第三者が知り得たとしても、前記第2復号検証値から前記シード値を求めることは困難である。このため、前記第2復号検証値からシード値を求め、さらに、共有鍵を求めることは事実上不可能である。
ここで、前記共有鍵生成装置は、前記シード値に、前記一方向性関数として、ハッシュ関数を施して前記関数値を生成し、前記共有鍵生成手段は、生成された前記復号シード値に、前記一方向性関数として、前記ハッシュ関数を施して前記復号関数値を生成する。
According to this configuration, since the second decoding verification value is generated by performing a one-way function on the decoding seed value, the second decoding verification value can be obtained even if a third party can know the second decoding verification value. It is difficult to obtain the seed value from the verification value. For this reason, it is practically impossible to obtain the seed value from the second decryption verification value and further obtain the shared key.
Here, the shared key generation device generates the function value by applying a hash function as the one-way function to the seed value, and the shared key generation unit generates the decrypted seed value The decryption function value is generated by applying the hash function as the one-way function.

この構成によると、前記一方向性関数は、ハッシュ関数であるので、その演算アルゴリズムがよく知られており、適用が容易である。
ここで、前記共有鍵生成装置は、生成された前記関数値の一部を前記検証値とし、他の一部を前記共有鍵とすることにより、前記検証値及び前記共有鍵を生成し、前記共有鍵生成手段は、生成された前記復号関数値の一部を前記第2復号検証値とし、他の一部を前記復号共有鍵とすることにより、前記第2復号検証値及び前記復号共有鍵を生成する。
According to this configuration, since the one-way function is a hash function, its calculation algorithm is well known and easy to apply.
Here, the shared key generation device generates the verification value and the shared key by using a part of the generated function value as the verification value and the other part as the shared key, The shared key generating means sets the second decryption verification value and the decryption shared key by using a part of the generated decryption function value as the second decryption verification value and the other part as the decryption shared key. Is generated.

この構成によると、前記復号関数値の一部を前記第2復号検証値とし、他の一部を前記復号共有鍵とするので、前記第2復号検証値及び前記復号共有鍵の生成が容易である。
ここで、前記共有鍵生成装置は、前記シード値に一方向性関数を施して関数値を生成し、生成した前記関数値から前記検証値、前記共有鍵及びブラインド値を生成し、公開鍵を取得し、取得された前記公開鍵及び生成された前記ブラインド値を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成し、前記共有鍵生成手段は、生成された前記復号シード値に、前記一方向性関数を施して復号関数値を生成し、生成した前記復号関数値から前記第2復号検証値、前記復号共有鍵及び復号ブラインド値を生成する。
According to this configuration, since a part of the decryption function value is the second decryption verification value and the other part is the decryption shared key, it is easy to generate the second decryption verification value and the decryption shared key. is there.
Here, the shared key generation device generates a function value by applying a one-way function to the seed value, generates the verification value, the shared key, and a blind value from the generated function value, and generates a public key. Using the acquired public key and the generated blind value, the verification value is subjected to a public key encryption algorithm to generate the first encrypted information, and the shared key generating means generates The decryption seed value is subjected to the one-way function to generate a decryption function value, and the second decryption verification value, the decryption shared key, and the decryption blind value are generated from the generated decryption function value.

この構成によると、前記復号シード値に一方向性関数を施して、前記第2復号検証値を生成するので、前記第2復号検証値を第三者が知り得たとしても、前記第2復号検証値から前記シード値を求めることは困難である。このため、前記第2復号検証値からシード値を求め、さらに、共有鍵を求めることは事実上不可能である。
ここで、前記共有鍵生成装置は、公開鍵を取得し、取得された前記公開鍵及び生成された前記ブラインド値を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成し、前記判断手段は、前記第1復号検証値及び前記第2復号検証値に基づく前記判断に代えて、前記公開鍵を取得する公開鍵取得部と、取得された前記公開鍵及び生成された前記復号ブラインド値を用いて、生成された前記第1復号検証値又は前記第2復号検証値に前記公開鍵暗号化アルゴリズムを施して再暗号化情報を生成する再暗号化部と、受信された前記第1暗号化情報及び生成された前記再暗号化情報に基づいて、生成された前記復号共有鍵を出力するか否かを判断する判断部とを備える。
According to this configuration, since the second decoding verification value is generated by performing a one-way function on the decoding seed value, the second decoding verification value can be obtained even if a third party can know the second decoding verification value. It is difficult to obtain the seed value from the verification value. For this reason, it is practically impossible to obtain the seed value from the second decryption verification value and further obtain the shared key.
Here, the shared key generation device acquires a public key, performs a public key encryption algorithm on the verification value using the acquired public key and the generated blind value, and performs the first encryption Generating information, the determination means, instead of the determination based on the first decryption verification value and the second decryption verification value, a public key acquisition unit that acquires the public key, and the acquired public key and A re-encryption unit that generates re-encrypted information by applying the public key encryption algorithm to the generated first decryption verification value or the second decryption verification value using the generated decryption blind value; A determination unit configured to determine whether or not to output the generated decryption shared key based on the received first encryption information and the generated re-encryption information.

この構成によると、受信された前記第1暗号化情報及び生成された前記再暗号化情報に基づいて、生成された前記復号共有鍵を出力するか否かを判断するので、共有鍵生成装置から第三者に知られることなく共有鍵を受信できると共に、この際に、共有鍵生成装置と共有鍵復元装置との間で異なる共有鍵が導出されるのを防止できるという効果がある。
ここで、前記判断部は、前記第1暗号化情報と前記再暗号化情報とを比較し、前記第1暗号化情報と前記再暗号化情報とが一致する場合に、前記復号共有鍵を出力すると判断する。また、前記判断手段は、前記第1復号検証値と前記第2復号検証値とを比較し、一致する場合に、前記復号共有鍵を出力すると判断する。
According to this configuration, since it is determined whether to output the generated decryption shared key based on the received first encryption information and the generated re-encryption information, from the shared key generation device The shared key can be received without being known to a third party, and at this time, it is possible to prevent different shared keys from being derived between the shared key generating device and the shared key restoring device.
Here, the determination unit compares the first encrypted information and the re-encrypted information, and outputs the decryption shared key when the first encrypted information and the re-encrypted information match. Judge that. The determination means compares the first decryption verification value and the second decryption verification value, and determines that the decryption shared key is output if they match.

この構成によると、第1暗号化情報と再暗号化情報とが一致する場合に、復号共有鍵を出力するので、復号共有鍵を出力するか否かの判断が確実に行える。
ここで、前記公開鍵暗号化アルゴリズムは、NTRU暗号方式によるものであり、前記共有鍵生成装置は、前記公開鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された公開鍵多項式を取得し、前記検証値から検証値多項式を生成し、前記ブラインド値からブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記検証値多項式を攪乱するために前記ブラインド値多項式を用いて、前記検証値多項式を暗号化して、多項式としての前記第1暗号化情報を生成し、前記公開鍵取得部は、前記公開鍵多項式を取得し、前記再暗号化部は、前記第2復号検証値から復号検証値多項式を生成し、前記復号ブラインド値から復号ブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記復号検証値多項式を攪乱するために前記復号ブラインド値多項式を用いて、前記復号検証値多項式を暗号化して、多項式としての前記再暗号化情報を生成する。
According to this configuration, since the decryption shared key is output when the first encrypted information and the re-encrypted information match, it is possible to reliably determine whether to output the decrypted shared key.
Here, the public key encryption algorithm is based on the NTRU cryptosystem, and the shared key generation apparatus acquires, as the public key, a public key polynomial generated by an NTRU cryptosystem key generation algorithm, A verification value polynomial is generated from the verification value, a blind value polynomial is generated from the blind value, and the public key polynomial is used as a key by an encryption algorithm of the NTRU cryptosystem, and the blind value is disturbed by the verification value polynomial. The verification value polynomial is encrypted using a value polynomial to generate the first encryption information as a polynomial, the public key acquisition unit acquires the public key polynomial, and the re-encryption unit includes: Generating a decryption verification value polynomial from the second decryption verification value; generating a decryption blind value polynomial from the decryption blind value; and The decryption verification value polynomial is encrypted using the public key polynomial as a key, and the decryption blind value polynomial is used to disturb the decryption verification value polynomial. Generate information.

この構成によると、NTRU暗号を採用することができる。
ここで、前記共有鍵生成装置は、さらに、コンテンツを取得し、生成された前記共有鍵を用いて、取得されたコンテンツを暗号化して、暗号化コンテンツを生成し、生成された前記暗号化コンテンツを送信し、前記受信手段は、さらに、前記暗号化コンテンツを受信し、前記共有鍵復元装置は、さらに、出力された前記復号共有鍵を用いて、受信された前記暗号化コンテンツを復号して、復号コンテンツを生成する復号手段と、生成された復号コンテンツを出力する出力手段とを備える。
According to this configuration, NTRU encryption can be employed.
Here, the shared key generation device further acquires content, encrypts the acquired content using the generated shared key, generates encrypted content, and generates the encrypted content And the receiving means further receives the encrypted content, and the shared key restoration device further decrypts the received encrypted content using the output shared decryption key. A decrypting unit for generating the decrypted content and an output unit for outputting the generated decrypted content.

この構成によると、共有鍵生成装置は、生成された前記共有鍵を用いて、取得されたコンテンツを暗号化して、暗号化コンテンツを生成し、前記共有鍵復元装置は、出力された前記復号共有鍵を用いて、受信された前記暗号化コンテンツを復号して、復号コンテンツを生成するので、第三者に知られることなく、共有鍵生成装置から共有鍵復元装置へコンテンツを送信することができるという効果がある。   According to this configuration, the shared key generation device generates encrypted content by encrypting the acquired content using the generated shared key, and the shared key restoration device outputs the decrypted shared Since the received encrypted content is decrypted using a key to generate decrypted content, the content can be transmitted from the shared key generating device to the shared key restoring device without being known by a third party. There is an effect.

1.実施の形態1
本発明に係る1個の実施の形態としてのコンテンツ配信システム10について説明する。コンテンツ配信システム10は、NTRU暗号を用いて鍵カプセル化メカニズムによる鍵配送を行って暗号化通信を行う暗号通信システムである。
1.1 NTRU暗号方式
コンテンツ配信システム10において用いるNTRU暗号方式について簡単に説明する。NTRU暗号方式は、多項式の演算を用いて暗号化と復号化とを行う公開鍵暗号方式である。
1. Embodiment 1
A content distribution system 10 as one embodiment according to the present invention will be described. The content distribution system 10 is an encryption communication system that performs encrypted communication by performing key distribution using a key encapsulation mechanism using NTRU encryption.
1.1 NTRU Encryption Method The NTRU encryption method used in the content distribution system 10 will be briefly described. The NTRU cryptosystem is a public key cryptosystem that performs encryption and decryption using polynomial operations.

なお、NTRU暗号方式及びNTRU暗号方式における公開鍵と秘密鍵との生成方法については、非特許文献2に詳しく述べられている。
(1)NTRU暗号方式のシステムパラメータ
NTRU暗号方式においては、整数のシステムパラメータ、N、p、qが存在し、後述する暗号装置及び復号装置は、これらのシステムパラメータを有している。
Note that the public key and secret key generation method in the NTRU cryptosystem and the NTRU cryptosystem are described in detail in Non-Patent Document 2.
(1) System parameters of NTRU encryption method In the NTRU encryption method, there are integer system parameters, N, p, and q, and an encryption device and a decryption device described later have these system parameters.

上記文献には、システムパラメータの例として、(N,p,q)=(107,3,64)、(N,p,q)=(167,3,128)、(N,p,q)=(503,3,256)の3つの例が挙げられている。
以降、本実施の形態では、システムパラメータN=167として、説明を行う。
(2)NTRU暗号方式の多項式演算
NTRU暗号方式は、上述したように、多項式の演算により暗号化と復号化を行う公開鍵暗号方式である。
In the above document, as examples of system parameters, (N, p, q) = (107, 3, 64), (N, p, q) = (167, 3, 128), (N, p, q) Three examples are given: = (503,3,256).
Hereinafter, in the present embodiment, description will be made assuming that the system parameter N = 167.
(2) Polynomial operation of NTRU cryptosystem The NTRU cryptosystem is a public key cryptosystem that performs encryption and decryption by polynomial operations as described above.

NTRU暗号方式で扱う多項式は、上記システムパラメータNに対し、N−1次元以下の多項式である。例えば、N=5のとき、X^4+X^3+1等の多項式である。ここで、「X^a」はXのa乗を意味することとする。
また、暗号化時又は復号化時に用いる公開鍵h、秘密鍵f、平文m、乱数r、暗号文cはいずれも、N−1次元以下の多項式として表現される(以降、それぞれを公開鍵多項式h、秘密鍵多項式f、平文多項式m、乱数多項式r、暗号文多項式cと呼ぶ)。
A polynomial handled in the NTRU cryptosystem is a polynomial of N-1 dimensions or less with respect to the system parameter N. For example, when N = 5, it is a polynomial such as X ^ 4 + X ^ 3 + 1. Here, “X ^ a” means X to the power of a.
Also, the public key h, the secret key f, the plaintext m, the random number r, and the ciphertext c used at the time of encryption or decryption are all expressed as polynomials of N−1 dimensions or less (hereinafter referred to as public key polynomials). h, secret key polynomial f, plaintext polynomial m, random number polynomial r, and ciphertext polynomial c).

多項式演算において、上記システムパラメータNに対し、関係式X^N=1を用いて、演算結果が常にN−1次元以下の多項式になるように演算される。
例えば、N=5の場合、多項式X^4+X^2+1と多項式X^3+Xの積は、多項式と多項式の積を×、整数と多項式の積を・とすると、X^5=1という関係から、
(X^4+X^2+1)×(X^3+X)
=X^7+2・X^5+2・X^3+X
=X^2×1+2・1+2・X^3+X
=2・X^3+X^2+X+2
となる。
In the polynomial calculation, the relational expression X ^ N = 1 is used for the system parameter N so that the calculation result is always a polynomial of N-1 dimensions or less.
For example, in the case of N = 5, the product of the polynomial X ^ 4 + X ^ 2 + 1 and the polynomial X ^ 3 + X is represented by the relationship of X ^ 5 = 1 when the product of the polynomial and the polynomial is x and the product of the integer and the polynomial is.
(X ^ 4 + X ^ 2 + 1) × (X ^ 3 + X)
= X ^ 7 + 2, X ^ 5 + 2, X ^ 3 + X
= X ^ 2 × 1 + 2 ・ 1 + 2 ・ X ^ 3 + X
= 2 · X ^ 3 + X ^ 2 + X + 2
It becomes.

このように、多項式演算において、常にN−1次元以下の多項式になるように演算される。
(3)NTRU暗号方式の暗号化
後述する暗号装置は、次に示すようにNTRU暗号方式の暗号化を行う。
暗号化時には、以下に述べる乱数多項式rと公開鍵多項式hとを用いて、平文多項式mに多項式演算である暗号化アルゴリズムEを施して、
暗号文多項式c=E(m,r,h)を生成する。
In this way, in the polynomial calculation, the calculation is always performed so that the polynomial has N-1 dimensions or less.
(3) NTRU encryption method encryption The encryption device described later performs NTRU encryption method encryption as follows.
At the time of encryption, the plaintext polynomial m is subjected to an encryption algorithm E that is a polynomial operation using a random number polynomial r and a public key polynomial h described below,
A ciphertext polynomial c = E (m, r, h) is generated.

ここで、E(m,r,h)は、NTRU暗号方式の暗号化アルゴリズムEに、平文多項式m、乱数多項式r及び公開鍵多項式hを入力して得られる多項式演算の結果である。暗号化アルゴリズムEについては非特許文献2に詳しく述べられており、ここでは説明を省略する。
なお、NTRU暗号方式では、乱数多項式rを生成するためのパラメータdが予め決められている。乱数多項式rは、乱数多項式rを構成する各項のうち、d個の項についてはその係数が「1」となり、他のd個の項については係数が「−1」となり、残りの項については係数は「0」となるように、選ばれる。
Here, E (m, r, h) is a result of a polynomial operation obtained by inputting a plaintext polynomial m, a random number polynomial r, and a public key polynomial h to the encryption algorithm E of the NTRU cryptosystem. The encryption algorithm E is described in detail in Non-Patent Document 2, and description thereof is omitted here.
In the NTRU cryptosystem, a parameter d for generating the random number polynomial r is determined in advance. Among the terms constituting the random number polynomial r, the random polynomial r has a coefficient “1” for d terms, a coefficient “−1” for the other d terms, and the remaining terms. Is selected such that the coefficient is "0".

すなわち、乱数多項式rは、N−1次元以下の多項式であり、0次元(定数項)からN−1次元までのN項について、N個の係数が存在する。乱数多項式rは、このN個の係数のうち、d個の係数が「1」であり、かつd個の係数が「−1」であり、かつ(N−2d)個の係数は「0」となるように、選ばれる。
非特許文献2によれば、パラメータN=167の場合、d=18である。すなわち、18個の係数が「1」であり、かつ18個の係数が「−1」であり、131(=167−36)個の係数が「0」となるように、乱数多項式rが選ばれる。
That is, the random number polynomial r is a polynomial of N-1 dimensions or less, and there are N coefficients for N terms from 0 dimension (constant term) to N-1 dimensions. Among the N coefficients, the random number polynomial r has d coefficients of “1”, d coefficients of “−1”, and (N−2d) coefficients of “0”. It is chosen so that it becomes.
According to Non-Patent Document 2, when parameter N = 167, d = 18. That is, the random number polynomial r is selected so that 18 coefficients are “1”, 18 coefficients are “−1”, and 131 (= 167−36) coefficients are “0”. It is.

(4)NTRU暗号方式の復号化
後述する復号装置は、次に示すようにNTRU暗号方式の復号化を行う。
復号化時には、秘密鍵多項式fを用いて、暗号文多項式cに多項式演算である復号アルゴリズムDを施して、復号文多項式m'=D(c,f)を生成する。
ここで、D(c,f)は、NTRU暗号方式の復号アルゴリズムDに、暗号文多項式c、及び秘密鍵多項式fを入力して得られる多項式演算の結果である。復号アルゴリズムDについては非特許文献2に詳しく述べられており、ここでは説明を省略する。
(4) NTRU encryption method decryption The decryption apparatus described later performs the NTRU encryption method decryption as described below.
At the time of decryption, the decryption text polynomial m ′ = D (c, f) is generated by applying the decryption algorithm D, which is a polynomial operation, to the ciphertext polynomial c using the secret key polynomial f.
Here, D (c, f) is a result of a polynomial operation obtained by inputting the ciphertext polynomial c and the secret key polynomial f into the decryption algorithm D of the NTRU cryptosystem. The decryption algorithm D is described in detail in Non-Patent Document 2, and description thereof is omitted here.

(5)NTRU暗号方式の復号エラー
ところで、このNTRU暗号方式において、生成された復号文多項式m'が平文多項式mと異なる場合が発生する。この場合は、復号時に正しく平文多項式mが得られないことになる。このことを復号エラーが発生するという。
1.2 コンテンツ配信システム10の構成
コンテンツ配信システム10は、図1に示すように、コンテンツサーバ装置140と暗号装置110と復号装置120と再生装置150とモニタ155とから構成されており、コンテンツサーバ装置140と暗号装置110とは、専用回線20を介して接続されており、暗号装置110と復号装置120とは、インターネット130を介して接続されている。再生装置150は、復号装置120及びスピーカを内蔵するモニタ155に接続されている。暗号装置110には、メモリカード160が装着され、復号装置120には、メモリカード170が装着される。
(5) Decryption error of NTRU cryptosystem By the way, in this NTRU cryptosystem, a case where the generated decrypted text polynomial m ′ is different from the plaintext polynomial m occurs. In this case, the plaintext polynomial m cannot be obtained correctly at the time of decryption. This is called a decoding error.
1.2 Configuration of Content Distribution System 10 As shown in FIG. 1, the content distribution system 10 includes a content server device 140, an encryption device 110, a decryption device 120, a playback device 150, and a monitor 155. The device 140 and the encryption device 110 are connected via the dedicated line 20, and the encryption device 110 and the decryption device 120 are connected via the Internet 130. The playback device 150 is connected to a decoding device 120 and a monitor 155 with a built-in speaker. A memory card 160 is attached to the encryption device 110, and a memory card 170 is attached to the decryption device 120.

コンテンツサーバ装置140は、映像と音声から構成される映画などのコンテンツを専用回線20を介して暗号装置110へ送信する。
暗号装置110と復号装置120とは、それぞれ同一の共有鍵K及び共有鍵K’を生成する。次に、暗号装置110は、コンテンツサーバ装置140から受け取ったコンテンツを共有鍵Kを用いて暗号化して暗号化コンテンツを生成し、生成した暗号化コンテンツを送信し、復号装置120は、暗号化コンテンツを受信し、受信した暗号化コンテンツを復号して再生コンテンツを生成し、再生装置150は、再生コンテンツから映像信号及び音声信号を生成し、モニタ155は、映像を表示し、音声を出力する。
The content server device 140 transmits content such as a movie composed of video and audio to the encryption device 110 via the dedicated line 20.
The encryption device 110 and the decryption device 120 generate the same shared key K and shared key K ′, respectively. Next, the encryption device 110 encrypts the content received from the content server device 140 using the shared key K to generate encrypted content, transmits the generated encrypted content, and the decryption device 120 transmits the encrypted content. , Decrypts the received encrypted content to generate playback content, the playback device 150 generates a video signal and an audio signal from the playback content, and the monitor 155 displays the video and outputs audio.

1.3 コンテンツサーバ装置140の構成
コンテンツサーバ装置140は、マイクロプロセッサ、ROM、RAM、ハードディスクユニット、ディスプレィユニット、通信ユニット、キーボード、マウスなどから構成されるコンピュータシステムである(図示していない)。前記RAM又は前記ハードディスクユニットには、コンピュータプログラムが記憶されている。前記マイクロプロセッサが、前記コンピュータプログラムに従って動作することにより、コンテンツサーバ装置140は、その一部の機能を達成する。
1.3 Configuration of Content Server Device 140 The content server device 140 is a computer system (not shown) including a microprocessor, a ROM, a RAM, a hard disk unit, a display unit, a communication unit, a keyboard, a mouse, and the like. A computer program is stored in the RAM or the hard disk unit. The content server device 140 achieves a part of its functions by the microprocessor operating according to the computer program.

コンテンツサーバ装置140は、前記コンテンツを予め記憶しており、前記コンテンツは、複数の部分コンテンツmi(1≦i≦n)から構成されている。コンテンツサーバ装置140は、暗号装置110の要求に応じて、部分コンテンツmiを読み出し、読み出した部分コンテンツmiを、専用回線20を介して暗号装置110へ送信する。
1.4 メモリカード160及びメモリカード170の構成
メモリカード160は、記憶媒体としてフラッシュメモリを採用しているカード型の記憶装置であり、予め公開鍵多項式hを記憶している。
The content server device 140 stores the content in advance, and the content includes a plurality of partial contents mi (1 ≦ i ≦ n). The content server device 140 reads the partial content mi in response to a request from the encryption device 110, and transmits the read partial content mi to the encryption device 110 via the dedicated line 20.
1.4 Configuration of Memory Card 160 and Memory Card 170 The memory card 160 is a card-type storage device that employs a flash memory as a storage medium, and stores a public key polynomial h in advance.

また、メモリカード170は、メモリカード160と同様のカード型の記憶装置であり、予め秘密鍵多項式f及び公開鍵多項式hを記憶している。
ここで、秘密鍵多項式fと公開鍵多項式hとは、NTRU暗号方式により生成されたものであり、それぞれ対応している。
1.5 暗号装置110の構成
暗号装置110は、図2に示すように、公開鍵入力部111、乱数生成部112、第1関数部113、暗号化部114、第1送信部117、共通鍵暗号部118及び第2送信部119から構成されている。
The memory card 170 is a card-type storage device similar to the memory card 160, and stores a secret key polynomial f and a public key polynomial h in advance.
Here, the secret key polynomial f and the public key polynomial h are generated by the NTRU cryptosystem and correspond to each other.
1.5 Configuration of Encryption Device 110 As shown in FIG. 2, the encryption device 110 includes a public key input unit 111, a random number generation unit 112, a first function unit 113, an encryption unit 114, a first transmission unit 117, a common key. It comprises an encryption unit 118 and a second transmission unit 119.

暗号装置110は、具体的には、マイクロプロセッサ、ROM、RAM、通信ユニットなどから構成されるコンピュータシステムである。前記RAMには、コンピュータプログラムが記憶されている。前記マイクロプロセッサが、前記コンピュータプログラムに従って動作することにより、暗号装置110は、その機能を達成する。
(1)公開鍵入力部111
公開鍵入力部111は、メモリカード160から復号装置120の公開鍵多項式hを読み出し、読み出した公開鍵多項式hを暗号化部114へ出力する。
Specifically, the encryption device 110 is a computer system including a microprocessor, a ROM, a RAM, a communication unit, and the like. A computer program is stored in the RAM. The cryptographic apparatus 110 achieves its functions by the microprocessor operating according to the computer program.
(1) Public key input unit 111
The public key input unit 111 reads the public key polynomial h of the decryption device 120 from the memory card 160 and outputs the read public key polynomial h to the encryption unit 114.

(2)乱数生成部112
乱数生成部112は、共有鍵Kを生成するための元となるシード値として、乱数sを生成し、生成した乱数sを第1関数部113と暗号化部114とへ出力する。
(3)第1関数部113
第1関数部113は、乱数生成部112から乱数sを受け取り、乱数sの関数値G(s)を生成する。ここで、関数Gは、出力長が2kビットのハッシュ関数である。なお、ハッシュ関数は、一方向性関数の一種である。次に、第1関数部113は、関数値G(s)の上位kビットを乱数値uとし、G(s)の下位kビットを共有鍵Kとすることにより、生成した関数値G(s)から共有鍵Kと乱数値uとを生成し、生成した乱数値uを暗号化部114へ出力し、生成した共有鍵Kを共通鍵暗号部118へ出力する。
(2) Random number generator 112
The random number generation unit 112 generates a random number s as a seed value for generating the shared key K, and outputs the generated random number s to the first function unit 113 and the encryption unit 114.
(3) First function unit 113
The first function unit 113 receives the random number s from the random number generation unit 112 and generates a function value G (s) of the random number s. Here, the function G is a hash function having an output length of 2 k bits. The hash function is a kind of one-way function. Next, the first function unit 113 sets the higher k bits of the function value G (s) as the random value u and the lower k bits of G (s) as the shared key K, thereby generating the generated function value G (s ) To generate a shared key K and a random value u, output the generated random value u to the encryption unit 114, and output the generated shared key K to the common key encryption unit 118.

(4)暗号化部114
暗号化部114は、公開鍵入力部111から公開鍵多項式hを受け取り、乱数生成部112から乱数sを受け取り、第1関数部113から乱数値uを受け取る。次に、以下のようにして、NTRU暗号により、公開鍵多項式hと乱数値uとを用いて乱数sの第1暗号文c1を生成する。ここで、乱数値uは、ブラインド値であり、暗号化の対象である乱数sを不明瞭にするために用いられる。
(4) Encryption unit 114
The encryption unit 114 receives the public key polynomial h from the public key input unit 111, receives the random number s from the random number generation unit 112, and receives the random value u from the first function unit 113. Next, the first ciphertext c1 of the random number s is generated using the public key polynomial h and the random value u by NTRU encryption as follows. Here, the random value u is a blind value and is used to obscure the random number s to be encrypted.

暗号化部114は、NTRU暗号のパラメータdに対し、乱数多項式rのd個の項の係数が「1」であり、d個の項の係数が「−1」であり、残りの項の係数が「0」である乱数多項式rを乱数値uから一意に求まるように生成する。
例えば、暗号化部114は、乱数値uを擬似乱数系列の初期値(乱数シード)として設定し、{0,1,...,N−1}から重複しないように2d個の擬似乱数を生成し、最初のd個の疑似乱数によりそれぞれ示されるd個の次元の項の係数を「1」とし、残りのd個の擬似乱数によりそれぞれ示されるd個の次元の項の係数を「−1」とし、他の次元の項の係数は「0」とする。
For the parameter d of the NTRU cipher, the encryption unit 114 has a coefficient of d terms of the random number polynomial r of “1”, a coefficient of d terms of “−1”, and a coefficient of the remaining terms. Is generated so that the random number polynomial r having “0” can be uniquely obtained from the random value u.
For example, the encryption unit 114 sets the random value u as an initial value (random number seed) of the pseudo-random number sequence, and {0, 1,. . . , N-1} to generate 2d pseudo-random numbers so as not to overlap each other, set the coefficients of d-dimensional terms indicated by the first d pseudo-random numbers to “1”, and the remaining d pseudo-random numbers. The coefficient of d-dimensional terms each indicated by a random number is “−1”, and the coefficients of terms of other dimensions are “0”.

次に、暗号化部114は、乱数sがNTRU暗号の暗号アルゴリズムEに適用できるように、乱数sを2進数表現した場合のN桁のビット列の各桁の値が、乱数多項式spの各項の係数に対応するように、乱数多項式spを構成する。例えば、乱数sの下位bビット目の値を、項X^bの係数とする。具体的には、s=10010(ビット表現)の場合、乱数多項式sp=X^5+X^2を生成する。   Next, the encryption unit 114 determines that the value of each digit of the N-digit bit string when the random number s is expressed in binary notation so that the random number s can be applied to the encryption algorithm E of the NTRU encryption, The random number polynomial sp is constructed so as to correspond to the coefficients of. For example, the value of the lower b bits of the random number s is set as the coefficient of the term X ^ b. Specifically, when s = 110010 (bit representation), a random number polynomial sp = X ^ 5 + X ^ 2 is generated.

次に、暗号化部114は、公開鍵多項式hを使用して、乱数多項式rを用いて乱数多項式spに前記暗号アルゴリズムEを施して、
第1暗号文c1=暗号文多項式E(sp,r,h)を生成する。
次に、暗号化部114は、生成した第1暗号文c1を第1送信部117へ出力する。
なお、図2において、暗号装置110の各構成部を示す各ブロックは、接続線により他のブロックと接続されている。ここで、各接続線は、信号や情報が伝達される経路を示している。また、暗号化部114を示すブロックに接続している複数の接続線のうち、接続線上に鍵マークが付されているものは、暗号化部114へ鍵としての情報が伝達される経路を示している。共通鍵暗号部118を示すブロックについても同様である。また、他の図面についても同様である。
Next, the encryption unit 114 performs the encryption algorithm E on the random number polynomial sp using the random number polynomial r using the public key polynomial h, and
First ciphertext c1 = ciphertext polynomial E (sp, r, h) is generated.
Next, the encryption unit 114 outputs the generated first ciphertext c1 to the first transmission unit 117.
In FIG. 2, each block indicating each component of the encryption device 110 is connected to another block by a connection line. Here, each connection line indicates a path through which signals and information are transmitted. Of the plurality of connection lines connected to the block indicating the encryption unit 114, the ones with a key mark on the connection line indicate a path through which information as a key is transmitted to the encryption unit 114. ing. The same applies to the block indicating the common key encryption unit 118. The same applies to other drawings.

(5)第1送信部117
第1送信部117は、暗号化部114から第1暗号文c1を受け取り、第1暗号文c1をインターネット130を介して復号装置120へ送信する。
(6)共通鍵暗号部118
共通鍵暗号部118は、例えばDES暗号方式のような共通鍵暗号アルゴリズムSymを有している。
(5) First transmission unit 117
The first transmission unit 117 receives the first ciphertext c1 from the encryption unit 114, and transmits the first ciphertext c1 to the decryption device 120 via the Internet 130.
(6) Common key encryption unit 118
The common key encryption unit 118 has a common key encryption algorithm Sym such as a DES encryption method, for example.

一般的に、共通鍵暗号では、暗号側の装置において、暗号鍵Kを用いて、平文mに共通鍵暗号アルゴリズムSymを施して、暗号文c=Sym(m,K)を生成し、復号側の装置において、暗号鍵Kを用いて、暗号文cに共通鍵暗号アルゴリズムSymを施して、復号文m'=Sym(c,K)を生成する。ここで、暗号文生成時に用いる暗号鍵Kと復号文生成時に用いる暗号鍵Kが同一であれば、m'=mとなる。なお、共通鍵暗号及びDES暗号方式については、非特許文献1に詳しく述べられているため、ここでの詳細な説明は省略する。   In general, in common key cryptography, a ciphertext c = Sym (m, K) is generated by applying a common key cryptography algorithm Sym to a plaintext m using an encryption key K in a device on the encryption side, and a decryption side In this apparatus, the ciphertext c is subjected to the common key encryption algorithm Sym using the encryption key K to generate the decrypted text m ′ = Sym (c, K). Here, if the encryption key K used when generating the ciphertext and the encryption key K used when generating the decrypted text are the same, m ′ = m. Since the common key encryption and the DES encryption method are described in detail in Non-Patent Document 1, detailed description thereof is omitted here.

共通鍵暗号部118は、コンテンツサーバ装置140から複数の平文(部分コンテンツ)mi(1≦i≦n)を受け取り、第1関数部113から共有鍵Kを受け取り、受け取った共有鍵Kを使用して平文mi(1≦i≦n)に共通鍵暗号アルゴリズムSymを施して、共通鍵暗号文Ci=Sym(mi,K)(1≦i≦n)を生成する。
次に、共通鍵暗号部118は、共通鍵暗号文Ci(1≦i≦n)を第2送信部119へ出力する。
The common key encryption unit 118 receives a plurality of plaintexts (partial contents) mi (1 ≦ i ≦ n) from the content server device 140, receives the shared key K from the first function unit 113, and uses the received shared key K. Then, the plaintext mi (1 ≦ i ≦ n) is subjected to the common key encryption algorithm Sym to generate the common key ciphertext Ci = Sym (mi, K) (1 ≦ i ≦ n).
Next, the common key encryption unit 118 outputs the common key ciphertext Ci (1 ≦ i ≦ n) to the second transmission unit 119.

(7)第2送信部119
第2送信部119は、共通鍵暗号部118から共通鍵暗号文Ci(1≦i≦n)を受け取り、受け取った共通鍵暗号文Ci(1≦i≦n)を、インターネット130を介して復号装置120へ送信する。
1.6 復号装置120の構成
復号装置120は、図3に示すように、秘密鍵入力部121、第1受信部122、復号化部123、第2関数部126、比較部127、共通鍵復号部128及び第2受信部129から構成される。
(7) Second transmitter 119
The second transmission unit 119 receives the common key ciphertext Ci (1 ≦ i ≦ n) from the common key encryption unit 118 and decrypts the received common key ciphertext Ci (1 ≦ i ≦ n) via the Internet 130. Transmit to device 120.
1.6 Configuration of Decryption Device 120 As shown in FIG. 3, the decryption device 120 includes a secret key input unit 121, a first reception unit 122, a decryption unit 123, a second function unit 126, a comparison unit 127, and a common key decryption. Part 128 and a second receiving part 129.

復号装置120は、暗号装置110と同様のコンピュータシステムである。マイクロプロセッサが、コンピュータプログラムに従って動作することにより、復号装置120は、その機能を達成する。
(1)秘密鍵入力部121
秘密鍵入力部121は、メモリカード170から、復号装置120の秘密鍵多項式fと公開鍵多項式hとを読み出し、読み出した秘密鍵多項式fを復号化部123へ出力し、読み出した公開鍵多項式hを比較部127へ出力する。
The decryption device 120 is a computer system similar to the encryption device 110. The decoding device 120 achieves its functions by the microprocessor operating according to the computer program.
(1) Secret key input unit 121
The secret key input unit 121 reads the secret key polynomial f and the public key polynomial h of the decryption device 120 from the memory card 170, outputs the read secret key polynomial f to the decryption unit 123, and reads the read public key polynomial h. Is output to the comparison unit 127.

(2)第1受信部122
第1受信部122は、インターネット130を介して暗号装置110から第1暗号文c1を受け取り、受け取った第1暗号文c1を復号化部123へ出力する。
(3)復号化部123
復号化部123は、秘密鍵入力部121から秘密鍵多項式fを受け取り、第1受信部122から第1暗号文c1を受け取り、次に示すようにして、NTRU暗号により、秘密鍵多項式fを用いて、第1暗号文c1を復号して復号乱数s’を生成する。
(2) First receiving unit 122
The first receiving unit 122 receives the first ciphertext c1 from the encryption device 110 via the Internet 130, and outputs the received first ciphertext c1 to the decryption unit 123.
(3) Decoding unit 123
The decryption unit 123 receives the secret key polynomial f from the secret key input unit 121, receives the first ciphertext c1 from the first reception unit 122, and uses the secret key polynomial f by NTRU encryption as shown below. The first ciphertext c1 is decrypted to generate a decrypted random number s ′.

復号化部123は、秘密鍵多項式fを使用して、第1暗号文c1に前記復号アルゴリズムDを施して、復号乱数多項式sp’=D(c1,f)を生成する。次に、復号乱数多項式sp’は、NTRU暗号の復号文であり多項式で表現されているので、復号乱数多項式sp’の各項の係数が、復号乱数s’を2進数表現した場合のN桁のビット列の各値に対応するように、復号乱数s’を生成する。例えば、復号乱数多項式sp’のb次元の項X^bの係数は、復号乱数s’の下位bビット目の値となる。   The decryption unit 123 applies the decryption algorithm D to the first ciphertext c1 using the secret key polynomial f to generate a decrypted random number polynomial sp ′ = D (c1, f). Next, since the decrypted random number polynomial sp ′ is a decrypted text of the NTRU cipher and is represented by a polynomial, the coefficient of each term of the decrypted random number polynomial sp ′ is N digits when the decrypted random number s ′ is represented by a binary number. The decrypted random number s ′ is generated so as to correspond to each value of the bit string. For example, the coefficient of the b-dimensional term X ^ b of the decrypted random number polynomial sp ′ is the value of the lower b bits of the decrypted random number s ′.

具体的には、復号乱数多項式sp’=X^5+X^2の場合、復号乱数s’=10010(ビット表現)を生成する。
次に、復号化部123は、受け取った第1暗号文c1と生成した復号乱数s’とを比較部127へ出力し、生成した復号乱数s’を第2関数部126へ出力する。
(4)第2関数部126
第2関数部126は、第1関数部113が有している関数と同じ関数Gのアルゴリズムを有している。
Specifically, when the decrypted random number polynomial sp ′ = X ^ 5 + X ^ 2, a decrypted random number s ′ = 110010 (bit representation) is generated.
Next, the decryption unit 123 outputs the received first ciphertext c1 and the generated decrypted random number s ′ to the comparison unit 127, and outputs the generated decrypted random number s ′ to the second function unit 126.
(4) Second function unit 126
The second function unit 126 has the same function G algorithm as the function of the first function unit 113.

第2関数部126は、復号化部123から復号乱数s’を受け取り、第1関数部113と同様にして、復号乱数s’の関数値G(s’)を生成し、次に、関数値G(s’)から乱数値u’と共有鍵K’とを生成し、生成した乱数値u’と共有鍵K’とを比較部127へ出力する。
(5)比較部127
比較部127は、図3に示すように、暗号化部127xと比較演算部127yとから構成されている。
The second function unit 126 receives the decrypted random number s ′ from the decryption unit 123, generates the function value G (s ′) of the decrypted random number s ′ in the same manner as the first function unit 113, and then the function value A random value u ′ and a shared key K ′ are generated from G (s ′), and the generated random value u ′ and the shared key K ′ are output to the comparison unit 127.
(5) Comparison unit 127
As shown in FIG. 3, the comparison unit 127 includes an encryption unit 127x and a comparison operation unit 127y.

暗号化部127xは、秘密鍵入力部121から公開鍵多項式hを受け取り、復号化部123から復号乱数s’を受け取り、第2関数部126から乱数値u’を受け取る。次に、暗号化部114と同様にして、公開鍵多項式hと乱数値u’とを用いて、復号乱数s’を暗号化して第1再暗号文c1’を生成し、生成した第1再暗号文c1’を比較演算部127yへ出力する。   The encryption unit 127x receives the public key polynomial h from the secret key input unit 121, receives the decrypted random number s 'from the decryption unit 123, and receives the random value u' from the second function unit 126. Next, in the same manner as the encryption unit 114, the decrypted random number s ′ is encrypted using the public key polynomial h and the random value u ′ to generate the first re-encrypted text c1 ′, and the generated first re-encrypted text c1 ′ is generated. The ciphertext c1 ′ is output to the comparison operation unit 127y.

比較演算部127yは、復号化部123から第1暗号文c1を受け取り、第2関数部126から共有鍵K’を受け取り、暗号化部127xから第1再暗号文c1’を受け取る。次に、第1暗号文c1と第1再暗号文c1’とを比較して、一致しているか否かを判断し、一致していると判断する場合に、受け取った共有鍵K’を共通鍵復号部128へ出力する。一致しないと判断する場合に、受け取った共有鍵K’を出力しない。   The comparison operation unit 127y receives the first ciphertext c1 from the decryption unit 123, receives the shared key K ′ from the second function unit 126, and receives the first re-ciphertext c1 ′ from the encryption unit 127x. Next, the first ciphertext c1 and the first re-ciphertext c1 ′ are compared to determine whether or not they match, and when it is determined that they match, the received shared key K ′ is shared. The data is output to the key decryption unit 128. If it is determined that they do not match, the received shared key K ′ is not output.

(6)第2受信部129
第2受信部129は、インターネット130を介して暗号装置110から共通鍵暗号文Ci(1≦i≦n)を受信し、受信した共通鍵暗号文Ci(1≦i≦n)を共通鍵復号部128へ出力する。
(7)共通鍵復号部128
共通鍵復号部128は、共通鍵暗号部118が有する共通鍵暗号アルゴリズムSymと同じ共通鍵暗号アルゴリズムSymを予め有している。
(6) Second receiving unit 129
The second receiving unit 129 receives the common key ciphertext Ci (1 ≦ i ≦ n) from the encryption device 110 via the Internet 130, and the received common key ciphertext Ci (1 ≦ i ≦ n). To the unit 128.
(7) Common key decryption unit 128
The common key decryption unit 128 has a common key encryption algorithm Sym that is the same as the common key encryption algorithm Sym included in the common key encryption unit 118 in advance.

共通鍵復号部128は、比較部127から共有鍵K’を受け取り、第2受信部129から共通鍵暗号文Ci(1≦i≦n)を受け取り、受け取った共有鍵K’を使用して受け取った共通鍵暗号文Ci(1≦i≦n)に共通鍵暗号アルゴリズムSymを施して、復号文mi’=Sym(Ci,K)(1≦i≦n)を生成する。
次に、共通鍵復号部128は、生成した復号文mi’(1≦i≦n)を再生装置150へ出力する。
The common key decryption unit 128 receives the shared key K ′ from the comparison unit 127, receives the common key ciphertext Ci (1 ≦ i ≦ n) from the second reception unit 129, and receives it using the received shared key K ′. The common key ciphertext Ci (1 ≦ i ≦ n) is subjected to the common key encryption algorithm Sym to generate a decrypted text mi ′ = Sym (Ci, K) (1 ≦ i ≦ n).
Next, the common key decryption unit 128 outputs the generated decrypted text mi ′ (1 ≦ i ≦ n) to the playback device 150.

1.7 再生装置150及びモニタ155
再生装置150は、復号装置120から復号文mi’(1≦i≦n)を受け取り、受け取った復号文mi’(1≦i≦n)から映像信号及び音声信号を生成し、生成した映像信号及び音声信号をモニタ155へ出力する。
モニタ155は、再生装置150から映像信号及び音声信号を受け取り、受け取った映像信号及び音声信号により、映像を表示し、音声を出力する。
1.7 Playback device 150 and monitor 155
The playback device 150 receives the decrypted text mi ′ (1 ≦ i ≦ n) from the decryption device 120, generates a video signal and an audio signal from the received decrypted text mi ′ (1 ≦ i ≦ n), and generates the generated video signal. And the audio signal is output to the monitor 155.
The monitor 155 receives a video signal and an audio signal from the playback device 150, displays video based on the received video signal and audio signal, and outputs audio.

1.8 暗号装置110及び復号装置120の動作
暗号装置110及び復号装置120の動作について、図4に示す処理系統図及び図5に示すフローチャートを用いて説明する。
暗号装置110の公開鍵入力部111は、メモリカード160から復号装置120の公開鍵多項式hを読み出し、読み出した公開鍵多項式hを暗号化部114へ出力する(ステップS101)。
1.8 Operations of Encryption Device 110 and Decryption Device 120 Operations of the encryption device 110 and the decryption device 120 will be described with reference to a processing system diagram shown in FIG. 4 and a flowchart shown in FIG.
The public key input unit 111 of the encryption device 110 reads the public key polynomial h of the decryption device 120 from the memory card 160, and outputs the read public key polynomial h to the encryption unit 114 (step S101).

次に、乱数生成部112は、乱数sを生成し、生成した乱数sを第1関数部113と暗号化部114とへ出力する(ステップS102)。
次に、第1関数部113は、乱数生成部112から乱数sを受け取り、乱数sの関数値G(s)を生成し(ステップS103)、次に、第1関数部113は、関数値G(s)から乱数値uと共有鍵Kとを生成して、乱数値uを暗号化部114へ出力し、共有鍵Kを共通鍵暗号部118へ出力する(ステップS104)。
Next, the random number generation unit 112 generates a random number s, and outputs the generated random number s to the first function unit 113 and the encryption unit 114 (step S102).
Next, the first function unit 113 receives the random number s from the random number generation unit 112, generates a function value G (s) of the random number s (step S103), and then the first function unit 113 outputs the function value G The random value u and the shared key K are generated from (s), the random value u is output to the encryption unit 114, and the shared key K is output to the common key encryption unit 118 (step S104).

次に、暗号化部114は、公開鍵入力部111から公開鍵多項式hを受け取り、乱数生成部112から乱数sを受け取り、第1関数部113から乱数値uを受け取り、公開鍵多項式hと乱数値uを用いて乱数sの第1暗号文c1を生成し、第1暗号文c1を第1送信部117へ出力する(ステップS105)。
次に、第1送信部117は、暗号化部114から第1暗号文c1を受け取り、第1暗号文c1をインターネット130を介して復号装置120へ送信する(ステップS106)。
Next, the encryption unit 114 receives the public key polynomial h from the public key input unit 111, receives the random number s from the random number generation unit 112, receives the random number value u from the first function unit 113, and receives the random number u from the public key polynomial h. The first ciphertext c1 of the random number s is generated using the numerical value u, and the first ciphertext c1 is output to the first transmission unit 117 (step S105).
Next, the first transmission unit 117 receives the first ciphertext c1 from the encryption unit 114, and transmits the first ciphertext c1 to the decryption device 120 via the Internet 130 (step S106).

次に、復号装置120の秘密鍵入力部121は、メモリカード170から復号装置120の秘密鍵多項式fと公開鍵多項式hとを読み出し、読み出した秘密鍵多項式fを復号化部123へ出力し、読み出した公開鍵多項式hを比較部127へ出力する(ステップS151)。
次に、第1受信部122は、インターネット130を介して暗号装置110から第1暗号文c1を受け取り、第1暗号文c1を復号化部123へ出力する(ステップS106)。
Next, the secret key input unit 121 of the decryption device 120 reads the secret key polynomial f and the public key polynomial h of the decryption device 120 from the memory card 170, and outputs the read secret key polynomial f to the decryption unit 123. The read public key polynomial h is output to the comparison unit 127 (step S151).
Next, the first receiving unit 122 receives the first ciphertext c1 from the encryption device 110 via the Internet 130, and outputs the first ciphertext c1 to the decryption unit 123 (step S106).

次に、復号化部123は、秘密鍵入力部121から秘密鍵多項式fを受け取り、第1受信部122から第1暗号文c1を受け取り、次に、秘密鍵多項式fを用いて、第1暗号文c1を復号して復号乱数s’を生成し、第1暗号文c1と復号乱数s’を比較部127へ出力し、復号乱数s’を第2関数部126へ出力する(ステップS152)。
次に、第2関数部126は、復号化部123から復号乱数s’を受け取り、復号乱数s’の関数値G(s’)を生成し(ステップS153)、関数値G(s’)から乱数値u’と共有鍵K’とを生成して、乱数値u’と共有鍵K’とを比較部127へ出力する(ステップS154)。
Next, the decryption unit 123 receives the secret key polynomial f from the secret key input unit 121, receives the first ciphertext c1 from the first reception unit 122, and then uses the secret key polynomial f to The decrypted random number s ′ is generated by decrypting the sentence c1, the first ciphertext c1 and the decrypted random number s ′ are output to the comparison unit 127, and the decrypted random number s ′ is output to the second function unit 126 (step S152).
Next, the second function unit 126 receives the decrypted random number s ′ from the decryption unit 123, generates a function value G (s ′) of the decrypted random number s ′ (step S153), and uses the function value G (s ′). The random value u ′ and the shared key K ′ are generated, and the random value u ′ and the shared key K ′ are output to the comparison unit 127 (step S154).

次に、比較部127は、復号化部123から第1暗号文c1を受け取り、第2関数部126から乱数値u’と共有鍵K’とを受け取り、第1再暗号文c1’を生成し(ステップS155)、第1暗号文c1が乱数値u’を用いた復号乱数s’の暗号文であるかどうかチェックを行い、第1暗号文c1が復号乱数s’の暗号文でなければ(ステップS156)、復号装置120は、処理を終了する。   Next, the comparison unit 127 receives the first ciphertext c1 from the decryption unit 123, receives the random value u ′ and the shared key K ′ from the second function unit 126, and generates the first re-ciphertext c1 ′. (Step S155), it is checked whether the first ciphertext c1 is a ciphertext of the decrypted random number s ′ using the random number value u ′, and the first ciphertext c1 is not a ciphertext of the decrypted random number s ′ ( Step S156), the decoding device 120 ends the process.

共通鍵暗号部118は、外部から複数の平文mi(1≦i≦n)を受け取り、第1関数部113から共有鍵Kを受け取り、共有鍵Kを使用して平文mi(1≦i≦n)に共通鍵暗号アルゴリズムSymを施して、共通鍵暗号文Ci=Sym(mi,K)(1≦i≦n)を生成し、共通鍵暗号文Ci(1≦i≦n)を第2送信部119へ出力する(ステップS107)。   The common key encryption unit 118 receives a plurality of plaintext mi (1 ≦ i ≦ n) from the outside, receives the shared key K from the first function unit 113, and uses the shared key K to obtain a plaintext mi (1 ≦ i ≦ n). ) Is subjected to a common key encryption algorithm Sym to generate a common key ciphertext Ci = Sym (mi, K) (1 ≦ i ≦ n) and a second transmission of the common key ciphertext Ci (1 ≦ i ≦ n) The data is output to the unit 119 (step S107).

次に、第2送信部119は、共通鍵暗号部118から共通鍵暗号文Ci(1≦i≦n)を受け取り、インターネット130を介して復号装置120へ送信し(ステップS108)、処理を終了する。
第1暗号文c1が復号乱数s’の暗号文であれば(ステップS156)、比較部127は、共有鍵K’を共通鍵復号部128へ出力する(ステップS157)。次に、第2受信部129は、インターネット130を介して暗号装置110から暗号文Ci(1≦i≦n)を受信し、共通鍵復号部128へ出力する(ステップS108)。
Next, the second transmission unit 119 receives the common key ciphertext Ci (1 ≦ i ≦ n) from the common key encryption unit 118, transmits it to the decryption device 120 via the Internet 130 (step S108), and ends the processing. To do.
If the first ciphertext c1 is the ciphertext of the decrypted random number s ′ (step S156), the comparison unit 127 outputs the shared key K ′ to the common key decryption unit 128 (step S157). Next, the second reception unit 129 receives the ciphertext Ci (1 ≦ i ≦ n) from the encryption device 110 via the Internet 130, and outputs it to the common key decryption unit 128 (step S108).

次に、共通鍵復号部128は、比較部127から共有鍵K’を受け取り、第2受信部129から共通鍵暗号文Ci(1≦i≦n)を受け取り、共有鍵K’を使用して共通鍵暗号文Ci(1≦i≦n)に共通鍵暗号アルゴリズムSymを施して、復号文mi’=Sym(Ci,K)(1≦i≦n)を生成し、復号文mi’(1≦i≦n)を再生装置150へ出力し(ステップS158)、処理を終了する。   Next, the common key decryption unit 128 receives the shared key K ′ from the comparison unit 127, receives the common key ciphertext Ci (1 ≦ i ≦ n) from the second reception unit 129, and uses the shared key K ′. The common key ciphertext Ci (1 ≦ i ≦ n) is subjected to the common key encryption algorithm Sym to generate a decrypted text mi ′ = Sym (Ci, K) (1 ≦ i ≦ n), and the decrypted text mi ′ (1 ≦ i ≦ n) is output to the playback device 150 (step S158), and the process ends.

1.9 コンテンツ配信システム10の動作検証
以下に、実施の形態1におけるコンテンツ配信システム10の全体の動作について説明する。
まず、暗号装置110は、復号装置120の公開鍵多項式hを入力とし、乱数sを生成し、関数値G(s)から乱数値uと共有鍵Kとを導出する。次に、暗号装置110は、乱数sを、公開鍵多項式hと乱数値uを用いてNTRU暗号で暗号化して第1暗号文c1を生成し、第1暗号文c1をインターネット130を介して復号装置120へ送信する。
1.9 Operation Verification of Content Distribution System 10 The overall operation of the content distribution system 10 according to Embodiment 1 will be described below.
First, the encryption device 110 receives the public key polynomial h of the decryption device 120, generates a random number s, and derives a random value u and a shared key K from the function value G (s). Next, the encryption device 110 encrypts the random number s with NTRU encryption using the public key polynomial h and the random value u to generate the first ciphertext c1, and decrypts the first ciphertext c1 via the Internet 130. Transmit to device 120.

すなわち、この暗号装置110は、以下の処理を行い、第1暗号文c1を復号装置120へ送信する。
・乱数sを生成する。
・G(s)を生成し、G(s)からu、Kを生成する。
・公開鍵多項式hと乱数値uとを用いて乱数sの第1暗号文c1を生成する。
That is, the encryption device 110 performs the following processing and transmits the first ciphertext c1 to the decryption device 120.
Generate a random number s.
Generate G (s) and generate u and K from G (s).
A first cipher text c1 of the random number s is generated using the public key polynomial h and the random value u.

・共有鍵Kと第1暗号文c1とを出力する。
次に、暗号装置110は、導出した共有鍵Kを用いて、外部から入力された平文mi(1≦i≦n)を共通鍵暗号で暗号化して暗号文Ci(1≦i≦n)を生成し、インターネット130を介して復号装置120へ送信する。
一方、復号装置120は、復号装置120の秘密鍵多項式f及び公開鍵多項式hを入力とし、インターネット130を介して暗号装置110から第1暗号文c1を受信し、第1暗号文c1を秘密鍵多項式fを用いて復号して復号乱数s’を生成する。次に、復号乱数s’の関数値G(s’)から乱数値u’と共有鍵K’を導出し、復号乱数s’を暗号化して第1再暗号文c1’を生成し、c1’=c1であれば、共有鍵K’を出力する。
-Output the shared key K and the first ciphertext c1.
Next, the encryption device 110 encrypts the plaintext mi (1 ≦ i ≦ n) input from the outside with the common key encryption using the derived shared key K to generate the ciphertext Ci (1 ≦ i ≦ n). It is generated and transmitted to the decryption device 120 via the Internet 130.
On the other hand, the decryption device 120 receives the private key polynomial f and the public key polynomial h of the decryption device 120, receives the first ciphertext c1 from the encryption device 110 via the Internet 130, and uses the first ciphertext c1 as the private key. Decoding is performed using the polynomial f to generate a decoded random number s ′. Next, a random value u ′ and a shared key K ′ are derived from the function value G (s ′) of the decrypted random number s ′, the decrypted random number s ′ is encrypted to generate a first re-ciphertext c1 ′, and c1 ′. If = c1, the shared key K ′ is output.

すなわち、この復号装置120は、以下の処理を行い、共有鍵K’を導出する。
・秘密鍵多項式fを用いて第1暗号文c1を復号してs’を生成する。
・G(s’)を生成し、G(s’)からu’、K’を生成する。
・公開鍵多項式h、乱数値u’を用いてs’の第1再暗号文c1’を生成する。
・c1’=c1が成立するかどうかチェックする。成立すれば共有鍵K’を出力する。
That is, the decryption device 120 performs the following process to derive the shared key K ′.
Decrypt the first ciphertext c1 using the secret key polynomial f to generate s ′.
Generate G (s ′) and generate u ′ and K ′ from G (s ′).
A first recipher text c1 ′ of s ′ is generated using the public key polynomial h and the random value u ′.
Check whether c1 ′ = c1 is true. If it is established, the shared key K ′ is output.

ここで、暗号装置110で用いられた公開鍵多項式hに対応する正しい秘密鍵多項式fが復号装置120で用いられれば、第1暗号文c1は正しく復号されて、復号乱数s’=sとなり、従って、G(s’)から導出される乱数値u’=uとなり、共有鍵K’=Kとなる。そして、s’=s及びu’=uが成り立つので、c1’=c1が成り立ち、復号装置120は暗号装置110と同じ共有鍵Kを導出できることになる。   Here, if the correct private key polynomial f corresponding to the public key polynomial h used in the encryption device 110 is used in the decryption device 120, the first ciphertext c1 is correctly decrypted, and the decrypted random number s ′ = s, Therefore, the random value u ′ = u derived from G (s ′) and the shared key K ′ = K. Since s ′ = s and u ′ = u hold, c1 ′ = c1 holds, and the decryption device 120 can derive the same shared key K as the encryption device 110.

次に、復号装置120は、導出した共有鍵K’(=K)を用いて、インターネットを介して暗号装置110から共通鍵暗号文Ci(1≦i≦n)を共通鍵暗号で復号して復号文mi’(1≦i≦n)を生成して外部へ出力する。ここで、共通鍵暗号文生成時に用いた暗号鍵Kと復号文生成時に用いる暗号鍵K’とは同一であるで、復号装置120は、正しくmi'=mi(1≦i≦n)を得ることができる。   Next, the decryption device 120 decrypts the common key cipher text Ci (1 ≦ i ≦ n) from the encryption device 110 via the Internet using the derived shared key K ′ (= K) with the common key encryption. Decrypted text mi ′ (1 ≦ i ≦ n) is generated and output to the outside. Here, since the encryption key K used when generating the common key ciphertext and the encryption key K ′ used when generating the decrypted text are the same, the decrypting device 120 correctly obtains mi ′ = mi (1 ≦ i ≦ n). be able to.

なお、復号エラーが発生した場合には、復号乱数s’と乱数sとは異なるので、G(s’)から導出される乱数値u’及び共有鍵K’は、それぞれu、Kとは異なる。しかし、この場合、s’、u’がそれぞれs、uと異なるために第1再暗号文c1’が第1暗号文c1と異なるので、復号装置120は、共有鍵K’を出力しない。
1.10 実施の形態1における効果
従来のRSA−KEMアルゴリズムでは、秘密鍵を知らなければ暗号文Cから導出できない要素sをハッシュ関数Gに入力して共有鍵Kを導出する。しかしながら、NTRU暗号を用いて、鍵カプセル化メカニズムであるRSA−KEMアルゴリズムを適用して共有鍵の配送を行おうとすると、復号エラーが発生する場合があるため、秘密鍵を用いても要素sが導出できず、従って正しくない共有鍵K’を導出する場合がある。
When a decryption error occurs, the decrypted random number s ′ and the random number s are different, and therefore the random value u ′ and the shared key K ′ derived from G (s ′) are different from u and K, respectively. . However, in this case, since the first re-ciphertext c1 ′ is different from the first ciphertext c1 because s ′ and u ′ are different from s and u, respectively, the decryption device 120 does not output the shared key K ′.
1.10 Effect in Embodiment 1 In the conventional RSA-KEM algorithm, the shared key K is derived by inputting the element s that cannot be derived from the ciphertext C without knowing the secret key to the hash function G. However, if an attempt is made to deliver a shared key by applying the RSA-KEM algorithm, which is a key encapsulation mechanism, using NTRU encryption, a decryption error may occur. In some cases, the shared key K ′ that cannot be derived and therefore incorrect is derived.

しかしながら、実施の形態1のコンテンツ配信システム、暗号装置及び復号装置においては、乱数sのハッシュ関数値G(s)から共有鍵に加えて乱数値uを生成し、復号装置が乱数値uと公開鍵多項式hとを用いて復号乱数s’を再暗号化して第1再暗号文c1’を生成し、第1再暗号文c1’が第1暗号文c1と同じ値でない限り共有鍵K’を出力しないようにしたので、復号エラーが発生した場合、暗号装置と復号装置との間で異なる鍵が導出されるのを防止できる。   However, in the content distribution system, encryption device, and decryption device of Embodiment 1, in addition to the shared key, the random value u is generated from the hash function value G (s) of the random number s, and the decryption device discloses the random value u. The decrypted random number s ′ is re-encrypted using the key polynomial h to generate the first re-ciphertext c1 ′, and the shared key K ′ is used as long as the first re-ciphertext c1 ′ is not the same value as the first ciphertext c1. Since no output is performed, it is possible to prevent different keys from being derived between the encryption device and the decryption device when a decryption error occurs.

また、本発明による方式は、非特許文献3に記述されている証明方法と同様の方法により、理論的にその安全性が証明できる。
1.11 変形例
上記に説明した実施の形態1は、本発明の実施の一例であり、本発明はこの実施の形態に何ら限定されるものではなく、その主旨を逸脱しない範囲において種々なる態様で実施し得るものである。以下のような場合も本発明に含まれる。
Further, the method according to the present invention can theoretically prove its safety by a method similar to the proof method described in Non-Patent Document 3.
1.11 Modifications Embodiment 1 described above is an example of implementation of the present invention, and the present invention is not limited to this embodiment at all, and various embodiments are possible without departing from the scope of the present invention. Can be implemented. The following cases are also included in the present invention.

(1)用いるNTRU暗号のパラメータN=167に限定されない。パラメータNは、他の値をとるとしてもよい。
(2)暗号化部114及び復号化部123で行われるビット列の各ビットの値と多項式の各項の係数との変換方法は、上記において説明した方法に限られず他の変換方法でもよい。
(1) It is not limited to the parameter N = 167 of the NTRU encryption used. The parameter N may take other values.
(2) The conversion method between the value of each bit of the bit string and the coefficient of each term of the polynomial performed by the encryption unit 114 and the decryption unit 123 is not limited to the method described above, and other conversion methods may be used.

例えば、乱数sから乱数多項式spへの変換は、ビット列の各ビットの値と多項式の各項の係数とを1対1に対応させる関数を用いて変換してもよいし、また、ビット列の各ビットの値と多項式の各項の係数とを1対1に対応させて記憶している関数値テーブルを用いて変換してもよい。
また、乱数値uから乱数多項式rへの変換は、uからrが一意に求まり、rのd個の次元の項の係数を「1」とし、d個の次元の項の係数を「一1」とし、他の次元の項の係数は「0」となるようにすれば、他の変換方法でもよく、例えば、乱数値uを多項式に対応させる関数、又は関数値テーブルを用いて変換してもよい。
For example, the conversion from the random number s to the random number polynomial sp may be performed by using a function that makes a one-to-one correspondence between the value of each bit of the bit string and the coefficient of each term of the polynomial, The conversion may be performed using a function value table that stores bit values and coefficients of each term of the polynomial in a one-to-one correspondence.
Also, in the conversion from the random value u to the random number polynomial r, r is uniquely obtained from u, the coefficient of the d-dimensional term of r is “1”, and the coefficient of the d-dimensional term is “1”. As long as the coefficient of the term of the other dimension is set to “0”, other conversion methods may be used. For example, the random value u is converted using a function corresponding to a polynomial or a function value table. Also good.

(3)暗号化部114及び復号化部123で用いる公開鍵暗号方式は、暗号化部114において、乱数sを公開鍵と乱数値uを用いて暗号化して第1暗号文c1を生成し、復号化部123において、第1暗号文c1を秘密鍵で復号して乱数値sと等しい復号乱数s’を生成できるものであればよい。
従って、暗号化部114及び復号化部123で用いる公開鍵暗号は、NTRU暗号以外に、どんな公開鍵暗号でも利用できる。
(3) In the public key cryptosystem used by the encryption unit 114 and the decryption unit 123, the encryption unit 114 encrypts the random number s using the public key and the random value u to generate the first ciphertext c1. The decryption unit 123 only needs to be able to decrypt the first ciphertext c1 with the secret key and generate a decrypted random number s ′ equal to the random value s.
Therefore, the public key encryption used in the encryption unit 114 and the decryption unit 123 can be any public key encryption other than the NTRU encryption.

例えば、ElGamal暗号を採用するならば、h、fをそれぞれElGamal暗号の公開鍵、秘密鍵とし、暗号化部114において、乱数sをhとuを用いて暗号化してc1を生成し、復号化部123において、c1をfを用いて復号してs’を生成すればよい。
なお、ElGamal暗号について非特許文献1に詳細に記載されているため、ここでは説明を省略する。
For example, if ElGamal encryption is adopted, h and f are set as the public and private keys of ElGamal encryption, respectively, and the encryption unit 114 encrypts the random number s using h and u to generate c1 and decrypts it. In the unit 123, c1 may be decoded using f to generate s ′.
Since ElGamal encryption is described in detail in Non-Patent Document 1, description thereof is omitted here.

(4)第1関数部113は、関数値G(s)の上位kビットを乱数値uとし、下位kビットを共有鍵Kとする以外に、関数値G(s)から乱数値uと共有鍵Kとを導出すれば他の方法でもよい。
例えば、関数値G(s)の上位k/2ビットを乱数値uとし、下位k×3/2ビットを共有鍵Kとしてもよい。また、関数値G(s)の2kビットのうち、1ビット置きにkビットを選択して乱数値uとし、残りのkビットを共有鍵Kとしてもよい。
(4) The first function unit 113 shares the function value G (s) with the random value u except that the upper k bits of the function value G (s) are the random number u and the lower k bits are the shared key K. Another method may be used if the key K is derived.
For example, the upper k / 2 bits of the function value G (s) may be the random value u and the lower k × 3/2 bits may be the shared key K. Alternatively, out of 2k bits of the function value G (s), k bits may be selected every other bit as a random value u, and the remaining k bits may be used as the shared key K.

(5)乱数値uは、第1関数部113及び第2関数部126で生成される以外にも、暗号装置110と復号装置120とで同じ値を得られれば、他の生成方法を採用してもよい。
例えば、任意の関数Funcに対し、u=Func(s)として暗号装置110と復号装置120とで同じ値を得られるようにしてもよい。すなわち、暗号装置110と復号装置120とにおいて、
・G(s)を生成し、G(s)からKを生成する。
(5) In addition to the random value u generated by the first function unit 113 and the second function unit 126, if the same value is obtained by the encryption device 110 and the decryption device 120, another generation method is adopted. May be.
For example, for an arbitrary function Func, the same value may be obtained by the encryption device 110 and the decryption device 120 as u = Func (s). That is, in the encryption device 110 and the decryption device 120,
Generate G (s) and generate K from G (s).

・Func(s)を生成し、u=Func(s)とする。
としてもよい。
(6)乱数値uは、第1関数部113及び第2関数部126で生成される以外にも、暗号装置110と復号装置120とで同じ値を得られればよいので、暗号装置110が乱数値uを復号装置120bに直接送信してもよい。
Generate Func (s) and set u = Func (s).
It is good.
(6) Since the random value u is not generated by the first function unit 113 and the second function unit 126, it is sufficient that the same value is obtained by the encryption device 110 and the decryption device 120. The numerical value u may be transmitted directly to the decoding device 120b.

すなわち、以下のように、第1暗号文c1と乱数値uを復号装置120に送信してもよい。このとき、乱数値uは暗号化して送信されてもよい。
暗号装置110において、
・G(s)を生成し、G(s)からKを生成する。
・乱数値uを、別途、暗号装置110から復号装置120へ送信する。
That is, the first ciphertext c1 and the random number u may be transmitted to the decryption device 120 as follows. At this time, the random value u may be transmitted after being encrypted.
In the encryption device 110,
Generate G (s) and generate K from G (s).
The random value u is separately transmitted from the encryption device 110 to the decryption device 120.

復号装置120において、
・乱数値uを受信する。
・乱数値u’に代えて、受信した乱数値uを用いて第1再暗号文c1’を生成する。
このとき、暗号装置110は、乱数値uを暗号化して送信し、復号装置120は、暗号化された乱数値uを復号するとしてもよい。
In the decoding device 120,
Receive the random value u.
A first re-ciphertext c1 ′ is generated using the received random value u instead of the random value u ′.
At this time, the encryption device 110 may encrypt and transmit the random number value u, and the decryption device 120 may decrypt the encrypted random value u.

(7)乱数値uは、暗号装置110と復号装置120とで同じ値を得られればよいので、乱数値uの一部分の部分情報を第1関数部113及び第2関数部126で生成し、乱数値uの残りの部分の部分情報を暗号装置110から復号装置120に直接送信してもよい。
例えば、以下のように、暗号装置110は、第1暗号文c1と乱数値u2とを復号装置120に送信してもよい。
(7) Since the random value u only needs to be obtained by the encryption device 110 and the decryption device 120, partial information of a part of the random value u is generated by the first function unit 113 and the second function unit 126, The partial information of the remaining part of the random number u may be directly transmitted from the encryption device 110 to the decryption device 120.
For example, as described below, the encryption device 110 may transmit the first ciphertext c1 and the random value u2 to the decryption device 120.

暗号装置110において、
(a)G(s)を生成し、G(s)からK、u1を生成する。
(b)乱数値u2を生成し、別途、復号装置120へ送信する。
(c)乱数値uを、u=u1 xor u2から生成する。
(d)乱数値uを用いて、第1暗号文c1を生成する。
In the encryption device 110,
(A) G (s) is generated, and K and u1 are generated from G (s).
(B) A random value u2 is generated and transmitted to the decryption device 120 separately.
(C) The random value u is generated from u = u1 xor u2.
(D) The first ciphertext c1 is generated using the random value u.

復号装置120において、
(e)乱数値u2を受信する。
(f)G(s’)を生成し、G(s’)からK’、u1’を生成する。
(g)乱数値u’を、u’=u1’ xor u2から生成する。
(h)生成した乱数値u’を用いて第1再暗号文c1’を生成する。
In the decoding device 120,
(E) Receive the random value u2.
(F) G (s ′) is generated, and K ′ and u1 ′ are generated from G (s ′).
(G) A random value u ′ is generated from u ′ = u1 ′ xor u2.
(H) A first re-ciphertext c1 ′ is generated using the generated random value u ′.

このとき、暗号装置110は、乱数値u2を暗号化して送信し、復号装置120は、暗号化された乱数値u2を復号するとしてもよい。
また、(c)及び(g)において、排他的論理和xorに代えて他の演算を用いるとしてもよい。例えば、(c)及び(g)において、それぞれ加算及び減算を用いてもよいし、また、乗算及び除算を用いてもよい。
At this time, the encryption device 110 may encrypt and transmit the random value u2, and the decryption device 120 may decrypt the encrypted random value u2.
In (c) and (g), another operation may be used instead of the exclusive OR xor. For example, in (c) and (g), addition and subtraction may be used, respectively, and multiplication and division may be used.

(8)復号エラーの発生により暗号装置110と復号装置120との間で異なる共有鍵が導出されるのを防止するため、第1再暗号文c1’と第1暗号文c1とが同じである場合に、共有鍵K’を出力する代わりに、暗号装置110が乱数s、乱数値u、共有鍵Kのいずれか1つ以上について、ハッシュ関数値を生成し、生成したハッシュ関数値を復号装置120へ送信し、復号装置120がこのハッシュ関数値を検証することにより、共有鍵K’を出力するか否かを決定してもよい。例えば、このハッシュ関数値として、任意のハッシュ関数Hに対して、乱数sのハッシュ関数値H(s)を生成するようにしてもよいし、乱数s、乱数値u、共有鍵Kの組み合わせ、例えば、ハッシュ関数値H(s||u||k)やハッシュ関数値H(u||k)等を生成するようにしてもよい。   (8) The first re-ciphertext c1 ′ and the first ciphertext c1 are the same in order to prevent different shared keys from being derived between the encryption device 110 and the decryption device 120 due to the occurrence of a decryption error. In this case, instead of outputting the shared key K ′, the encryption device 110 generates a hash function value for any one or more of the random number s, the random value u, and the shared key K, and the generated hash function value is decrypted. The decryption device 120 may determine whether to output the shared key K ′ by verifying the hash function value. For example, as this hash function value, a hash function value H (s) of a random number s may be generated for an arbitrary hash function H, or a combination of a random number s, a random value u, and a shared key K, For example, a hash function value H (s || u || k) or a hash function value H (u || k) may be generated.

また、この場合、暗号装置110の第1関数部113は、関数値G(s)から乱数値uと共有鍵Kを導出する代わりに、G(s)から共有鍵Kのみを導出してもよい。
以下に、その具体例を述べる。
コンテンツ配信システム10は、暗号装置110及び復号装置120に代えて、暗号装置110b及び復号装置120bを含み、暗号装置110bは、図6に示すように、公開鍵入力部111、乱数生成部112、第1関数部113b、暗号化部114b、第1送信部117b、共通鍵暗号部118及び第2送信部119から構成されており、復号装置120は、図7に示すように、秘密鍵入力部121b、第1受信部122b、復号化部123b、第2関数部126b、比較部127b、共通鍵復号部128及び第2受信部129から構成される。比較部127bは、第3関数部127u及び比較演算部127vを含む。
In this case, the first function unit 113 of the encryption device 110 may derive only the shared key K from G (s) instead of deriving the random value u and the shared key K from the function value G (s). Good.
Specific examples will be described below.
The content distribution system 10 includes an encryption device 110b and a decryption device 120b instead of the encryption device 110 and the decryption device 120, and the encryption device 110b includes a public key input unit 111, a random number generation unit 112, The decryption device 120 includes a first function unit 113b, an encryption unit 114b, a first transmission unit 117b, a common key encryption unit 118, and a second transmission unit 119. As shown in FIG. 121b, a first receiving unit 122b, a decrypting unit 123b, a second function unit 126b, a comparing unit 127b, a common key decrypting unit 128, and a second receiving unit 129. The comparison unit 127b includes a third function unit 127u and a comparison calculation unit 127v.

暗号装置110bが乱数sのハッシュ関数値を生成し、復号装置120bがこのハッシュ関数値を検証する際に、暗号装置110bにおいて、図8の処理系統図に示すように、第1関数部113bは、G(s)を生成し(ステップS103)、G(s)からKを生成する(ステップS104)。
次に、暗号化部114bは、乱数値uを生成し、生成した乱数値uから乱数多項式rを生成し、乱数多項式r及び公開鍵多項式hを用いて乱数sの第1暗号文c1を生成し(ステップS105)、ハッシュ関数値H(s)を生成する(ステップS111)。
When the encryption device 110b generates a hash function value of the random number s and the decryption device 120b verifies the hash function value, the encryption device 110b has a first function unit 113b as shown in the processing system diagram of FIG. , G (s) is generated (step S103), and K is generated from G (s) (step S104).
Next, the encryption unit 114b generates a random number value u, generates a random number polynomial r from the generated random number value u, and generates a first ciphertext c1 of the random number s using the random number polynomial r and the public key polynomial h. Then, the hash function value H (s) is generated (step S111).

次に、第1送信部117bは、第1暗号文c1を送信し(ステップS106)、ハッシュ関数値H(s)を送信する(ステップS112)。
次に、復号装置120bにおいて、第1受信部122bは、第1暗号文c1を受信し(ステップS106)、ハッシュ関数値H(s)を受信する(ステップS112)。
次に、復号化部123bは、秘密鍵多項式fを用いて第1暗号文c1を復号してs’を生成する(ステップS152)。
Next, the first transmission unit 117b transmits the first ciphertext c1 (step S106) and transmits the hash function value H (s) (step S112).
Next, in the decryption device 120b, the first receiving unit 122b receives the first ciphertext c1 (step S106), and receives the hash function value H (s) (step S112).
Next, the decryption unit 123b decrypts the first ciphertext c1 using the secret key polynomial f to generate s ′ (step S152).

次に、第2関数部126は、G(s’)を生成し(ステップS153)、G(s’)からK’を生成する(ステップS154)。
次に、比較部127は、第3関数部127uにより、H(s’)を生成し(ステップS154)、比較演算部127vにより、H(s’)=H(s)が成立するかどうかチェックし(ステップS162)、成立すれば共有鍵K’を出力する(ステップS157)。
Next, the second function unit 126 generates G (s ′) (step S153), and generates K ′ from G (s ′) (step S154).
Next, the comparison unit 127 generates H (s ′) by the third function unit 127u (step S154), and checks whether H (s ′) = H (s) is satisfied by the comparison operation unit 127v. (Step S162), if established, the shared key K ′ is output (Step S157).

また、この場合、さらに安全性を高めるために、特許文献1に開示されている方法を用いて、乱数sに付加情報を附したものを暗号化して第1暗号文c1を生成してもよい。すなわち、図6において、暗号化部114bは、付加情報Raを生成し、sとRaのビット結合s||Raの値を暗号化して第1暗号文c1を生成し、図7において、復号化部123bは、第1暗号文c1を復号してs’||Ra’を生成し、Ra’を除去して復号乱数s’を生成してもよい。   In this case, in order to further increase the safety, the first ciphertext c1 may be generated by encrypting the random number s with additional information using the method disclosed in Patent Document 1. . That is, in FIG. 6, the encryption unit 114b generates the additional information Ra, encrypts the value of the bit combination s || Ra of s and Ra to generate the first ciphertext c1, and in FIG. The unit 123b may decrypt the first ciphertext c1 to generate s ′ || Ra ′, remove Ra ′, and generate the decrypted random number s ′.

また、特許文献1に開示されている通り、s||Raの値の代わりに、sとRaの可逆変換F(s,Ra)の値を用いてもよい。
2.実施の形態2
本発明に係る別の実施の形態としてのコンテンツ配信システム10c(図示していない)について説明する。
Further, as disclosed in Patent Document 1, instead of the value of s || Ra, the value of reversible transformation F (s, Ra) of s and Ra may be used.
2. Embodiment 2
A content distribution system 10c (not shown) as another embodiment according to the present invention will be described.

コンテンツ配信システム10cは、コンテンツ配信システム10を基本としてこれを変形したシステムであり、関数値G(s)から乱数値uと共有鍵Kとの他にさらに検証値aを生成する点と、暗号装置が、乱数sを暗号化した第1暗号文c1を生成して送信する代わりに、検証値aを暗号化した第1暗号文c1と、乱数sを検証値aに基づいて暗号化した第2暗号文c2とを生成して送信する点において、コンテンツ配信システム10と異なる。   The content distribution system 10c is a system obtained by modifying the content distribution system 10 as a base. The content distribution system 10c generates a verification value a in addition to the random value u and the shared key K from the function value G (s). Instead of generating and transmitting the first ciphertext c1 obtained by encrypting the random number s, the apparatus encrypts the first ciphertext c1 obtained by encrypting the verification value a and the random number s based on the verification value a. It differs from the content distribution system 10 in that 2 ciphertext c2 is generated and transmitted.

以下、コンテンツ配信システム10cについて、上記差異点を中心に詳しく説明する。
2.1 コンテンツ配信システム10cの構成
コンテンツ配信システム10cは、コンテンツ配信システム10と同様の構成を有しており、暗号装置110及び復号装置120に代えて、暗号装置110c及び復号装置120cを含んでいる。その他の構成については、コンテンツ配信システム10におけるものと同様であるので説明を省略する。
Hereinafter, the content distribution system 10c will be described in detail focusing on the above differences.
2.1 Configuration of Content Distribution System 10c The content distribution system 10c has the same configuration as the content distribution system 10, and includes an encryption device 110c and a decryption device 120c instead of the encryption device 110 and the decryption device 120. Yes. Since other configurations are the same as those in the content distribution system 10, the description thereof is omitted.

2.2 暗号装置110cの構成
暗号装置110cは、図9に示すように、暗号装置110と同様の構成を有しており、乱数生成部112、第1関数部113、暗号化部114及び第1送信部117に代えて、乱数生成部112c、第1関数部113c、暗号化部114c、乱数マスク部116c及び第1送信部117cを含む。
2.2 Configuration of Encryption Device 110c The encryption device 110c has the same configuration as the encryption device 110, as shown in FIG. 9, and includes a random number generation unit 112, a first function unit 113, an encryption unit 114, and an encryption unit 110. Instead of the one transmission unit 117, a random number generation unit 112c, a first function unit 113c, an encryption unit 114c, a random number mask unit 116c, and a first transmission unit 117c are included.

ここでは、乱数生成部112c、第1関数部113c、暗号化部114c、乱数マスク部116c及び第1送信部117cについて説明する。
(1)乱数生成部112c
乱数生成部112cは、共有鍵Kを生成するための元となるシード値として、乱数sを生成し、生成した乱数sを第1関数部113bと乱数マスク部116cとへ出力する。
Here, the random number generation unit 112c, the first function unit 113c, the encryption unit 114c, the random number mask unit 116c, and the first transmission unit 117c will be described.
(1) Random number generator 112c
The random number generation unit 112c generates a random number s as a seed value for generating the shared key K, and outputs the generated random number s to the first function unit 113b and the random number mask unit 116c.

(2)第1関数部113c
第1関数部113cは、乱数生成部112cから乱数sを受け取り、乱数sの関数値G(s)を生成する。次に、生成した関数値G(s)から検証値aと共有鍵Kと乱数値uとを生成する。
ここで、関数Gは、出力長が3kビットのハッシュ関数であり、第1関数部113cは、関数値G(s)の上位kビットを検証値aとし、関数値G(s)の中間のkビットを共有鍵Kとし、関数値G(s)の下位kビットを乱数値uとする。
(2) First function unit 113c
The first function unit 113c receives the random number s from the random number generation unit 112c and generates a function value G (s) of the random number s. Next, a verification value a, a shared key K, and a random value u are generated from the generated function value G (s).
Here, the function G is a hash function with an output length of 3 k bits, and the first function unit 113 c uses the upper k bits of the function value G (s) as the verification value a, and is an intermediate value between the function values G (s). Let k bits be a shared key K, and the lower k bits of the function value G (s) be a random value u.

次に、第1関数部113cは、生成した検証値aと乱数値uとを暗号化部114cへ出力し、生成した共有鍵Kを共通鍵暗号部118へ出力し、生成した検証値aを乱数マスク部116cへ出力する。
(3)暗号化部114c
暗号化部114cは、公開鍵入力部111から公開鍵多項式hを受け取り、第1関数部113cから検証値aと乱数値uとを受け取り、次に示すようにして、公開鍵多項式hと乱数値uとを用いて検証値aの第1暗号文c1を生成する。ここでは、第1暗号文c1はNTRU暗号による暗号文である。
Next, the first function unit 113c outputs the generated verification value a and the random value u to the encryption unit 114c, outputs the generated shared key K to the common key encryption unit 118, and generates the generated verification value a. It outputs to the random number mask part 116c.
(3) Encryption unit 114c
The encryption unit 114c receives the public key polynomial h from the public key input unit 111, receives the verification value a and the random value u from the first function unit 113c, and performs the public key polynomial h and the random value as follows. u is used to generate a first ciphertext c1 having a verification value a. Here, the first ciphertext c1 is a ciphertext based on the NTRU cipher.

暗号化部114cは、NTRU暗号のパラメータdに対し、d個の項の各係数が「1」であり、他のd個の項の各係数が「−1」であり、残りの項の各係数が「0」となる乱数多項式rを乱数値uから一意に求まるように生成する。具体的には、乱数値uを擬似乱数系列の初期値(乱数シード)として設定し、{0,1,...,N−1}から重複しないように2d個の擬似乱数を選択し、最初のd個の擬似乱数により示される次元の項の係数を「1」とし、他のd個の擬似乱数により示される次元の係数を「−1」とし、残りの項の係数を「0」とすることにより、乱数多項式rを生成する。   The encryption unit 114c is configured such that each coefficient of the d terms is “1”, each coefficient of the other d terms is “−1”, and each of the remaining terms for the parameter d of the NTRU encryption. A random number polynomial r having a coefficient of “0” is generated so as to be uniquely obtained from the random value u. Specifically, the random value u is set as the initial value (random number seed) of the pseudo-random number sequence, and {0, 1,. . . , N−1} are selected so as not to overlap, the coefficient of the dimension term indicated by the first d pseudorandom numbers is set to “1”, and is indicated by the other d pseudorandom numbers. A random number polynomial r is generated by setting the coefficient of the dimension to “−1” and the coefficients of the remaining terms to “0”.

次に、受け取った検証値aがNTRU暗号の暗号アルゴリズムEに適用できるように、暗号化部114cは、検証値aを2進数表現した場合におけるN桁のビット列の各桁の値が、検証値多項式apの各項の係数に対応するように、検証値多項式apを構成することにより、検証値aを検証値多項式apに変換する。例えば、検証値aの下位bビット目の値は、項X^bの係数の値となる。具体的には、検証値a=10010(ビット表現)の場合、検証値多項式ap=X^5+X^2を生成する。   Next, so that the received verification value a can be applied to the NTRU encryption algorithm E, the encryption unit 114c determines that the value of each digit of the N-digit bit string when the verification value a is expressed in binary is a verification value. The verification value polynomial ap is converted to the verification value polynomial ap by configuring the verification value polynomial ap so as to correspond to the coefficient of each term of the polynomial ap. For example, the value of the lower-order b bit of the verification value a is the coefficient value of the term X ^ b. Specifically, when the verification value a = 110010 (bit representation), the verification value polynomial ap = X ^ 5 + X ^ 2 is generated.

次に、暗号化部114cは、公開鍵多項式hを鍵として使用して、乱数多項式rを用いて検証値多項式apに前記暗号アルゴリズムEを施して、暗号文多項式である第1暗号文c1=E(ap,r,h)を生成する。
次に、暗号化部114cは、生成した第1暗号文c1を第1送信部117cへ出力する。
Next, the encryption unit 114c applies the encryption algorithm E to the verification value polynomial ap using the random number polynomial r using the public key polynomial h as a key, and the first ciphertext c1 = E (ap, r, h) is generated.
Next, the encryption unit 114c outputs the generated first ciphertext c1 to the first transmission unit 117c.

(4)乱数マスク部116c
乱数マスク部116cは、乱数生成部112cから乱数sを受け取り、第1関数部113cから検証値aを受け取り、次に、第2暗号文c2=s xor aを生成し、生成した第2暗号文c2を第1送信部117cへ出力する。
ここで、xorは排他的論理和演算を表す演算子である。
(4) Random number mask part 116c
The random number mask unit 116c receives the random number s from the random number generation unit 112c, receives the verification value a from the first function unit 113c, generates a second ciphertext c2 = s xor a, and generates the generated second ciphertext c2 is output to the first transmitter 117c.
Here, xor is an operator representing an exclusive OR operation.

なお、乱数マスク部116cは、排他的論理和に代えて、共有鍵暗号アルゴリズム、加算又は乗算を用いるとしてもよい。
(5)第1送信部117c
第1送信部117cは、暗号化部114cから第1暗号文c1を受け取り、乱数マスク部116cから第2暗号文c2を受け取り、受け取った第1暗号文c1と第2暗号文c2とを、インターネット130を介して復号装置120cへ送信する。
The random number mask unit 116c may use a shared key encryption algorithm, addition, or multiplication instead of the exclusive OR.
(5) First transmission unit 117c
The first transmission unit 117c receives the first ciphertext c1 from the encryption unit 114c, receives the second ciphertext c2 from the random number mask unit 116c, and transmits the received first ciphertext c1 and second ciphertext c2 to the Internet. The data is transmitted to the decoding device 120c via 130.

2.2 復号装置120cの構成
復号装置120cは、図10に示すように、復号装置120と同様の構成を有しており、第1受信部122、復号化部123、第2関数部126及び比較部127に代えて、第1受信部122c、復号化部123c、乱数マスク除去部125c、第2関数部126c及び比較部127cを含む。
2.2 Configuration of Decoding Device 120c As shown in FIG. 10, the decoding device 120c has the same configuration as the decoding device 120, and includes a first receiving unit 122, a decoding unit 123, a second function unit 126, and Instead of the comparison unit 127, a first reception unit 122c, a decryption unit 123c, a random number mask removal unit 125c, a second function unit 126c, and a comparison unit 127c are included.

ここでは、第1受信部122c、復号化部123c、乱数マスク除去部125c、第2関数部126c及び比較部127cについて説明する。
(1)第1受信部122c
第1受信部122cは、インターネット130を介して、暗号装置110cから第1暗号文c1と第2暗号文c2とを受け取り、受け取った第1暗号文c1を復号化部123cへ出力し、受け取った第2暗号文c2を乱数マスク除去部125cへ出力する。
Here, the 1st receiving part 122c, the decoding part 123c, the random number mask removal part 125c, the 2nd function part 126c, and the comparison part 127c are demonstrated.
(1) First receiving unit 122c
The first reception unit 122c receives the first ciphertext c1 and the second ciphertext c2 from the encryption device 110c via the Internet 130, and outputs the received first ciphertext c1 to the decryption unit 123c. The second ciphertext c2 is output to the random number mask removal unit 125c.

(2)復号化部123c
復号化部123cは、秘密鍵入力部121から秘密鍵多項式fを受け取り、第1受信部122cから第1暗号文c1を受け取り、次に示すようにして、秘密鍵多項式fを用いて、第1暗号文c1を復号して復号検証値a’を生成する。ここでは、復号検証値a’はNTRU暗号による復号文である。
(2) Decoding unit 123c
The decryption unit 123c receives the secret key polynomial f from the secret key input unit 121, receives the first ciphertext c1 from the first reception unit 122c, and uses the secret key polynomial f to The ciphertext c1 is decrypted to generate a decryption verification value a ′. Here, the decryption verification value a ′ is a decrypted text by NTRU encryption.

復号化部123cは、秘密鍵多項式fを鍵として使用して、第1暗号文c1に前記復号アルゴリズムDを施して、復号検証値多項式ap’=D(c1,f)を生成する。ここで、復号検証値多項式ap’は、NTRU暗号の復号文であり多項式で表現されているので、復号化部123cは、復号検証値多項式ap’の各項の係数が、2進数表現されたN桁のビット列である復号検証値a’の各桁の値に対応するように、復号検証値多項式ap’を復号検証値a’に変換する。例えば、復号検証値多項式ap’のb次元の項X^bの係数を、復号検証値a’の下位bビット目の値とする。具体的には、復号検証値多項式ap’=X^5+X^2の場合、復号検証値a’=10010(ビット表現)に変換する。   The decryption unit 123c applies the decryption algorithm D to the first ciphertext c1 using the secret key polynomial f as a key to generate a decryption verification value polynomial ap ′ = D (c1, f). Here, since the decryption verification value polynomial ap ′ is a decrypted text of the NTRU cipher and is expressed by a polynomial, the decryption unit 123 c has expressed the coefficients of each term of the decryption verification value polynomial ap ′ in binary numbers. The decryption verification value polynomial ap ′ is converted into the decryption verification value a ′ so as to correspond to the value of each digit of the decryption verification value a ′ which is an N-digit bit string. For example, the coefficient of the b-dimensional term X ^ b of the decryption verification value polynomial ap ′ is set as the value of the lower b bits of the decryption verification value a ′. Specifically, in the case of the decryption verification value polynomial ap ′ = X ^ 5 + X ^ 2, the decryption verification value a ′ is converted to 10010 (bit representation).

次に、復号化部123cは、生成した復号検証値a’を乱数マスク除去部125cへ出力し、受け取った第1暗号文c1を比較部127cへ出力する。
(3)乱数マスク除去部125c
乱数マスク除去部125cは、第1受信部122cから第2暗号文c2を受け取り、復号化部123cから復号検証値a’を受け取り、
復号乱数s’=c2 xor a’を生成し、生成した復号乱数s’を第2関数部126cへ出力する。
Next, the decryption unit 123c outputs the generated decryption verification value a ′ to the random number mask removal unit 125c, and outputs the received first ciphertext c1 to the comparison unit 127c.
(3) Random number mask removal unit 125c
The random number mask removal unit 125c receives the second ciphertext c2 from the first reception unit 122c, receives the decryption verification value a ′ from the decryption unit 123c,
A decrypted random number s ′ = c2 xor a ′ is generated, and the generated decrypted random number s ′ is output to the second function unit 126c.

なお、乱数マスク部116cが、排他的論理和に代えて、共有鍵暗号アルゴリズム、加算又は乗算を用いる場合において、乱数マスク除去部125cは、それぞれ、共有鍵暗号アルゴリズムに対応する共有鍵復号アルゴリズム、減算、又は除算を用いるとしてもよい。
(4)第2関数部126c
第2関数部126cは、第1関数部113cが有する関数と同じ関数Gによるアルゴリズムを有している。
When the random number mask unit 116c uses a shared key encryption algorithm, addition or multiplication instead of exclusive OR, the random number mask removal unit 125c includes a shared key decryption algorithm corresponding to the shared key encryption algorithm, Subtraction or division may be used.
(4) Second function unit 126c
The second function unit 126c has an algorithm based on the same function G as the function of the first function unit 113c.

第2関数部126cは、乱数マスク除去部125cから復号乱数s’を受け取り、受け取った復号乱数s’の関数値G(s’)を生成する。次に、第1関数部113cと同様にして、関数値G(s’)から検証値a’’と共有鍵K’と乱数値u’とを生成し、生成した検証値a’’と共有鍵K’と乱数値u’とを比較部127cへ出力する。
(5)比較部127c
比較部127cは、図10に示すように、比較演算部127s及び暗号化部127tから構成されている。
The second function unit 126c receives the decrypted random number s ′ from the random number mask removing unit 125c, and generates a function value G (s ′) of the received decrypted random number s ′. Next, similarly to the first function unit 113c, a verification value a ″, a shared key K ′, and a random value u ′ are generated from the function value G (s ′) and shared with the generated verification value a ″. The key K ′ and the random number u ′ are output to the comparison unit 127c.
(5) Comparison unit 127c
As shown in FIG. 10, the comparison unit 127c includes a comparison operation unit 127s and an encryption unit 127t.

暗号化部127tは、秘密鍵入力部121から公開鍵多項式hを受け取り、第2関数部126cから検証値a’’と乱数値u’とを受け取り、受け取った公開鍵多項式hと乱数値u’を用いて、暗号化部114cと同様にして検証値a’’を暗号化して第1再暗号文c1’を生成し、生成した第1再暗号文c1’を比較演算部127sへ出力する。
また、比較演算部127sは、第2関数部126cから共有鍵K’を受け取り、復号化部123cから第1暗号文c1を受け取り、暗号化部127tから第1再暗号文c1’を受け取り、次に、受け取った第1暗号文c1と、受け取った第1再暗号文c1’とを比較し、第1暗号文c1=第1再暗号文c1’であると判断する場合に、受け取った共有鍵K’を共通鍵復号部128へ出力する。
The encryption unit 127t receives the public key polynomial h from the secret key input unit 121, receives the verification value a ″ and the random value u ′ from the second function unit 126c, and receives the received public key polynomial h and the random value u ′. , The verification value a ″ is encrypted in the same manner as the encryption unit 114c to generate the first re-ciphertext c1 ′, and the generated first re-ciphertext c1 ′ is output to the comparison operation unit 127s.
The comparison operation unit 127s receives the shared key K ′ from the second function unit 126c, receives the first ciphertext c1 from the decryption unit 123c, receives the first re-ciphertext c1 ′ from the encryption unit 127t, When the received first ciphertext c1 is compared with the received first reciphertext c1 ′, and it is determined that first ciphertext c1 = first reciphertext c1 ′, the received shared key K ′ is output to the common key decryption unit 128.

2.3 コンテンツ配信システム10cの動作
以下に、実施の形態2におけるコンテンツ配信システム10cの全体の動作について、図11に示す処理系統図を用いて、説明する。
暗号装置110cは、復号装置120cの公開鍵多項式hを受け取り(ステップS101)、乱数sを生成し(ステップS102)、関数値G(s)を求め、関数値G(s)から検証値a、共有鍵K及び乱数値uを導出する(ステップS121)。次に、暗号装置110cは、検証値aを、公開鍵多項式h及び乱数値uを用いてNTRU暗号により暗号化して第1暗号文c1を生成し(ステップS105)、検証値aに基づき乱数sを暗号化して第2暗号文c2=s xor aを生成する(ステップS122)。次に、暗号装置110cは、第1暗号文c1と第2暗号文c2とをインターネット130を介して復号装置120cへ送信する(ステップS106)。
2.3 Operation of Content Distribution System 10c The overall operation of the content distribution system 10c according to the second embodiment will be described below using the processing system diagram shown in FIG.
The encryption device 110c receives the public key polynomial h of the decryption device 120c (step S101), generates a random number s (step S102), obtains a function value G (s), and verifies the verification value a from the function value G (s). A shared key K and a random value u are derived (step S121). Next, the encryption device 110c generates the first ciphertext c1 by encrypting the verification value a by the NTRU encryption using the public key polynomial h and the random value u (step S105), and generates a random number s based on the verification value a. Is encrypted to generate a second ciphertext c2 = s xor a (step S122). Next, the encryption device 110c transmits the first ciphertext c1 and the second ciphertext c2 to the decryption device 120c via the Internet 130 (step S106).

すなわち、この暗号装置110cは、以下の処理を行い、暗号文C=(c1,c2)を復号装置120cへ送信する。
(a)乱数sを生成する。
(b)G(s)を生成し、G(s)からa、K、uを生成する。
(c)公開鍵多項式h、乱数値uを用いて検証値aの第1暗号文c1を生成する。
That is, the encryption device 110c performs the following processing and transmits the ciphertext C = (c1, c2) to the decryption device 120c.
(A) Generate a random number s.
(B) G (s) is generated, and a, K, and u are generated from G (s).
(C) The first cipher text c1 of the verification value a is generated using the public key polynomial h and the random value u.

(d)c2=s xor aを生成する。
次に、暗号装置110cは、導出した共有鍵Kを用いて、コンテンツサーバ装置140から受け取った平文mi(1≦i≦n)を共通鍵暗号方式により暗号化して暗号文Ci(1≦i≦n)を生成し(ステップS107)、インターネット130を介して復号装置120cへ送信する(ステップS108)。
(D) Generate c2 = s xor a.
Next, the encryption device 110c encrypts the plaintext mi (1 ≦ i ≦ n) received from the content server device 140 using the derived shared key K by the common key encryption method, and the ciphertext Ci (1 ≦ i ≦ n). n) is generated (step S107) and transmitted to the decryption device 120c via the Internet 130 (step S108).

一方、復号装置120cは、復号装置120cの秘密鍵多項式f及び公開鍵多項式hを受け取り(ステップS151)、インターネット130を介して暗号装置110cから第1暗号文c1と第2暗号文c2を受信し(ステップS106)、第1暗号文c1を秘密鍵多項式fを用いて復号して復号検証値a’を生成する(ステップS152)。次に、復号検証値a’に基づき第2暗号文c2を復号して、復号乱数s’=c2 xor a’を生成する(ステップS171)。次に、復号装置120cは、復号乱数s’の関数値G(s’)から検証値a’’、共有鍵K’及び乱数値u’を導出する(ステップS172)。さらに、検証値a’’を暗号化して第1再暗号文c1’を生成し(ステップS155)、c1’=c1であれば(ステップS156)、共有鍵K’を出力する(ステップS157)。   On the other hand, the decryption device 120c receives the private key polynomial f and the public key polynomial h of the decryption device 120c (step S151), and receives the first ciphertext c1 and the second ciphertext c2 from the encryption device 110c via the Internet 130. (Step S106) The first ciphertext c1 is decrypted using the secret key polynomial f to generate a decryption verification value a ′ (step S152). Next, the second ciphertext c2 is decrypted based on the decryption verification value a ′ to generate a decrypted random number s ′ = c2 xor a ′ (step S171). Next, the decryption device 120c derives the verification value a ″, the shared key K ′, and the random value u ′ from the function value G (s ′) of the decrypted random number s ′ (Step S172). Further, the verification value a ″ is encrypted to generate the first re-ciphertext c1 ′ (step S155). If c1 ′ = c1 (step S156), the shared key K ′ is output (step S157).

すなわち、この復号装置120cは、以下の処理を行い、共有鍵K’を導出する。
(a)秘密鍵多項式fを用いて第1暗号文c1を復号してa’を生成する。
(b)s’=c2 xor a’を生成する。
(c)G(s’)を生成し、G(s’)からa’’、K’、u’を生成する。
(d)公開鍵多項式h、乱数値u’を用いてa’’の第1再暗号文c1’を生成する。
That is, the decryption device 120c performs the following process to derive the shared key K ′.
(A) Decrypt the first ciphertext c1 using the secret key polynomial f to generate a ′.
(B) Generate s ′ = c2 xor a ′.
(C) G (s ′) is generated, and a ″, K ′, and u ′ are generated from G (s ′).
(D) The first recipher text c1 ′ of a ″ is generated using the public key polynomial h and the random value u ′.

(e)c1’=c1が成立するかどうかチェックする。成立すれば共有鍵K’を出力する。
ここで、暗号装置110cで用いられた公開鍵多項式hに対応する正しい秘密鍵多項式fが復号装置120cで用いられれば、第1暗号文c1は正しく復号されて、復号検証値a’=aとなり、第2暗号文c2とa’から生成される復号乱数s’=sとなる。従って、G(s’)から導出される検証値a’’=aとなり、共有鍵K’=Kとなり、乱数値u’=uとなる。こうして、a’’=a及びu’=uが成り立つので、c1’=c1が成り立ち、復号装置120cは暗号装置110cと同じ共有鍵Kを導出できることになる。
(E) Check whether c1 ′ = c1 holds. If it is established, the shared key K ′ is output.
Here, if the correct secret key polynomial f corresponding to the public key polynomial h used in the encryption device 110c is used in the decryption device 120c, the first ciphertext c1 is correctly decrypted and the decryption verification value a ′ = a is obtained. The decrypted random number s ′ = s generated from the second ciphertext c2 and a ′. Therefore, the verification value a ″ derived from G (s ′) = a, the shared key K ′ = K, and the random value u ′ = u. Thus, since a ″ = a and u ′ = u hold, c1 ′ = c1 holds, and the decryption device 120c can derive the same shared key K as the encryption device 110c.

次に、復号装置120cは、インターネット130を介して暗号装置110cから共通鍵暗号文Ci(1≦i≦n)を受信し(ステップS108)、導出した共有鍵K’(=K)を用いて、受信した共通鍵暗号文Ci(1≦i≦n)を共通鍵暗号方式により復号して復号文mi’(1≦i≦n)を生成し(ステップS158)、復号文mi’(1≦i≦n)を再生装置150へ出力する。   Next, the decryption device 120c receives the common key ciphertext Ci (1 ≦ i ≦ n) from the encryption device 110c via the Internet 130 (step S108), and uses the derived shared key K ′ (= K). The received common key cipher text Ci (1 ≦ i ≦ n) is decrypted by the common key cryptosystem to generate a decrypted text mi ′ (1 ≦ i ≦ n) (step S158), and the decrypted text mi ′ (1 ≦ 1) is generated. i ≦ n) is output to the playback device 150.

ここで、共通鍵暗号文生成時に用いた暗号鍵Kと復号文生成時に用いる暗号鍵K’とは同一であるので、復号装置120cは、正しい復号文mi'=mi(1≦i≦n)を得ることができる。
なお、復号エラーが発生した場合には、復号検証値a’と検証値aとは異なるので、第2暗号文c2から得られる復号乱数s’はsと異なる。従って、G(s’)から導出される乱数値u’及び共有鍵K’は、それぞれu、Kとは異なる。しかし、この場合、a’、u’がそれぞれa、uと異なるために第1再暗号文c1’は第1暗号文c1と異なるので、復号装置120cは、共有鍵K’を出力しない。
Here, since the encryption key K used at the time of generating the common key ciphertext and the encryption key K ′ used at the time of generating the decrypted text are the same, the decryption device 120c determines that the correct decrypted text mi ′ = mi (1 ≦ i ≦ n). Can be obtained.
When a decryption error occurs, the decryption verification value a ′ and the verification value a are different, and therefore the decryption random number s ′ obtained from the second ciphertext c2 is different from s. Therefore, the random value u ′ and the shared key K ′ derived from G (s ′) are different from u and K, respectively. However, in this case, since a ′ and u ′ are different from a and u, respectively, the first re-ciphertext c1 ′ is different from the first ciphertext c1, and thus the decryption device 120c does not output the shared key K ′.

2.4 実施の形態2における効果
従来のRSA−KEMアルゴリズムでは、秘密鍵を知らなければ暗号文Cから導出できない要素sをハッシュ関数Gに入力して共有鍵Kを導出する。しかしながら、NTRU暗号を用いて、鍵カプセル化メカニズムであるRSA−KEMアルゴリズムを適用して共有鍵の配送を行おうとすると、復号エラーが発生する場合があるため、秘密鍵を用いても要素sが導出できず、従って正しくない共有鍵K’を導出する場合がある。
2.4 Effects in Embodiment 2 In the conventional RSA-KEM algorithm, the element s that cannot be derived from the ciphertext C without knowing the secret key is input to the hash function G to derive the shared key K. However, if an attempt is made to deliver a shared key by applying the RSA-KEM algorithm, which is a key encapsulation mechanism, using NTRU encryption, a decryption error may occur. In some cases, the shared key K ′ that cannot be derived and therefore incorrect is derived.

しかしながら、実施の形態2のコンテンツ配信システム、暗号装置及び復号装置は、乱数sのハッシュ関数値G(s)から共有鍵に加えて検証値aと乱数値uとを生成し、復号装置が乱数値uと公開鍵多項式hとを用いて復号検証値a’を再暗号化して第1再暗号文c1’を生成し、第1再暗号文c1’が第1暗号文c1と同じ値でない限り共有鍵Kを出力しないので、復号エラーが発生した場合、暗号装置と復号装置との間で異なる鍵が導出されるのを防止できる。   However, the content distribution system, the encryption device, and the decryption device of the second embodiment generate the verification value a and the random value u in addition to the shared key from the hash function value G (s) of the random number s, and the decryption device is disturbed. The first re-ciphertext c1 ′ is generated by re-encrypting the decryption verification value a ′ using the numerical value u and the public key polynomial h, and the first re-ciphertext c1 ′ is not the same value as the first ciphertext c1. Since the shared key K is not output, it is possible to prevent different keys from being derived between the encryption device and the decryption device when a decryption error occurs.

また、本発明による方式は、非特許文献3に記述されている証明方法と同様の方法により、理論的にその安全性が証明できる。
2.5 変形例
上記に説明した実施の形態2は、本発明の実施の一例であり、本発明はこの実施の形態に何ら限定されるものではなく、その主旨を逸脱しない範囲において種々なる態様で実施し得るものである。実施の形態1におけるのと同様の変形を施すことができるのはもちろんであるが、以下のような場合も本発明に含まれる。
Further, the method according to the present invention can theoretically prove its safety by a method similar to the proof method described in Non-Patent Document 3.
2.5 Modifications Embodiment 2 described above is an example of the implementation of the present invention, and the present invention is not limited to this embodiment at all, and various aspects can be made without departing from the scope of the present invention. Can be implemented. Of course, modifications similar to those in the first embodiment can be made, but the following cases are also included in the present invention.

(1)検証値aから検証値多項式apへの変換は、他の変換方法でもよい。例えば、ビット列の各ビットの値と多項式の各項の係数とを1対1に対応させる関数を用いて変換してもよいし、また、ビット列の各ビットの値と多項式の各項の係数とを1対1に対応させて記憶している関数値テーブルを用いて変換してもよい。
また、乱数値uから乱数多項式rへの変換は、他の変換方法でもよい。例えば、uからrが一意に求まり、d個の次元の項の係数を「1」とし、d個の次元の項の係数を「一1」とし、他の次元の項の係数は「0」となるようにすれば、他の変換方法でもよい。例えば、乱数値uを多項式に対応させる関数、又は関数値テーブルを用いて変換してもよい。
(1) The conversion from the verification value a to the verification value polynomial ap may be performed by another conversion method. For example, the value of each bit of the bit string and the coefficient of each term of the polynomial may be converted using a function that has a one-to-one correspondence, or the value of each bit of the bit string and the coefficient of each term of the polynomial May be converted using a function value table stored in a one-to-one correspondence.
Further, the conversion from the random value u to the random number polynomial r may be performed by another conversion method. For example, r is uniquely obtained from u, the coefficient of the d-dimensional term is “1”, the coefficient of the d-dimensional term is “one”, and the coefficient of the other-dimensional term is “0”. If so, other conversion methods may be used. For example, the random value u may be converted using a function corresponding to a polynomial or a function value table.

(2)暗号化部114c及び復号化部123cで用いる公開鍵暗号は、暗号化部114cにおいて、検証値aを公開鍵と乱数値uを用いて暗号化して第1暗号文c1を生成し、復号化部123cにおいて、第1暗号文c1を秘密鍵で復号して、検証値aと等しい復号検証値a’を生成できればよい。従って、暗号化部114c及び復号化部123cで用いる公開鍵暗号は、NTRU暗号以外に、乱数を用いる公開鍵暗号ならばどんな暗号であってもよい。   (2) The public key encryption used in the encryption unit 114c and the decryption unit 123c is the encryption unit 114c that encrypts the verification value a using the public key and the random value u to generate a first ciphertext c1. The decryption unit 123c only needs to be able to decrypt the first ciphertext c1 with the secret key and generate a decryption verification value a ′ equal to the verification value a. Accordingly, the public key encryption used in the encryption unit 114c and the decryption unit 123c may be any encryption as long as it is a public key encryption using a random number other than the NTRU encryption.

例えば、ElGamal暗号ならば、h、fをそれぞれElGamal暗号の公開鍵、秘密鍵とし、暗号化部114cにおいて、aをhと乱数値uを用いて暗号化してc1を生成し、復号化部123cにおいて、c1をfを用いて復号してa’を生成すればよい。
(3)乱数値uは、第1関数部113c及び第2関数部126cで生成される以外にも、暗号装置110cと復号装置120cとで同じ値を得られれば、他の生成方法でもよい。
For example, in the case of ElGamal encryption, h and f are respectively used as public and private keys of ElGamal encryption, and in the encryption unit 114c, a is encrypted using h and a random value u to generate c1, and the decryption unit 123c In this case, c1 may be decoded using f to generate a ′.
(3) The random value u may be generated by the first function unit 113c and the second function unit 126c as long as the same value can be obtained by the encryption device 110c and the decryption device 120c.

例えば、任意の関数Funcに対し、u=Func(s)として暗号装置110cと復号装置120cとで同じ値を得られるようにしてもよい。すなわち、
・G(s)を生成し、G(s)からa、Kを生成する。
・Func(s)を生成し、u=Func(s)とする。
としてもよい。
For example, for an arbitrary function Func, the same value may be obtained by the encryption device 110c and the decryption device 120c as u = Func (s). That is,
Generate G (s) and generate a and K from G (s).
Generate Func (s) and set u = Func (s).
It is good.

(4)さらに、乱数値uについては、第1関数部113c及び第2関数部126cで生成される以外にも、暗号装置110cと復号装置120cとで同じ値が得られればよいため、暗号装置110cが乱数値uを復号装置120cに直接送信してもよい。
すなわち、以下のように、暗号装置110cは、暗号文Cと乱数値uとを復号装置120bに送信してもよい。また、乱数値uを暗号化して送信してもよい。
(4) Furthermore, for the random value u, it is only necessary that the same value is obtained by the encryption device 110c and the decryption device 120c in addition to being generated by the first function unit 113c and the second function unit 126c. 110c may directly transmit the random value u to the decryption device 120c.
That is, as described below, the encryption device 110c may transmit the ciphertext C and the random number value u to the decryption device 120b. Further, the random value u may be encrypted and transmitted.

・G(s)を生成し、G(s)からa、Kを生成する。
・暗号装置110cは、別途、乱数値uを、120bへ送信する。
(5)さらに、乱数値uについては、暗号装置110cと復号装置120cとで同じ値が得られればよいため、乱数値uの一部である部分情報を第1関数部113c及び第2関数部126cで生成し、乱数値uの残りの部分情報を暗号装置110cから復号装置120cに直接送信してもよい。
Generate G (s) and generate a and K from G (s).
The encryption device 110c separately transmits the random value u to 120b.
(5) Furthermore, for the random value u, it is only necessary to obtain the same value in the encryption device 110c and the decryption device 120c. The remaining partial information of the random number u may be directly transmitted from the encryption device 110c to the decryption device 120c.

例えば、以下のように、暗号装置110cは、暗号文Cと乱数値u2を復号装置120cに送信してもよい。また、暗号装置110cは、乱数値u2を暗号化して送信してもよい。
・G(s)を生成し、G(s)からa、K、u1を生成する。
・暗号装置110cは、別途、乱数値u2を復号装置120cへ送信する。
For example, as described below, the encryption device 110c may transmit the ciphertext C and the random value u2 to the decryption device 120c. Further, the encryption device 110c may encrypt the random value u2 and transmit it.
Generate G (s) and generate a, K, u1 from G (s).
The encryption device 110c separately transmits the random value u2 to the decryption device 120c.

・暗号装置110cは、乱数値u=u1 xor u2を生成する。
(6)復号装置120cは、第1暗号文c1が第2関数部126cで得られる検証値a’’の暗号文かどうかチェックを行い、c1がa’’の暗号文であるときに共有鍵K’を用いて共通鍵暗号文Ciを復号しているが、第1暗号文c1が復号検証値a’の暗号文かどうかをチェックしてもよい。
The encryption device 110c generates a random value u = u1 xor u2.
(6) The decryption device 120c checks whether the first ciphertext c1 is the ciphertext of the verification value a ″ obtained by the second function unit 126c, and when c1 is the ciphertext of a ″, the shared key Although the common key ciphertext Ci is decrypted using K ′, it may be checked whether the first ciphertext c1 is the ciphertext of the decryption verification value a ′.

(7)復号装置120cは、第1暗号文c1が第2関数部126cで得られる検証値a’’の暗号文かどうかチェックを行い、c1がa’’の暗号文であるときに共有鍵K’を用いて共通鍵暗号文Ciを復号しているが、図12の処理系統図のステップS156に示すように、比較部127cにおいて、復号化部123cが復号したa’の値と第2関数部126cが生成したa’’の値が等しいかどうかをチェックしてもよい。   (7) The decryption apparatus 120c checks whether the first ciphertext c1 is the ciphertext of the verification value a ″ obtained by the second function unit 126c, and when c1 is the ciphertext of a ″, the shared key The common key ciphertext Ci is decrypted using K ′. As shown in step S156 of the processing system diagram of FIG. 12, the comparison unit 127c uses the value of a ′ decrypted by the decryption unit 123c and the second value. It may be checked whether the values of a ″ generated by the function unit 126c are equal.

(8)復号エラー発生により暗号装置110cと復号装置120cとの間で異なる鍵が導出されるのを防止するため、第1再暗号文c1’が第1暗号文c1と同じ値かどうかを検証して共有鍵K’を出力する代わりに、暗号装置110cが乱数s、検証値a、乱数値u、共有鍵Kのいずれか1つ以上について、ハッシュ関数値を生成し、生成したハッシュ関数値を復号装置120cへ送信し、復号装置120cがこのハッシュ関数値を検証して共有鍵K’を出力するか否かを決定してもよいし、安全性を高めるために、特許文献1に開示されている方法を用いてもよい。すなわち、実施の形態1の変形例(8)を適用してもよい。   (8) In order to prevent different keys from being derived between the encryption device 110c and the decryption device 120c due to the occurrence of a decryption error, it is verified whether or not the first re-ciphertext c1 ′ has the same value as the first ciphertext c1. Then, instead of outputting the shared key K ′, the cryptographic device 110c generates a hash function value for any one or more of the random number s, the verification value a, the random value u, and the shared key K, and the generated hash function value Is transmitted to the decryption device 120c, and the decryption device 120c verifies the hash function value to determine whether or not to output the shared key K ′, and is disclosed in Patent Document 1 in order to increase security. The method that is used may be used. That is, the modification (8) of the first embodiment may be applied.

3.実施の形態1及び実施の形態2のまとめ
以上説明したように、本発明は、共有鍵データと、予め与えられた公開鍵データに基づいて前記共有鍵データを暗号化した暗号化共有鍵データを出力する共有鍵生成装置であって、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて乱数データと前記共有鍵データに変換する共有鍵導出部と、前記秘密数データを前記公開鍵データと前記乱数データに基づいて暗号化して暗号化共有鍵データを生成する第1の暗号化部とを備える。
3. Summary of Embodiments 1 and 2 As described above, the present invention provides shared key data and encrypted shared key data obtained by encrypting the shared key data based on public key data given in advance. A shared key generation device that outputs, a secret number data generation unit that generates secret number data; a shared key derivation unit that converts the secret number data into random number data and the shared key data based on a predetermined process; A first encryption unit configured to encrypt the secret number data based on the public key data and the random number data to generate encrypted shared key data.

また、本発明は、共有鍵データと、予め与えられた公開鍵データに基づいて前記共有鍵データを暗号化した暗号化共有鍵データを出力する共有鍵生成装置であって、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて検証値データと乱数データと前記共有鍵データに変換する共有鍵導出部と、前記検証値データを前記公開鍵データと前記乱数データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記秘密数データを前記検証値データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部とを備え、前記暗号化共有鍵データは、前記第1の暗号予備データと前記第2の暗号予備データから構成される。   Further, the present invention is a shared key generation device that outputs shared key data and encrypted shared key data obtained by encrypting the shared key data based on public key data given in advance, and generates secret number data A secret number data generation unit, a shared key derivation unit that converts the secret number data into verification value data, random number data, and the shared key data based on a predetermined process, the verification value data as the public key data, and the A first encryption unit for encrypting based on random number data to generate first encrypted preliminary data; and a first encryption unit for generating second encrypted preliminary data by encrypting the secret number data based on the verification value data. 2, and the encrypted shared key data includes the first encryption preliminary data and the second encryption preliminary data.

ここで、前記第2の暗号化部は、前記秘密数データと前記検証値データの排他的論理和演算を行って前記第2の暗号予備データを生成するとしてもよい。
ここで、前記第2の暗号化部は、前記秘密数データを、前記検証値データを暗号鍵として用いて共通鍵暗号方式により暗号化して前記第2の暗号予備データを生成するとしてもよい。
Here, the second encryption unit may generate the second encryption preliminary data by performing an exclusive OR operation on the secret number data and the verification value data.
Here, the second encryption unit may generate the second encryption preliminary data by encrypting the secret number data by a common key encryption method using the verification value data as an encryption key.

ここで、前記第2の暗号化部は、前記秘密数データに前記検証値データを加算して前記第2の暗号予備データを生成するとしてもよい。
ここで、前記第2の暗号化部は、前記秘密数データに前記検証値データを乗算して前記第2の暗号予備データを生成するとしてもよい。
ここで、前記暗号化共有鍵データは、前記第1の暗号予備データと前記第2暗号予備データのビット連結データであるとしてもよい。
Here, the second encryption unit may generate the second encryption preliminary data by adding the verification value data to the secret number data.
Here, the second encryption unit may generate the second encrypted preliminary data by multiplying the secret number data by the verification value data.
Here, the encrypted shared key data may be bit concatenated data of the first encrypted preliminary data and the second encrypted preliminary data.

ここで、前記第1の暗号化部は、NTRU暗号方式により暗号化して前記暗号化共有鍵データを生成するとしてもよい。
ここで、前記第1の暗号化部は、NTRU暗号方式により暗号化して前記第1の暗号予備データを生成するとしてもよい。
ここで、前記秘密数データは、ランダムに生成される乱数であるとしてもよい。
Here, the first encryption unit may generate the encrypted shared key data by encrypting with the NTRU encryption method.
Here, the first encryption unit may generate the first encryption preliminary data by performing encryption using the NTRU encryption method.
Here, the secret number data may be a randomly generated random number.

ここで、前記共有鍵導出部は、所定の処理として、一方向性ハッシュ関数を用いるとしてもよい。
また、本発明は、予め与えられた秘密鍵データ及び公開鍵データに基づいて、暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記暗号化共有鍵データを前記秘密鍵データに基づいて復号化して秘密数データを生成する第1の復号化部と、前記秘密数データを所定の処理に基づいて乱数データと前記共有鍵データに変換する共有鍵導出部と、前記秘密数データを前記公開鍵データと前記乱数データに基づいて暗号化して再暗号化共有鍵データを生成する第3の暗号化部とを備え、前記暗号化共有鍵データと前記再暗号化共有鍵データが一致する場合に、前記共有鍵データを出力する。
Here, the shared key derivation unit may use a one-way hash function as the predetermined process.
Further, the present invention provides a shared key restoration device that decrypts encrypted shared key data and outputs shared key data based on secret key data and public key data given in advance, wherein the encrypted shared key data A first decryption unit that decrypts the secret number data based on the secret key data to generate secret number data, and a shared key derivation unit that converts the secret number data into random number data and the shared key data based on a predetermined process And a third encryption unit that encrypts the secret number data based on the public key data and the random number data to generate re-encrypted shared key data, and the encrypted shared key data and the re-encrypted data If the shared shared key data match, the shared key data is output.

また、本発明は、予め与えられた秘密鍵データ及び公開鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記第2の暗号予備データを前記検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと乱数データと前記共有鍵データに変換する共有鍵導出部と、前記検証値検証データを前記公開鍵データと前記乱数データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記第1の暗号予備データと前記第3の暗号予備データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on the secret key data and the public key data given in advance, thereby sharing the shared key data. A first decryption unit that decrypts the first encryption preliminary data based on the secret key data to generate verification value data; and the second encryption preliminary data A second decryption unit that decrypts the secret number data based on the verification value data to generate secret number data, and converts the secret number data into verification value verification data, random number data, and the shared key data based on a predetermined process And a third encryption unit that encrypts the verification value verification data based on the public key data and the random number data to generate third encryption preliminary data. Encryption spare data When the third encryption preliminary data matches, we output the shared key data.

また、本発明は、予め与えられた秘密鍵データ及び公開鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記第2の暗号予備データを前記検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと乱数データと前記共有鍵データに変換する共有鍵導出部と、前記検証値データを前記公開鍵データと前記乱数データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記第1の暗号予備データと前記第3の暗号予備データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on the secret key data and the public key data given in advance, thereby sharing the shared key data. A first decryption unit that decrypts the first encryption preliminary data based on the secret key data to generate verification value data; and the second encryption preliminary data A second decryption unit that decrypts the secret number data based on the verification value data to generate secret number data, and converts the secret number data into verification value verification data, random number data, and the shared key data based on a predetermined process A shared key derivation unit, and a third encryption unit that encrypts the verification value data based on the public key data and the random number data to generate third encryption preliminary data. Preliminary data and previous If the third encryption preliminary data matches, it outputs the shared key data.

ここで、前記第2の復号化部は、前記第2の暗号予備データと前記検証値データの排他的論理和演算を行って前記秘密数データを生成するとしてもよい。
ここで、前記第2の復号化部は、前記第2の暗号予備データを、前記検証値データを暗号鍵として用いて共通鍵暗号方式により復号化して前記秘密数データを生成するとしてもよい。
Here, the second decryption unit may generate the secret number data by performing an exclusive OR operation on the second encryption preliminary data and the verification value data.
Here, the second decryption unit may decrypt the second encrypted preliminary data by a common key encryption method using the verification value data as an encryption key to generate the secret number data.

ここで、前記第2の復号化部は、前記第2の暗号予備データに前記検証値データを減算して前記秘密数データを生成するとしてもよい。
ここで、前記第2の暗号化部は、前記第2の暗号予備データを前記検証値データで除算して前記秘密数データ第2の秘密数データを生成するとしてもよい。
ここで、前記第1の復号化部は、NTRU暗号方式により復号化して前記共有鍵データを生成するとしてもよい。
Here, the second decryption unit may generate the secret number data by subtracting the verification value data from the second encrypted preliminary data.
Here, the second encryption unit may generate the secret number data second secret number data by dividing the second encryption preliminary data by the verification value data.
Here, the first decryption unit may generate the shared key data by decrypting using the NTRU encryption method.

ここで、前記第1の復号化部は、NTRU暗号方式により復号化して前記検証値データを生成するとしてもよい。
ここで、前記共有鍵導出部は、所定の処理として、一方向性ハッシュ関数を用いるとしてもよい。
また、本発明は、予め与えられた公開鍵データに基づいて平文データを暗号化した暗号文データを生成する暗号装置であって、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて乱数データと共有鍵データに変換する共有鍵導出部と、前記秘密数データを前記公開鍵データと前記乱数データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記平文データを前記共有鍵データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部とを備え、前記暗号文データは、前記第1の暗号予備データと前記第2の暗号予備データから構成される。
Here, the first decryption unit may generate the verification value data by decrypting using the NTRU encryption method.
Here, the shared key derivation unit may use a one-way hash function as the predetermined process.
Further, the present invention is an encryption device that generates ciphertext data obtained by encrypting plaintext data based on public key data given in advance, and includes a secret number data generation unit that generates secret number data, and the secret number A shared key derivation unit that converts data into random number data and shared key data based on a predetermined process, and generates the first encrypted preliminary data by encrypting the secret number data based on the public key data and the random number data And a second encryption unit that encrypts the plaintext data based on the shared key data to generate second encrypted preliminary data, and the ciphertext data includes: 1 encryption preliminary data and the second encryption preliminary data.

また、本発明は、予め与えられた秘密鍵データ及び公開鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号文データを復号して復号文データを出力する復号装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して秘密数データを生成する第1の復号化部と、前記秘密数データを所定の処理に基づいて乱数データと共有鍵データに変換する共有鍵導出部と、前記秘密数データを前記公開鍵データと前記乱数データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記第1の暗号予備データと前記第3の暗号予備データが一致する場合に、前記第2の暗号予備データを前記共有鍵に基づいて復号化して前記復号文データを生成する復号部とを備える。   Further, the present invention decrypts ciphertext data composed of the first encryption preliminary data and the second encryption preliminary data based on the pre-given secret key data and public key data, and outputs the decrypted text data A decryption device for decrypting the first encryption preliminary data based on the secret key data to generate secret number data; and the secret number data based on a predetermined process. A shared key derivation unit that converts random number data and shared key data; a third encryption unit that encrypts the secret number data based on the public key data and the random number data to generate third encrypted preliminary data; A decrypting unit that decrypts the second encrypted preliminary data based on the shared key and generates the decrypted text data when the first encrypted preliminary data and the third encrypted preliminary data match. And with .

また、本発明は、予め与えられた公開鍵データに基づいて平文データを暗号化した暗号文データを生成する暗号装置、及び予め与えられた秘密鍵データ及び公開鍵データに基づいて暗号文データを復号して復号文データを出力する復号装置からなる暗号システムである。前記暗号装置は、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて乱数データと共有鍵データに変換する共有鍵導出部と、前記秘密数データを前記公開鍵データと前記乱数データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記平文データを前記共有鍵データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部とを備え、前記暗号文データは、前記第1の暗号予備データと前記第2の暗号予備データと前記第3の暗号予備データから構成される。前記復号装置は、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して秘密数データを生成する第1の復号化部と、前記秘密数データを所定の処理に基づいて乱数データと共有鍵データに変換する共有鍵導出部と、前記秘密数データを前記公開鍵データと前記乱数データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記第1の暗号予備データと前記第3の暗号予備データが一致する場合に、前記第2の暗号予備データを前記共有鍵に基づいて復号化して前記復号文データを生成する復号部とを備える。   The present invention also provides an encryption device that generates ciphertext data obtained by encrypting plaintext data based on public key data given in advance, and ciphertext data based on secret key data and public key data given in advance. An encryption system including a decryption device that decrypts and outputs decrypted text data. The encryption device includes a secret number data generation unit that generates secret number data, a shared key derivation unit that converts the secret number data into random number data and shared key data based on a predetermined process, and the secret number data A first encryption unit for generating first encrypted preliminary data by encrypting based on the public key data and the random number data; and a second encrypted preliminary data by encrypting the plaintext data based on the shared key data. And the ciphertext data is composed of the first encrypted preliminary data, the second encrypted preliminary data, and the third encrypted preliminary data. The decryption device includes: a first decryption unit that decrypts the first encryption preliminary data based on the secret key data to generate secret number data; and the random number data based on a predetermined process. And a shared key deriving unit for converting the shared key data, and a third encryption unit that encrypts the secret number data based on the public key data and the random number data to generate third encrypted preliminary data. A decryption unit for decrypting the second encrypted preliminary data based on the shared key and generating the decrypted text data when the first encrypted preliminary data and the third encrypted preliminary data match. Prepare.

以上に説明したように、本発明は、従来システムにおける問題点を鑑みて行われたもので、暗号システムにおいて、NTRU暗号を適用できる新しい鍵カプセル化メカニズムを構成することで、暗号装置と復号装置との間で異なる鍵が導出されるのを防止でき、鍵カプセル化メカニズムにより導出される鍵を用いた送信装置から受信装置への確実な暗号化通信ができる。   As described above, the present invention has been made in view of the problems in the conventional system. By configuring a new key encapsulation mechanism to which NTRU encryption can be applied in an encryption system, an encryption device and a decryption device are provided. Different keys can be prevented from being derived from each other, and reliable encrypted communication from the transmitting device to the receiving device using the key derived by the key encapsulation mechanism can be performed.

以上により、従来技術では達成できなかった暗号システムを提供することができ、その価値は大きい。
4.実施の形態3
本発明に係るさらに別の実施の形態としてのコンテンツ配信システム10d(図示していない)について説明する。
As described above, it is possible to provide an encryption system that could not be achieved by the prior art, and its value is great.
4). Embodiment 3
A content distribution system 10d (not shown) as still another embodiment according to the present invention will be described.

なお、コンテンツ配信システム10dは、コンテンツ配信システム10を変形したシステムである。ここでは、コンテンツ配信システム10dについて、コンテンツ配信システム10との差異点を中心に詳しく説明する。
4.1 コンテンツ配信システム10dの構成
コンテンツ配信システム10dは、コンテンツ配信システム10と同様の構成を有しており、暗号装置110及び復号装置120に代えて、暗号装置110d及び復号装置120dを含んでいる。その他の構成については、コンテンツ配信システム10におけるものと同様であるので説明を省略する。
The content distribution system 10d is a system obtained by modifying the content distribution system 10. Here, the content distribution system 10d will be described in detail with a focus on differences from the content distribution system 10.
4.1 Configuration of Content Distribution System 10d The content distribution system 10d has the same configuration as the content distribution system 10, and includes an encryption device 110d and a decryption device 120d instead of the encryption device 110 and the decryption device 120. Yes. Since other configurations are the same as those in the content distribution system 10, the description thereof is omitted.

コンテンツ配信システム10dは、NTRU暗号を用いて鍵カプセル化メカニズムによる鍵配送を行って暗号化通信を行う暗号通信システムであり、暗号装置110dと復号装置120dとは、インターネット130を介して接続されている。
4.2 暗号装置110dの構成
暗号装置110dは、図13に示すように、公開鍵入力部111d、乱数生成部112d、第1関数部113d、暗号化部114d、第2関数部115d、乱数マスク部116d、第1送信部117d、共通鍵暗号部118及び第2送信部119から構成されている。
The content distribution system 10d is an encryption communication system that performs encryption communication by performing key distribution using a key encapsulation mechanism using NTRU encryption, and the encryption device 110d and the decryption device 120d are connected via the Internet 130. Yes.
4.2 Configuration of Encryption Device 110d As shown in FIG. 13, the encryption device 110d includes a public key input unit 111d, a random number generation unit 112d, a first function unit 113d, an encryption unit 114d, a second function unit 115d, a random number mask. Unit 116d, first transmission unit 117d, common key encryption unit 118, and second transmission unit 119.

暗号装置110dは、暗号装置110と同様のコンピュータシステムであり、マイクロプロセッサが、コンピュータプログラムに従って動作することにより、暗号装置110dは、その機能を達成する。
(1)公開鍵入力部111d
公開鍵入力部111dは、メモリカード160から復号装置120の公開鍵多項式hを読み出し、読み出した公開鍵多項式hを暗号化部114dへ出力する。
The encryption device 110d is a computer system similar to the encryption device 110, and the encryption device 110d achieves its functions when the microprocessor operates according to the computer program.
(1) Public key input unit 111d
The public key input unit 111d reads the public key polynomial h of the decryption device 120 from the memory card 160, and outputs the read public key polynomial h to the encryption unit 114d.

(2)乱数生成部112d
乱数生成部112dは、共有鍵Kを生成するための元となるシード値として、乱数sを生成し、生成した乱数sを第1関数部113と乱数マスク部116とへ出力する。
(3)第1関数部113d
第1関数部113dは、乱数生成部112dから乱数sを受け取り、受け取った乱数sの関数値G(s)を生成し、関数値G(s)から検証値aと共有鍵Kを生成する。ここでは、関数Gは、一方向性関数である出力長が2kビットのハッシュ関数であり、第1関数部113dは、G(s)の上位kビットを検証値aとし、G(s)の下位kビットを共有鍵Kとする。
(2) Random number generator 112d
The random number generation unit 112d generates a random number s as a seed value for generating the shared key K, and outputs the generated random number s to the first function unit 113 and the random number mask unit 116.
(3) First function unit 113d
The first function unit 113d receives the random number s from the random number generation unit 112d, generates a function value G (s) of the received random number s, and generates a verification value a and a shared key K from the function value G (s). Here, the function G is a one-way function hash function having an output length of 2k bits, and the first function unit 113d uses the upper k bits of G (s) as the verification value a, and the G (s) Let the lower k bits be the shared key K.

次に、第1関数部113dは、生成した検証値aを暗号化部114dと第2関数部115dとへ出力し、生成した共有鍵Kを共通鍵暗号部118へ出力する。
(4)暗号化部114d
暗号化部114dは、公開鍵入力部111dから公開鍵多項式hを受け取り、第1関数部113dから検証値aを受け取り、次に示すようにして、受け取った公開鍵多項式hを用いて検証値aの第1暗号文c1を生成する。ここで、生成される第1暗号文c1は、NTRU暗号による暗号文である。
Next, the first function unit 113d outputs the generated verification value a to the encryption unit 114d and the second function unit 115d, and outputs the generated shared key K to the common key encryption unit 118.
(4) Encryption unit 114d
The encryption unit 114d receives the public key polynomial h from the public key input unit 111d, receives the verification value a from the first function unit 113d, and uses the received public key polynomial h to verify the verification value a as follows. The first ciphertext c1 is generated. Here, the generated first ciphertext c1 is a ciphertext based on the NTRU cipher.

暗号化部114dは、NTRU暗号のパラメータdに対し、d個の項の各係数が「1」であり、別のd個の項の各係数が「−1」であり、その他の項の各係数が「0」となる乱数多項式rをランダムに生成する。次に、検証値aがNTRU暗号の暗号アルゴリズムEに適用できるように、検証値aを2進数表現した場合のN桁のビット列の各桁の値が、検証値多項式apの各項の係数に対応するように、検証値多項式apを生成する。例えば、検証値aの下位bビット目の値を、検証値多項式apの項X^bの係数とする。こうして、検証値aを検証値多項式apに変換する。具体的には、検証値a=10010(ビット表現)の場合、検証値多項式ap=X^5+X^2と変換する。次に、公開鍵多項式hを使用して、乱数多項式rを用いて検証値多項式apに前記暗号アルゴリズムEを施して、暗号文多項式である第1暗号文c1=E(ap,r,h)を生成する。   The encryption unit 114d is configured such that each coefficient of d terms is “1”, each coefficient of another d term is “−1”, and each of the other terms for the parameter d of the NTRU encryption. A random number polynomial r having a coefficient “0” is randomly generated. Next, in order for the verification value a to be applicable to the cryptographic algorithm E of the NTRU cryptosystem, the value of each digit of the N-digit bit string when the verification value a is expressed in binary is used as the coefficient of each term of the verification value polynomial ap. A verification value polynomial ap is generated so as to correspond. For example, the value of the lower-order b bit of the verification value a is set as the coefficient of the term X ^ b of the verification value polynomial ap. Thus, the verification value a is converted into the verification value polynomial ap. Specifically, when the verification value a = 110010 (bit representation), the verification value polynomial ap = X ^ 5 + X ^ 2 is converted. Next, the cipher algorithm E is applied to the verification value polynomial ap using the random number polynomial r using the public key polynomial h, and the first ciphertext c1 = E (ap, r, h), which is a ciphertext polynomial. Is generated.

次に、暗号化部114dは、生成した第1暗号文c1を第2関数部115dと第1送信部117dとへ出力する。
(5)第2関数部115d
第2関数部115dは、第1関数部113dから検証値aを受け取り、暗号化部114dから第1暗号文c1を受け取り、次に示すようにして、検証値aと第1暗号文c1の関数値H(a,c1)を生成する。
Next, the encryption unit 114d outputs the generated first ciphertext c1 to the second function unit 115d and the first transmission unit 117d.
(5) Second function unit 115d
The second function unit 115d receives the verification value a from the first function unit 113d, receives the first ciphertext c1 from the encryption unit 114d, and performs a function of the verification value a and the first ciphertext c1 as shown below. A value H (a, c1) is generated.

ここでは、関数Hはハッシュ関数であり、一方向性関数の一種である。
第1暗号文c1は、NTRU暗号の暗号文であり多項式で表現されているので、第2関数部115dは、第1暗号文c1の各項の係数が、2進数表現した場合のN桁の第1暗号文ビット列c1’の各桁の値に対応するように、第1暗号文ビット列c1’を生成する。例えば、第1暗号文c1のb次元の項X^bの係数を、第1暗号文ビット列c1’の下位bビット目の値とする。こうして、第1暗号文c1を第1暗号文ビット列c1’に変換する。具体的には、第1暗号文c1=X^5+X^2の場合、第1暗号文ビット列c1’=10010(ビット表現)と変換する。
Here, the function H is a hash function and is a kind of one-way function.
Since the first ciphertext c1 is an NTRU ciphertext and is expressed by a polynomial, the second function unit 115d has N digits when the coefficient of each term of the first ciphertext c1 is expressed in binary. The first ciphertext bit string c1 ′ is generated so as to correspond to the value of each digit of the first ciphertext bit string c1 ′. For example, the coefficient of the b-dimensional term X ^ b of the first ciphertext c1 is set as the value of the lower-order b bit of the first ciphertext bit string c1 ′. Thus, the first ciphertext c1 is converted into the first ciphertext bit string c1 ′. Specifically, when the first ciphertext c1 = X ^ 5 + X ^ 2, the first ciphertext bit string c1 ′ is converted to 10010 (bit representation).

次に、第2関数部115dは、ハッシュ関数Hに検証値aと第1暗号文ビット列c1’とのビット結合a||c1’を入力して、関数値H(a,c1)=H(a||c1’)を生成する。ここで、「||」は、ビット結合を示す演算子である。
次に、第2関数部115dは、生成した関数値H(a,c1)を乱数マスク部116dへ出力する。
Next, the second function unit 115d inputs the bit combination a || c1 ′ between the verification value a and the first ciphertext bit string c1 ′ to the hash function H, and the function value H (a, c1) = H ( a || c1 ′). Here, “||” is an operator indicating bit combination.
Next, the second function unit 115d outputs the generated function value H (a, c1) to the random number mask unit 116d.

(6)乱数マスク部116d
乱数マスク部116dは、乱数生成部112dから乱数sを受け取り、第2関数部115dから関数値H(a,c1)を受け取る。次に、第2暗号文c2=s xor H(a,c1)を生成し、生成した第2暗号文c2を第1送信部117dへ出力する。
なお、乱数マスク部116dは、排他的論理和xorに代えて、共有鍵暗号アルゴリズム、加算又は乗算を用いるとしてもよい。
(6) Random number mask part 116d
The random number mask unit 116d receives the random number s from the random number generation unit 112d and receives the function value H (a, c1) from the second function unit 115d. Next, the second ciphertext c2 = s xor H (a, c1) is generated, and the generated second ciphertext c2 is output to the first transmission unit 117d.
Note that the random number mask unit 116d may use a shared key encryption algorithm, addition, or multiplication instead of the exclusive OR xor.

(7)第1送信部117d
第1送信部117dは、暗号化部114dから第1暗号文c1を受け取り、乱数マスク部116dから第2暗号文c2を受け取り、受け取った第1暗号文c1と第2暗号文c2とを、インターネット130を介して、復号装置120dへ送信する。
(8)共通鍵暗号部118及び第2送信部119
共通鍵暗号部118及び第2送信部119は、以下に示す点を除いて、それぞれ、暗号装置110に含まれている共通鍵暗号部118及び第2送信部119と同じである。
(7) First transmission unit 117d
The first transmission unit 117d receives the first ciphertext c1 from the encryption unit 114d, receives the second ciphertext c2 from the random number mask unit 116d, and transmits the received first ciphertext c1 and second ciphertext c2 to the Internet. The data is transmitted to the decoding device 120d via 130.
(8) Common key encryption unit 118 and second transmission unit 119
The common key encryption unit 118 and the second transmission unit 119 are the same as the common key encryption unit 118 and the second transmission unit 119 included in the encryption device 110, respectively, except for the following points.

共通鍵暗号部118は、第1関数部113dから共有鍵Kを受け取る。
4.3 復号装置120dの構成
復号装置120dは、図14に示すように、秘密鍵入力部121d、第1受信部122d、復号化部123d、第3関数部124d、乱数マスク除去部125d、第4関数部126d、比較部127d、共通鍵復号部128及び第2受信部129から構成されている。
The common key encryption unit 118 receives the shared key K from the first function unit 113d.
4.3 Configuration of Decryption Device 120d As shown in FIG. 14, the decryption device 120d includes a secret key input unit 121d, a first reception unit 122d, a decryption unit 123d, a third function unit 124d, a random number mask removal unit 125d, It includes a four-function unit 126d, a comparison unit 127d, a common key decryption unit 128, and a second reception unit 129.

復号装置120dは、復号装置120と同様のコンピュータシステムであり、マイクロプロセッサが、コンピュータプログラムに従って動作することにより、復号装置120dは、その機能を達成する。
なお、共通鍵復号部128及び第2受信部129は、それぞれ、復号装置120に含まれている共通鍵復号部128及び第2受信部129と同じであるので、ここでは、説明を省略する。
The decoding device 120d is a computer system similar to the decoding device 120, and the decoding device 120d achieves its functions when the microprocessor operates according to the computer program.
The common key decryption unit 128 and the second reception unit 129 are the same as the common key decryption unit 128 and the second reception unit 129 included in the decryption device 120, respectively, and thus description thereof is omitted here.

(1)秘密鍵入力部121d
秘密鍵入力部121dは、メモリカード170から復号装置120dの秘密鍵多項式fを読み出し、読み出した秘密鍵多項式fを復号化部123dへ出力する。
(2)第1受信部122d
第1受信部122dは、インターネット130を介して暗号装置110dから第1暗号文c1と第2暗号文c2とを受け取り、受け取った第1暗号文c1を復号化部123dと第3関数部124dとへ出力し、受け取った第2暗号文c2を乱数マスク除去部125dへ出力する。
(1) Private key input unit 121d
The secret key input unit 121d reads the secret key polynomial f of the decryption device 120d from the memory card 170, and outputs the read secret key polynomial f to the decryption unit 123d.
(2) First receiving unit 122d
The first reception unit 122d receives the first ciphertext c1 and the second ciphertext c2 from the encryption device 110d via the Internet 130, and the received first ciphertext c1 is decrypted by the decryption unit 123d and the third function unit 124d. And the received second ciphertext c2 is output to the random number mask removing unit 125d.

なお、乱数マスク部116dが、排他的論理和に代えて、共有鍵暗号アルゴリズム、加算又は乗算を用いる場合において、乱数マスク除去部125dは、それぞれ、共有鍵暗号アルゴリズムに対応する共有鍵復号アルゴリズム、減算、又は除算を用いるとしてもよい。
(3)復号化部123d
復号化部123dは、秘密鍵入力部121dから秘密鍵多項式fを受け取り、第1受信部122dから第1暗号文c1を受け取り、次に示すようにして、秘密鍵多項式fを用いて、第1暗号文c1を復号して復号検証値a’を生成する。ここでは、復号検証値a’はNTRU暗号による復号文である。
When the random number mask unit 116d uses a shared key encryption algorithm, addition or multiplication instead of exclusive OR, the random number mask removal unit 125d includes a shared key decryption algorithm corresponding to the shared key encryption algorithm, Subtraction or division may be used.
(3) Decoding unit 123d
The decryption unit 123d receives the secret key polynomial f from the secret key input unit 121d, receives the first ciphertext c1 from the first reception unit 122d, and uses the secret key polynomial f to The ciphertext c1 is decrypted to generate a decryption verification value a ′. Here, the decryption verification value a ′ is a decrypted text by NTRU encryption.

復号化部123dは、秘密鍵多項式fを使用して、第1暗号文c1に前記復号アルゴリズムDを施して、復号検証値多項式ap’=D(c1,f)を生成する。次に、復号検証値多項式ap’は、NTRU暗号の復号文であり多項式で表現されているので、復号化部123dは、復号検証値多項式ap’の各係数が、復号検証値a’を2進数表現した場合のN桁のビット列の各桁の数に対応するように、復号検証値a’を生成する。例えば、復号検証値多項式ap’のb次元の項X^bの係数を、復号検証値a’の下位bビット目の値とする。こうして、復号検証値多項式ap’を復号検証値a’に変換する。具体的には、復号検証値多項式ap’=X^5+X^2の場合、復号検証値a’=10010(ビット表現)に変換する。   The decryption unit 123d performs the decryption algorithm D on the first ciphertext c1 using the secret key polynomial f, and generates a decryption verification value polynomial ap ′ = D (c1, f). Next, since the decryption verification value polynomial ap ′ is a decrypted text of the NTRU cipher and is represented by a polynomial, the decryption unit 123d determines that each coefficient of the decryption verification value polynomial ap ′ sets the decryption verification value a ′ to 2 A decryption verification value a ′ is generated so as to correspond to the number of each digit of the N-digit bit string when expressed in decimal. For example, the coefficient of the b-dimensional term X ^ b of the decryption verification value polynomial ap ′ is set as the value of the lower b bits of the decryption verification value a ′. Thus, the decryption verification value polynomial ap ′ is converted into the decryption verification value a ′. Specifically, in the case of the decryption verification value polynomial ap ′ = X ^ 5 + X ^ 2, the decryption verification value a ′ is converted to 10010 (bit representation).

次に、復号化部123dは、生成した復号検証値a’を第3関数部124dと比較部127dとへ出力する。
(4)第3関数部124d
第3関数部124dは、第2関数部115dが有する関数と同じ関数Hのアルゴリズムを有している。
Next, the decryption unit 123d outputs the generated decryption verification value a ′ to the third function unit 124d and the comparison unit 127d.
(4) Third function part 124d
The third function unit 124d has the same function H algorithm as the function of the second function unit 115d.

第3関数部124dは、第1受信部122dから第1暗号文c1を受け取り、復号化部123dから復号検証値a’を受け取る。次に、第2関数部115dと同様にして、検証値a’と第1暗号文c1との関数値H(a’,c1)を生成し、生成した関数値H(a’,c1)を乱数マスク除去部125dへ出力する。
(5)乱数マスク除去部125d
乱数マスク除去部125dは、第1受信部122dから第2暗号文c2を受け取り、第3関数部124dからハッシュ関数値H(a’,c1)を受け取り、次に、復号乱数s’=c2 xor H(a’,c1)を生成し、生成した復号乱数sを第4関数部126dへ出力する。
The third function unit 124d receives the first ciphertext c1 from the first reception unit 122d, and receives the decryption verification value a ′ from the decryption unit 123d. Next, similarly to the second function unit 115d, a function value H (a ′, c1) of the verification value a ′ and the first ciphertext c1 is generated, and the generated function value H (a ′, c1) is generated. This is output to the random number mask removing unit 125d.
(5) Random number mask removal unit 125d
The random number mask removing unit 125d receives the second ciphertext c2 from the first receiving unit 122d, receives the hash function value H (a ′, c1) from the third function unit 124d, and then decrypts the random number s ′ = c2 xor H (a ′, c1) is generated, and the generated decrypted random number s is output to the fourth function unit 126d.

(6)第4関数部126d
第4関数部126dは、第1関数部113dが有する関数と同じ関数Gのアルゴリズムを有している。
第4関数部126dは、乱数マスク除去部125dから復号乱数s’を受け取り、復号乱数s’のハッシュ関数値G(s’)を生成する。次に、第1関数部113dと同様にして、関数値G(s’)から検証値a’’と共有鍵K’とを生成し、生成した検証値a’’と共有鍵K’とを比較部127dへ出力する。
(6) Fourth function unit 126d
The fourth function unit 126d has the same function G algorithm as the function of the first function unit 113d.
The fourth function unit 126d receives the decrypted random number s ′ from the random number mask removing unit 125d, and generates a hash function value G (s ′) of the decrypted random number s ′. Next, similarly to the first function unit 113d, a verification value a ″ and a shared key K ′ are generated from the function value G (s ′), and the generated verification value a ″ and the shared key K ′ are generated. The data is output to the comparison unit 127d.

(7)比較部127d
比較部127dは、復号化部123dから復号検証値a’を受け取り、第4関数部126dから検証値a’’と共有鍵K’とを受け取り、次に、復号検証値a’と検証値a’’が等しいかどうかチェックを行い、復号検証値a’と検証値a’’とが等しければ、共有鍵K’を共通鍵復号部128へ出力する。
(7) Comparison unit 127d
The comparison unit 127d receives the decryption verification value a ′ from the decryption unit 123d, receives the verification value a ″ and the shared key K ′ from the fourth function unit 126d, and then decrypts the verification value a ′ and the verification value a. It is checked whether or not ″ is equal. If the decryption verification value a ′ and the verification value a ″ are equal, the shared key K ′ is output to the common key decryption unit 128.

(8)共通鍵復号部128及び第2受信部129
共通鍵復号部128は、比較部127dから共有鍵K’を受け取る。
その他の点については、共通鍵復号部128は、復号装置120に含まれている共通鍵復号部128と同じであるので、ここでは、説明を省略する。
また、第2受信部129は、復号装置120に含まれている第2受信部129と同じであるので、ここでは、説明を省略する。
(8) Common key decryption unit 128 and second reception unit 129
The common key decryption unit 128 receives the shared key K ′ from the comparison unit 127d.
Since the common key decryption unit 128 is the same as the common key decryption unit 128 included in the decryption device 120 with respect to other points, description thereof is omitted here.
In addition, the second receiving unit 129 is the same as the second receiving unit 129 included in the decoding device 120, and thus description thereof is omitted here.

4.4 コンテンツ配信システム10dの動作
コンテンツ配信システム10dの動作について、図15に示すフローチャート及び図16に示す処理系統図を用いて説明する。
公開鍵入力部111dは、メモリカード160から復号装置120dの公開鍵多項式hを受け取り、公開鍵多項式hを暗号化部114dへ出力する(ステップS201)。
4.4 Operation of Content Distribution System 10d The operation of the content distribution system 10d will be described with reference to the flowchart shown in FIG. 15 and the processing system diagram shown in FIG.
The public key input unit 111d receives the public key polynomial h of the decryption device 120d from the memory card 160, and outputs the public key polynomial h to the encryption unit 114d (step S201).

次に、乱数生成部112dは、乱数sを生成して、乱数sを第1関数部113dと乱数マスク部116dとへ出力する(ステップS202)。
次に、第1関数部113dは、乱数生成部112dから乱数sを受け取り、乱数sの関数値G(s)を生成する(ステップS203)。そして、第1関数部113dは、関数値G(s)から検証値aと共有鍵Kを生成して、検証値aを暗号化部114dと第2関数部115dとへ出力し、共有鍵Kを共通鍵暗号部118へ出力する(ステップS204)。
Next, the random number generation unit 112d generates a random number s and outputs the random number s to the first function unit 113d and the random number mask unit 116d (step S202).
Next, the first function unit 113d receives the random number s from the random number generation unit 112d and generates a function value G (s) of the random number s (step S203). Then, the first function unit 113d generates a verification value a and a shared key K from the function value G (s), and outputs the verification value a to the encryption unit 114d and the second function unit 115d. Is output to the common key encryption unit 118 (step S204).

次に、暗号化部114dは、公開鍵入力部111dから公開鍵多項式hを受け取り、第1関数部113dから検証値aを受け取る。そして、暗号化部114dは、公開鍵多項式hを用いて検証値aの第1暗号文c1を生成し、第1暗号文c1を第2関数部115dと第1送信部117dとへ出力する(ステップS205)。
次に、第2関数部115dは、第1関数部113dから検証値aを受け取り、暗号化部114dから第1暗号文c1を受け取り、検証値aと第1暗号文c1との関数値H(a,c1)を生成し、関数値H(a,c1)を乱数マスク部116へ出力する(ステップS206)。
Next, the encryption unit 114d receives the public key polynomial h from the public key input unit 111d, and receives the verification value a from the first function unit 113d. Then, the encryption unit 114d generates the first ciphertext c1 with the verification value a using the public key polynomial h, and outputs the first ciphertext c1 to the second function unit 115d and the first transmission unit 117d ( Step S205).
Next, the second function unit 115d receives the verification value a from the first function unit 113d, receives the first ciphertext c1 from the encryption unit 114d, and receives the function value H () of the verification value a and the first ciphertext c1. a, c1) is generated, and the function value H (a, c1) is output to the random number mask unit 116 (step S206).

次に、乱数マスク部116dは、乱数生成部112dから乱数sを受け取り、第2関数部115dから関数値H(a,c1)を受け取り、乱数マスク部116dは、第2暗号文c2=s xor H(a,c1)を生成し、第2暗号文c2を第1送信部117dへ出力する(ステップS207)。
次に、第1送信部117dは、暗号化部114dから第1暗号文c1を受け取り、乱数マスク部116dから第2暗号文c2を受け取り、第1暗号文c1と第2暗号文c2とをインターネット130を介して復号装置120dへ送信する(ステップS208)。
Next, the random number mask unit 116d receives the random number s from the random number generation unit 112d, receives the function value H (a, c1) from the second function unit 115d, and the random number mask unit 116d receives the second ciphertext c2 = s xor. H (a, c1) is generated, and the second ciphertext c2 is output to the first transmitter 117d (step S207).
Next, the first transmission unit 117d receives the first ciphertext c1 from the encryption unit 114d, receives the second ciphertext c2 from the random number mask unit 116d, and transmits the first ciphertext c1 and the second ciphertext c2 to the Internet. It transmits to the decoding device 120d via 130 (step S208).

次に、共通鍵暗号部118は、コンテンツサーバ装置140から複数の平文mi(1≦i≦n)を受け取り、第1関数部113dから共有鍵Kを受け取り、共有鍵Kを使用して平文mi(1≦i≦n)に共通鍵暗号アルゴリズムSymを施して、共通鍵暗号文Ci=Sym(mi,K)(1≦i≦n)を生成し、共通鍵暗号文Ci(1≦i≦n)を第2送信部119へ出力する(ステップS209)。   Next, the common key encryption unit 118 receives a plurality of plaintext mi (1 ≦ i ≦ n) from the content server device 140, receives the shared key K from the first function unit 113d, and uses the shared key K to read the plaintext mi. (1 ≦ i ≦ n) is subjected to the common key encryption algorithm Sym to generate a common key ciphertext Ci = Sym (mi, K) (1 ≦ i ≦ n), and the common key ciphertext Ci (1 ≦ i ≦ n) n) is output to the second transmitter 119 (step S209).

次に、第2送信部119は、共通鍵暗号部118から共通鍵暗号文Ci(1≦i≦n)を受け取り、インターネット130を介して復号装置120dへ送信し(ステップS210)、処理を終了する。
一方、秘密鍵入力部121dは、メモリカード170から復号装置120dの秘密鍵多項式fを受け取り、秘密鍵多項式fを復号化部123へ出力する(ステップS251)。
Next, the second transmission unit 119 receives the common key ciphertext Ci (1 ≦ i ≦ n) from the common key encryption unit 118, transmits it to the decryption device 120d via the Internet 130 (step S210), and ends the processing. To do.
On the other hand, the secret key input unit 121d receives the secret key polynomial f of the decryption device 120d from the memory card 170, and outputs the secret key polynomial f to the decryption unit 123 (step S251).

次に、第1受信部122dは、インターネット130を介して暗号装置110dから第1暗号文c1と第2暗号文c2とを受け取り、第1暗号文c1を復号化部123dと第3関数部124dとへ出力し、第2暗号文c2を乱数マスク除去部125dへ出力する(ステップS208)。
次に、復号化部123dは、秘密鍵入力部121から秘密鍵多項式fを受け取り、第1受信部122dから第1暗号文c1を受け取り、次に、秘密鍵多項式fを用いて、第1暗号文c1を復号して復号検証値a’を生成し、復号検証値a’を第3関数部124dと比較部127dへ出力する(ステップS252)。
Next, the first reception unit 122d receives the first ciphertext c1 and the second ciphertext c2 from the encryption device 110d via the Internet 130, and the first ciphertext c1 is decrypted by the decryption unit 123d and the third function unit 124d. And the second ciphertext c2 is output to the random number mask removing unit 125d (step S208).
Next, the decryption unit 123d receives the secret key polynomial f from the secret key input unit 121, receives the first ciphertext c1 from the first reception unit 122d, and then uses the secret key polynomial f to The sentence c1 is decrypted to generate a decryption verification value a ′, and the decryption verification value a ′ is output to the third function unit 124d and the comparison unit 127d (step S252).

次に、第3関数部124dは、第1受信部122dから第1暗号文c1を受け取り、復号化部123dから復号検証値a’を受け取り、次に、第2関数部115dと同様にして、検証値a’と第1暗号文c1の関数値H(a’,c1)を生成し、関数値H(a’,c1)を乱数マスク除去部125dへ出力する(ステップS253)。
次に、乱数マスク除去部125dは、第1受信部122dから第2暗号文c2を受け取り、第3関数部124dからハッシュ関数値H(a’,c1)を受け取り、次に、復号乱数s’=c2 xor H(a’,c1)を生成し、復号乱数sを第4関数部126dへ出力する(ステップS254)。
Next, the third function unit 124d receives the first ciphertext c1 from the first reception unit 122d, receives the decryption verification value a ′ from the decryption unit 123d, and then performs the same process as the second function unit 115d. The verification value a ′ and the function value H (a ′, c1) of the first ciphertext c1 are generated, and the function value H (a ′, c1) is output to the random number mask removal unit 125d (step S253).
Next, the random number mask removing unit 125d receives the second ciphertext c2 from the first receiving unit 122d, receives the hash function value H (a ′, c1) from the third function unit 124d, and then receives the decrypted random number s ′. = C2 xor H (a ′, c1) is generated, and the decrypted random number s is output to the fourth function unit 126d (step S254).

次に、第4関数部126dは、乱数マスク除去部125から復号乱数s’を受け取り、復号乱数s’のハッシュ関数値G(s’)を生成し(ステップS255)、第1関数部113dと同様にして、関数値G(s’)から検証値a’’と共有鍵K’とを生成して、検証値a’’と共有鍵K’とを比較部127dへ出力する(ステップS256)。
次に、比較部127dは、復号化部123から復号検証値a’を受け取り、第4関数部126dから検証値a’’と共有鍵K’とを受け取り、復号検証値a’と検証値a’’とが等しいかどうかチェックを行い、等しくなければ(ステップS257)、処理を終了する。
Next, the fourth function unit 126d receives the decrypted random number s ′ from the random number mask removing unit 125, generates the hash function value G (s ′) of the decrypted random number s ′ (step S255), and the first function unit 113d Similarly, a verification value a ″ and a shared key K ′ are generated from the function value G (s ′), and the verification value a ″ and the shared key K ′ are output to the comparison unit 127d (step S256). .
Next, the comparison unit 127d receives the decryption verification value a ′ from the decryption unit 123, receives the verification value a ″ and the shared key K ′ from the fourth function unit 126d, and receives the decryption verification value a ′ and the verification value a. Whether or not '' is equal is checked. If not equal (step S257), the process is terminated.

復号検証値a’と検証値a’’とが等しければ(ステップS257)、比較部127dは、共有鍵K’を共通鍵復号部128へ出力する(ステップS258)。
次に、第2受信部129は、インターネット130を介して暗号装置110dから暗号文Ci(1≦i≦n)を受信し、共通鍵復号部128へ出力する(ステップS210)。
次に、共通鍵復号部128は、比較部127dから共有鍵K’を受け取り、第2受信部129から共通鍵暗号文Ci(1≦i≦n)を受け取り、共有鍵K’を使用して共通鍵暗号文Ci(1≦i≦n)に共通鍵暗号アルゴリズムSymを施して、復号文mi’=Sym(Ci,K)(1≦i≦n)を生成し、復号文mi’(1≦i≦n)を外部へ出力し(ステップS259)、処理を終了する。
If the decryption verification value a ′ and the verification value a ″ are equal (step S257), the comparison unit 127d outputs the shared key K ′ to the common key decryption unit 128 (step S258).
Next, the second receiving unit 129 receives the ciphertext Ci (1 ≦ i ≦ n) from the encryption device 110d via the Internet 130, and outputs it to the common key decryption unit 128 (step S210).
Next, the common key decryption unit 128 receives the shared key K ′ from the comparison unit 127d, receives the common key ciphertext Ci (1 ≦ i ≦ n) from the second reception unit 129, and uses the shared key K ′. The common key ciphertext Ci (1 ≦ i ≦ n) is subjected to the common key encryption algorithm Sym to generate a decrypted text mi ′ = Sym (Ci, K) (1 ≦ i ≦ n), and the decrypted text mi ′ (1 ≦ i ≦ n) is output to the outside (step S259), and the process is terminated.

4.5 コンテンツ配信システム10dの動作検証
以下に、コンテンツ配信システム10dの全体の動作について説明する。
暗号装置110dは、復号装置120dの公開鍵多項式hを入力とし、乱数sを生成して、関数値G(s)から検証値aと共有鍵Kを導出する。次に、暗号装置110dは、検証値aを公開鍵多項式hを用いてNTRU暗号で暗号化して第1暗号文c1を生成し、検証値aと第1暗号文c1から関数値H(a,c1)を生成し、乱数sと関数値H(a,c1)から第2暗号文c2=s xor H(a,c1)を生成する。次に、暗号装置110dは、第1暗号文c1と第2暗号文c2をインターネット130を介して復号装置120dへ送信する。
4.5 Operation Verification of Content Distribution System 10d The overall operation of the content distribution system 10d will be described below.
The encryption device 110d receives the public key polynomial h of the decryption device 120d, generates a random number s, and derives the verification value a and the shared key K from the function value G (s). Next, the encryption device 110d generates the first ciphertext c1 by encrypting the verification value a with the NTRU cipher using the public key polynomial h, and generates a function value H (a, a from the verification value a and the first ciphertext c1. c1) is generated, and the second ciphertext c2 = s xor H (a, c1) is generated from the random number s and the function value H (a, c1). Next, the encryption device 110d transmits the first ciphertext c1 and the second ciphertext c2 to the decryption device 120d via the Internet 130.

すなわち、この暗号装置110dは、以下の処理を行い、暗号文C=(c1,c2)を復号装置120dへ送信する。
・乱数sを生成する。
・G(s)を生成し、G(s)からa,Kを生成する。
・公開鍵多項式hを用いて検証値aの第1暗号文c1を生成する。
That is, the encryption device 110d performs the following processing and transmits the ciphertext C = (c1, c2) to the decryption device 120d.
Generate a random number s.
Generate G (s) and generate a and K from G (s).
Generate the first ciphertext c1 with the verification value a using the public key polynomial h.

・c2=s xor H(a,c1)を生成する。
・共有鍵Kと暗号文C=(c1,c2)を出力する。
次に、暗号装置110dは、導出した共有鍵Kを用いて、コンテンツサーバ装置140から入力された平文mi(1≦i≦n)を共通鍵暗号で暗号化して暗号文Ci(1≦i≦n)を生成し、インターネット130を介して復号装置120dへ送信する。
Generate c2 = s xor H (a, c1).
Output the shared key K and the ciphertext C = (c1, c2).
Next, the encryption device 110d uses the derived shared key K to encrypt the plaintext mi (1 ≦ i ≦ n) input from the content server device 140 with the common key encryption, and the ciphertext Ci (1 ≦ i ≦ n). n) is generated and transmitted to the decryption device 120d via the Internet 130.

一方、復号装置120dは、復号装置120dの秘密鍵多項式fを入力とし、インターネット130を介して暗号装置110dから第1暗号文c1と第2暗号文c2とを受信し、第1暗号文c1を秘密鍵多項式fを用いて復号して復号検証値a’を生成する。復号検証値a’と第1暗号文c1から関数値H(a’,c1)を生成し、第2暗号文c2と関数値H(a’,c1)から復号乱数s’=c2 xor H(a’,c1)を生成する。次に、復号装置120dは、復号乱数s’の関数値G(s’)から検証値a’’と共有鍵K’を導出し、検証値a’’=a’であれば共有鍵K’を出力する。   On the other hand, the decryption device 120d receives the first ciphertext c1 and the second ciphertext c2 from the encryption device 110d via the Internet 130, using the secret key polynomial f of the decryption device 120d as input, and receives the first ciphertext c1. Decryption is performed using the secret key polynomial f to generate a decryption verification value a ′. A function value H (a ′, c1) is generated from the decryption verification value a ′ and the first ciphertext c1, and a decryption random number s ′ = c2 xor H (from the second ciphertext c2 and the function value H (a ′, c1). a ′, c1) is generated. Next, the decryption device 120d derives the verification value a ″ and the shared key K ′ from the function value G (s ′) of the decrypted random number s ′, and if the verification value a ″ = a ′, the shared key K ′. Is output.

すなわち、この復号装置120dは、以下の処理を行い、共有鍵K’を導出する。
・秘密鍵多項式fを用いて第1暗号文c1を復号してa’を生成する。
・s’=c2 xor H(a’,c1)を生成する。
・G(s’)を生成し、G(s’)からa’’,K’を生成する。
・a’’=a’が成立するかどうかチェックする。成立すれば共有鍵K’を出力する。
That is, the decryption device 120d performs the following process to derive the shared key K ′.
Decrypt the first ciphertext c1 using the secret key polynomial f to generate a ′.
Generate s ′ = c2 xor H (a ′, c1).
Generate G (s ′) and generate a ″, K ′ from G (s ′).
Check whether a ″ = a ′ holds. If it is established, the shared key K ′ is output.

ここで、暗号装置110dで用いられた公開鍵多項式hに対応する正しい秘密鍵多項式fが復号装置120dで用いられれば、第1暗号文c1は正しく復号されて、復号検証値a’=aとなり、第2暗号文c2とH(a’,c1)から生成される復号乱数s’=sとなる。従って、G(s’)から導出される検証値a’’=aとなり、共有鍵K’=Kとなる。そして、a’’=a’が成り立つので、復号装置120dは暗号装置110dと同じ共有鍵Kを導出できることになる。   Here, if the correct private key polynomial f corresponding to the public key polynomial h used in the encryption device 110d is used in the decryption device 120d, the first ciphertext c1 is correctly decrypted and the decryption verification value a ′ = a is obtained. The decrypted random number s ′ = s generated from the second ciphertext c2 and H (a ′, c1). Therefore, the verification value a ″ derived from G (s ′) = a, and the shared key K ′ = K. Since a ″ = a ′ holds, the decryption device 120d can derive the same shared key K as the encryption device 110d.

次に、復号装置120dは、導出した共有鍵K’(=K)を用いて、インターネット130を介して暗号装置110dから共通鍵暗号文Ci(1≦i≦n)を受け取り、受け取った共通鍵暗号文Ci(1≦i≦n)を共通鍵暗号で復号して復号文mi’(1≦i≦n)を生成して再生装置150へ出力する。
ここで、共通鍵暗号文生成時に用いた暗号鍵Kと復号文生成時に用いる暗号鍵K’は同一であるので、復号装置120dは、正しくmi’=mi(1≦i≦n)を得ることができる。
Next, the decryption device 120d receives the common key ciphertext Ci (1 ≦ i ≦ n) from the encryption device 110d via the Internet 130 using the derived shared key K ′ (= K) and receives the received common key. The ciphertext Ci (1 ≦ i ≦ n) is decrypted with the common key cipher to generate a decrypted text mi ′ (1 ≦ i ≦ n) and output to the playback device 150.
Here, since the encryption key K used at the time of generating the common key ciphertext and the encryption key K ′ used at the time of generating the decrypted text are the same, the decrypting device 120d correctly obtains mi ′ = mi (1 ≦ i ≦ n). Can do.

4.6 実施の形態3における効果
従来のPSEC−KEMアルゴリズムでは、ハッシュ関数Hの入力にa*P,a*Wを用い、秘密鍵を用いずにa*Pからa*Wを計算することが困難なDiffie−Hellman問題を用いて、最終的に共有鍵Kを導出することにより、秘密鍵を知らなければその共有鍵Kを導出できないようにしている。従って、NTRU暗号をはじめ、Diffie−Hellman問題を利用しない他の公開鍵暗号は、Diffie−Hellman問題のa*P、a*Wに相当するものがないため、PSEC−KEMアルゴリズムを適用できないという問題点がある。
4.6 Effects in Embodiment 3 In the conventional PSEC-KEM algorithm, a * P and a * W are used as the input of the hash function H, and a * W is calculated from a * P without using a secret key. Finally, the shared key K is derived using the Diffie-Hellman problem, which makes it difficult to derive the shared key K unless the secret key is known. Therefore, the NTRU cipher and other public key ciphers that do not use the Diffie-Hellman problem have no equivalent to the Diffie-Hellman problem, a * P, a * W, and the PSEC-KEM algorithm cannot be applied. There is a point.

しかしながら、本発明のコンテンツ配信システム、暗号装置及び復号装置は、ハッシュ関数Hの入力を検証値aとその暗号文c1としているので、PSEC−KEMアルゴリズムを適用して、NTRU暗号や他の公開鍵暗号を利用できる。
なお、NTRU暗号では、公開鍵を用いて平文を暗号化して暗号文を生成し、正規の秘密鍵を用いて暗号文を復号して復号文を生成しても、復号文が元の平文と異なる場合が発生する(例えば、非特許文献2参照。)。このような復号エラーが発生すると、復号装置は誤った復号検証値a’を得ることになるが、G(s’)から得られる検証値a’’はa’と等しくならないために、共有鍵K’を出力しない。従って、復号エラーが発生しても、暗号装置と復号装置との間で誤った鍵を共有することを防止できるという効果がある。
However, since the content distribution system, encryption apparatus, and decryption apparatus of the present invention use the hash function H as the verification value a and its ciphertext c1, applying the PSEC-KEM algorithm, NTRU encryption and other public keys Encryption can be used.
In NTRU cryptography, a plaintext is encrypted by using a public key to generate a ciphertext, and a decrypted text is generated by decrypting a ciphertext by using a regular secret key. Different cases occur (for example, see Non-Patent Document 2). When such a decryption error occurs, the decryption device obtains an incorrect decryption verification value a ′, but since the verification value a ″ obtained from G (s ′) is not equal to a ′, the shared key Do not output K '. Therefore, even if a decryption error occurs, it is possible to prevent the wrong key from being shared between the encryption device and the decryption device.

また、復号装置において、再度暗号文を生成する処理を行わないので、従来技術と比較すると、演算量を削減することができる。
これにより、NTRU暗号を用いて鍵カプセル化メカニズムを構成することができ、暗号装置と復号装置との間でNTRU暗号を用いて鍵配送が行えるようになる。
また、本発明による方式は、非特許文献3に記述されている証明方法と同様の方法により、理論的にその安全性が証明できる。
In addition, since the decryption device does not perform the process of generating the ciphertext again, the amount of calculation can be reduced as compared with the prior art.
As a result, a key encapsulation mechanism can be configured using NTRU encryption, and key distribution can be performed between the encryption device and the decryption device using NTRU encryption.
Further, the method according to the present invention can theoretically prove its safety by a method similar to the proof method described in Non-Patent Document 3.

4.7 変形例
上記に説明した実施の形態は、本発明の実施の一例であり、本発明はこの実施の形態に何ら限定されるものではなく、その旨を逸脱しない範囲において種々なる態様で実施し得るものである。以下のような場合も本発明に含まれる。
(1)用いるNTRU暗号のパラメータN=167に限定されない。パラメータNは、他の値をとるとしてもよい。
4.7 Modifications The embodiment described above is an example of the implementation of the present invention, and the present invention is not limited to this embodiment, and can be variously modified without departing from the scope of the present invention. It can be implemented. The following cases are also included in the present invention.
(1) It is not limited to the parameter N = 167 of the NTRU encryption used. The parameter N may take other values.

(2)暗号化部114d、第2関数部115d、復号化部123d及び第3関数部124dで行われるビット列と多項式との変換方法は、この方法に限られず他の変換方法でもよい。
例えば、ビット列と多項式を1対1に対応させる関数、又は関数値のテーブルを用いて変換してもよい。
(2) The bit string / polynomial conversion method performed by the encryption unit 114d, the second function unit 115d, the decryption unit 123d, and the third function unit 124d is not limited to this method, and other conversion methods may be used.
For example, the conversion may be performed using a function or a table of function values in which a bit string and a polynomial correspond one-to-one.

また、例えば、実施の形態2の変形例(1)に述べた変換方法を用いて変換してもよい。
(3)暗号化部114d及び復号化部123dで用いる公開鍵暗号方式は、暗号化部114dにおいて、検証値aを公開鍵で暗号化して第1暗号文c1を生成し、復号化部123dにおいて、第1暗号文c1を秘密鍵で復号して、検証値aと等しい復号検証値a’を生成できればよい。
Further, for example, the conversion may be performed using the conversion method described in the modification (1) of the second embodiment.
(3) In the public key cryptosystem used in the encryption unit 114d and the decryption unit 123d, the encryption unit 114d encrypts the verification value a with the public key to generate the first ciphertext c1, and the decryption unit 123d The decryption verification value a ′ equal to the verification value a may be generated by decrypting the first ciphertext c1 with the secret key.

従って、暗号化部114d、復号化部123dで用いる公開鍵暗号は、NTRU暗号以外に、どんな公開鍵暗号でも利用できる。
例えば、RSA暗号を採用するならば、h、fをそれぞれRSA暗号の公開鍵、秘密鍵とし、暗号化部114dにおいて、aをhを用いて暗号化してc1を生成し、復号化部123dにおいて、c1をfを用いて復号してa’を生成すればよい。
Accordingly, any public key cryptography other than the NTRU cipher can be used as the public key cryptography used in the encryption unit 114d and the decryption unit 123d.
For example, if RSA encryption is adopted, h and f are respectively used as public and private keys of RSA encryption, and the encryption unit 114d encrypts a using h to generate c1, and the decryption unit 123d , C1 may be decoded using f to generate a ′.

また、例えば、ElGamal暗号採用するならば、h,fをそれぞれElGamal暗号の公開鍵,秘密鍵とし、暗号化部114dにおいて、乱数rを生成してaをhとrを用いて暗号化してc1を生成し、復号化部123dにおいて、c1をfを用いて復号してa’を生成すればよい。
なお、RSA暗号やElGamal暗号について非特許文献1に詳細に記載されているため、ここでは説明を省略する。
Further, for example, if ElGamal encryption is adopted, h and f are set as public and private keys of ElGamal encryption, respectively, and the encryption unit 114d generates a random number r and encrypts a using h and r, and c1 And the decoding unit 123d decodes c1 using f to generate a ′.
Since RSA encryption and ElGamal encryption are described in detail in Non-Patent Document 1, description thereof will be omitted here.

(4)第1関数部113dは、関数値G(s)の上位kビットを検証値aをして下位kビットを共有鍵Kとする以外に、関数値G(s)から検証値aと共有鍵Kを導出すれば他の方法でもよい。
(5)第2関数部115dは、検証値aと第1暗号文c1から関数値H(a,c1)を導出すれば他の方法でもよい。
(4) The first function unit 113d uses the function value G (s) and the verification value a as well as the verification value a for the upper k bits of the function value G (s) and the shared key K for the lower k bits. Other methods may be used if the shared key K is derived.
(5) The second function unit 115d may use another method as long as the function value H (a, c1) is derived from the verification value a and the first ciphertext c1.

例えば、任意の2項演算#に対し、a#c1を関数Hに入力して関数値を導出してもよい。なお、NTRU暗号では第1暗号文c1は多項式であるので、第1暗号文c1から第1暗号文ビット列c1’に変換し、a#c1’を関数Hに入力して関数値を導出してもよい。
(6)さらに、第2関数部115dは、検証値aを用いて関数値を導出すれば、他の方法でもよい。
For example, a function value may be derived by inputting a # c1 to the function H for an arbitrary binary operation #. In the NTRU cipher, the first ciphertext c1 is a polynomial. Therefore, the first ciphertext c1 is converted into the first ciphertext bit string c1 ′, and a # c1 ′ is input to the function H to derive the function value. Also good.
(6) Furthermore, the second function unit 115d may use another method as long as the function value is derived using the verification value a.

例えば、第2関数部115dは、H(a)を出力してもよいし、検証値aをそのまま出力してもよい。すなわち、暗号装置110dにおいて、第2暗号文c2を
・c2=s xor H(a)、又は
・c2=s xor aとして導出してもよい。
これらの場合において、復号装置120dの第3関数部124dは、それぞれ、
・H(a’) 又は
・a’
を出力する。
For example, the second function unit 115d may output H (a) or may output the verification value a as it is. That is, in the encryption device 110d, the second ciphertext c2 may be derived as: • c2 = s xor H (a), or • c2 = s xor a.
In these cases, the third function unit 124d of the decoding device 120d respectively
・ H (a ') or ・ a'
Is output.

(7)乱数マスク部116dは、乱数sと関数値H(a,c1)とから第2暗号文c2を導出し、乱数マスク除去部125dは、第2暗号文c2と関数値H(a,c1)とから乱数sが導出できれば、他の方法でもよい。
例えば、乱数マスク部116dは、第2暗号文c2を
・c2=s+H(a,c1)、又は
・c2=s・H(a,c1)
として導出してもよい。
(7) The random number mask unit 116d derives the second ciphertext c2 from the random number s and the function value H (a, c1), and the random number mask removal unit 125d performs the second ciphertext c2 and the function value H (a, c1). Other methods may be used as long as the random number s can be derived from c1).
For example, the random number mask unit 116d converts the second ciphertext c2 into: c2 = s + H (a, c1), or c2 = s · H (a, c1)
May be derived as

5.実施の形態4
本発明に係るさらに別の実施の形態としてのコンテンツ配信システム10e(図示していない)について説明する。
コンテンツ配信システム10eは、実施の形態3に示すコンテンツ配信システム10dを基本として、これを変形したシステムであり、暗号装置が、関数値G(s)から検証値aと共有鍵Kの他に乱数値uを生成し、乱数値uを用いて検証値aを暗号化して第1暗号文c1を生成する点と、復号装置が、共有鍵Kを出力するときの判断の方法とにおいて、コンテンツ配信システム10dと異なる。
5). Embodiment 4
A content distribution system 10e (not shown) as still another embodiment according to the present invention will be described.
The content distribution system 10e is a system that is a modification of the content distribution system 10d shown in the third embodiment, and the encryption device uses the function value G (s) in addition to the verification value a and the shared key K. Content distribution in which a numerical value u is generated, the verification value a is encrypted using the random value u, and the first ciphertext c1 is generated, and the determination method when the decryption device outputs the shared key K Different from the system 10d.

ここでは、コンテンツ配信システム10eについて、コンテンツ配信システム10dとの差異点を中心に詳しく説明する。
5.1 コンテンツ配信システム10eの構成
コンテンツ配信システム10eは、コンテンツ配信システム10dと同様の構成を有しており、暗号装置110d及び復号装置120dに代えて、暗号装置110e及び復号装置120eを含んでいる。その他の構成については、コンテンツ配信システム10dにおけるものと同様であるので説明を省略する。
Here, the content distribution system 10e will be described in detail focusing on differences from the content distribution system 10d.
5.1 Configuration of Content Distribution System 10e The content distribution system 10e has the same configuration as the content distribution system 10d, and includes an encryption device 110e and a decryption device 120e instead of the encryption device 110d and the decryption device 120d. Yes. Other configurations are the same as those in the content distribution system 10d, and thus the description thereof is omitted.

コンテンツ配信システム10eは、NTRU暗号を用いて鍵配送を行うシステムである。暗号装置110eと復号装置120eとは、インターネット130を介して接続されている。
5.2 暗号装置110eの構成
暗号装置110eは、図17に示すように、公開鍵入力部111d、乱数生成部112d、第1関数部113e、暗号化部114e、第2関数部115d、乱数マスク部116d、第1送信部117d、共通鍵暗号部118及び第2送信部119から構成されている。
The content distribution system 10e is a system that performs key distribution using NTRU encryption. The encryption device 110e and the decryption device 120e are connected via the Internet 130.
5.2 Configuration of Encryption Device 110e The encryption device 110e includes a public key input unit 111d, a random number generation unit 112d, a first function unit 113e, an encryption unit 114e, a second function unit 115d, a random number mask, as shown in FIG. Unit 116d, first transmission unit 117d, common key encryption unit 118, and second transmission unit 119.

公開鍵入力部111d、乱数生成部112d、第2関数部115d、乱数マスク部116d、第1送信部117d、共通鍵暗号部118及び第2送信部119は、暗号装置110dを構成する構成要素と同一であるので、説明を省略し、ここでは、暗号装置110dを構成する構成要素と異なる第1関数部113e及び暗号化部114eについてその構成と動作を説明する。   The public key input unit 111d, the random number generation unit 112d, the second function unit 115d, the random number mask unit 116d, the first transmission unit 117d, the common key encryption unit 118, and the second transmission unit 119 are constituent elements that constitute the encryption device 110d. Since they are the same, the description thereof will be omitted, and the configuration and operation of the first function unit 113e and the encryption unit 114e that are different from the components constituting the encryption device 110d will be described here.

(1)第1関数部113e
第1関数部113eは、乱数生成部112dから乱数sを受け取り、受け取った乱数sの関数値G(s)を生成する。次に、以下に示すようにして、生成した関数値G(s)から検証値aと共有鍵Kと乱数値uとを生成する。
ここで、関数Gは、出力長が3kビットのハッシュ関数であり、第1関数部113eは、G(s)の上位kビットを検証値aとし、G(s)の中間のkビットを共有鍵Kとし、G(s)の下位kビットを乱数値uとする。
(1) First function unit 113e
The first function unit 113e receives the random number s from the random number generation unit 112d and generates a function value G (s) of the received random number s. Next, a verification value a, a shared key K, and a random value u are generated from the generated function value G (s) as described below.
Here, the function G is a hash function having an output length of 3 k bits, and the first function unit 113e uses the upper k bits of G (s) as the verification value a and shares k bits in the middle of G (s). The key K is used, and the lower k bits of G (s) are the random value u.

次に、第1関数部113eは、生成した検証値aを暗号化部114eと第2関数部115dとへ出力し、生成した共有鍵Kを共通鍵暗号部118へ出力し、生成した乱数値uを暗号化部114eへ出力する。
(2)暗号化部114e
暗号化部114eは、公開鍵入力部111dから公開鍵多項式hを受け取り、第1関数部113eから検証値aと乱数値uとを受け取る。次に、以下に示すようにして、公開鍵多項式hと乱数値uとを用いて検証値aの第1暗号文c1を生成する。ここで、第1暗号文c1は、NTRU暗号による暗号文である。また、乱数値uは、ブラインド値であり、暗号化の対象である検証値aを不明瞭にするために用いられる。
Next, the first function unit 113e outputs the generated verification value a to the encryption unit 114e and the second function unit 115d, outputs the generated shared key K to the common key encryption unit 118, and generates the generated random value. u is output to the encryption unit 114e.
(2) Encryption unit 114e
The encryption unit 114e receives the public key polynomial h from the public key input unit 111d, and receives the verification value a and the random value u from the first function unit 113e. Next, as shown below, the first ciphertext c1 of the verification value a is generated using the public key polynomial h and the random value u. Here, the first ciphertext c1 is a ciphertext based on the NTRU cipher. The random value u is a blind value and is used to obscure the verification value a that is the object of encryption.

暗号化部114eは、NTRU暗号のパラメータdに対し、d個の項の各係数が「1」であり、他のd個の項の各係数が「−1」であり、残りの項の各係数が「0」となる乱数多項式rを乱数値uから一意に求まるように生成する。
具体的には、例えば、暗号化部114eは、乱数値uを擬似乱数系列の初期値(乱数シード)として設定し、{0,1,...,N−1}から重複しない2d個の擬似乱数を生成し、最初のd個の擬似乱数により示される次元の項の係数を「1」とし、次のd個の擬似乱数により示される次元の項の係数を「−1」とし、残りの次元の項の係数を「0」とすることにより、乱数多項式rを生成する。
For the parameter d of the NTRU cipher, the encryption unit 114e is such that each coefficient of d terms is “1”, each coefficient of other d terms is “−1”, and each of the remaining terms A random number polynomial r having a coefficient of “0” is generated so as to be uniquely obtained from the random value u.
Specifically, for example, the encryption unit 114e sets the random value u as an initial value (random number seed) of the pseudo-random number sequence, and {0, 1,. . . , N−1} to generate non-overlapping 2d pseudorandom numbers, set the coefficient of the dimension term indicated by the first d pseudorandom numbers to “1”, and the dimension of the dimension indicated by the next d pseudorandom numbers The random coefficient r is generated by setting the coefficient of the term to “−1” and the coefficient of the remaining dimension to “0”.

次に、暗号化部114eは、生成した乱数多項式rを用いて、暗号化部114dと同様にして、第1暗号文c1=E(ap,r,h)を生成する。
次に、暗号化部114eは、生成した第1暗号文c1を第2関数部115dと第1送信部117dとへ出力する。
5.3 復号装置120eの構成
復号装置120eは、図18に示すように、秘密鍵入力部121e、復号化部123e、第3関数部124d、乱数マスク除去部125d、第4関数部126e、比較部127e、共通鍵復号部128及び第2受信部129から構成されている。
Next, the encryption unit 114e generates the first ciphertext c1 = E (ap, r, h) using the generated random number polynomial r in the same manner as the encryption unit 114d.
Next, the encryption unit 114e outputs the generated first ciphertext c1 to the second function unit 115d and the first transmission unit 117d.
5.3 Configuration of Decryption Device 120e As shown in FIG. 18, the decryption device 120e includes a secret key input unit 121e, a decryption unit 123e, a third function unit 124d, a random number mask removal unit 125d, a fourth function unit 126e, and a comparison. Unit 127e, common key decryption unit 128, and second reception unit 129.

ここで、第3関数部124d、乱数マスク除去部125d、共通鍵復号部128及び第2受信部129については、復号装置120dに含まれている各構成要素と同一であるので、説明を省略し、復号装置120dに含まれている各構成要素と異なる秘密鍵入力部121e、復号化部123e、第4関数部126e及び第2比較部127eについてその構成と動作を説明する。   Here, the third function unit 124d, the random number mask removal unit 125d, the common key decryption unit 128, and the second reception unit 129 are the same as the respective constituent elements included in the decryption device 120d, and thus the description thereof is omitted. The configuration and operation of the secret key input unit 121e, the decryption unit 123e, the fourth function unit 126e, and the second comparison unit 127e, which are different from the components included in the decryption device 120d, will be described.

(1)秘密鍵入力部121e
秘密鍵入力部121eは、メモリカード170から復号装置120eの秘密鍵多項式fと公開鍵多項式hとを受け取り、秘密鍵多項式fを復号化部123eへ出力し、公開鍵多項式hを比較部127eへ出力する。
(2)復号化部123e
復号化部123eは、秘密鍵入力部121eから秘密鍵多項式fを受け取り、第1受信部122dから第1暗号文c1を受け取る。次に、秘密鍵多項式fを用いて、第1暗号文c1を復号して復号検証値a’を生成し、生成した復号検証値a’を第3関数部124dへ出力し、受け取った第1暗号文c1を比較部127eへ出力する。
(1) Private key input unit 121e
The secret key input unit 121e receives the secret key polynomial f and the public key polynomial h of the decryption device 120e from the memory card 170, outputs the secret key polynomial f to the decryption unit 123e, and outputs the public key polynomial h to the comparison unit 127e. Output.
(2) Decoding unit 123e
The decryption unit 123e receives the secret key polynomial f from the secret key input unit 121e, and receives the first ciphertext c1 from the first reception unit 122d. Next, using the secret key polynomial f, the first ciphertext c1 is decrypted to generate a decryption verification value a ′, the generated decryption verification value a ′ is output to the third function unit 124d, and the received first The ciphertext c1 is output to the comparison unit 127e.

(3)第4関数部126e
第4関数部126eは、第1関数部113eが有する関数と同じ関数Gによるアルゴリズムを有している。
第4関数部126eは、乱数マスク除去部125dから復号乱数s’を受け取り、受け取った復号乱数s’のハッシュ関数値G(s’)を生成する。次に、第1関数部113eと同様にして、関数値G(s’)から検証値a’’と共有鍵K’と乱数値u’とを生成し、検証値a’’と共有鍵K’と乱数値u’とを比較部127eへ出力する。
(3) Fourth function unit 126e
The fourth function unit 126e has an algorithm based on the same function G as the function of the first function unit 113e.
The fourth function unit 126e receives the decrypted random number s ′ from the random number mask removing unit 125d, and generates a hash function value G (s ′) of the received decrypted random number s ′. Next, similarly to the first function unit 113e, a verification value a ″, a shared key K ′, and a random value u ′ are generated from the function value G (s ′), and the verification value a ″ and the shared key K are generated. 'And the random value u' are output to the comparison unit 127e.

(4)比較部127e
比較部127eは、図18に示すように、比較演算部127p及び暗号化部127qから構成されている。
暗号化部127qは、秘密鍵入力部121eから公開鍵多項式hを受け取り、第4関数部126eから検証値a’’と乱数値u’とを受け取る。次に、受け取った公開鍵多項式hと乱数値u’とを用いて、暗号化部114dと同様にして、受け取った検証値a’’を暗号化して第1再暗号文c1’を生成し、生成した第1再暗号文c1’を比較演算部127pへ出力する。
(4) Comparison unit 127e
As shown in FIG. 18, the comparison unit 127e includes a comparison operation unit 127p and an encryption unit 127q.
The encryption unit 127q receives the public key polynomial h from the secret key input unit 121e, and receives the verification value a ″ and the random value u ′ from the fourth function unit 126e. Next, using the received public key polynomial h and the random value u ′, the received verification value a ″ is encrypted in the same manner as the encryption unit 114d to generate the first re-ciphertext c1 ′. The generated first re-ciphertext c1 ′ is output to the comparison operation unit 127p.

比較演算部127pは、復号化部123bから第1暗号文c1を受け取り、暗号化部127qから第1再暗号文c1’を受け取る。次に、受け取った第1暗号文c1と第1再暗号文c1’とを比較して、c1’=c1であるか否かを判断する。c1’=c1であれば、受け取った共有鍵K’を共通鍵復号部128へ出力し、c1’=c1でなければ、受け取った共有鍵K’を出力しない。   The comparison operation unit 127p receives the first ciphertext c1 from the decryption unit 123b and receives the first re-ciphertext c1 'from the encryption unit 127q. Next, the received first ciphertext c1 and the first re-ciphertext c1 'are compared to determine whether c1' = c1. If c1 '= c1, the received shared key K' is output to the common key decryption unit 128. If c1 '= c1, the received shared key K' is not output.

5.4 コンテンツ配信システム10eの動作検証
以下に、コンテンツ配信システム10eの全体の動作について、図19に示す処理系統図を用いて説明する。
暗号装置110eは、復号装置120eの公開鍵多項式hを受け取り(ステップS201)、乱数sを生成し(ステップS202)、関数値G(s)を生成し(ステップS203)、関数値G(s)から検証値a、共有鍵K及び乱数値uを導出する(ステップS204e)。次に、暗号装置110eは、検証値aを、公開鍵多項式h及び乱数値uを用いてNTRU暗号で暗号化して第1暗号文c1を生成し(ステップS205)、検証値aと第1暗号文c1から関数値H(a,c1)を生成し(ステップS206)、乱数sと関数値H(a,c1)から第2暗号文c2=s xor H(a,c1)を生成する(ステップS207)。次に、暗号装置110bは、第1暗号文c1と第2暗号文c2とをインターネット130を介して復号装置120eへ送信する(ステップS208)。
5.4 Operation Verification of Content Distribution System 10e The overall operation of the content distribution system 10e will be described below with reference to the processing system diagram shown in FIG.
The encryption device 110e receives the public key polynomial h of the decryption device 120e (step S201), generates a random number s (step S202), generates a function value G (s) (step S203), and functions value G (s) The verification value a, the shared key K, and the random value u are derived from (step S204e). Next, the encryption device 110e encrypts the verification value a with the NTRU cipher using the public key polynomial h and the random value u to generate the first ciphertext c1 (step S205), and the verification value a and the first encryption A function value H (a, c1) is generated from the sentence c1 (step S206), and a second ciphertext c2 = s xor H (a, c1) is generated from the random number s and the function value H (a, c1) (step S206). S207). Next, the encryption device 110b transmits the first ciphertext c1 and the second ciphertext c2 to the decryption device 120e via the Internet 130 (step S208).

すなわち、この暗号装置110eは、以下の処理(a)〜(d)を行い、暗号文C=(c1,c2)を復号装置120eへ送信する。
(a)乱数sを生成する。
(b)G(s)を生成し、G(s)からa,K,uを生成する。
(c)公開鍵多項式h,乱数値uを用いて検証値aの第1暗号文c1を生成する。
That is, the encryption device 110e performs the following processes (a) to (d), and transmits the ciphertext C = (c1, c2) to the decryption device 120e.
(A) Generate a random number s.
(B) Generate G (s) and generate a, K, u from G (s).
(C) The first cipher text c1 of the verification value a is generated using the public key polynomial h and the random value u.

(d)c2=s xor H(a,c1)を生成する。
次に、暗号装置110eは、導出した共有鍵Kを用いて、コンテンツサーバ装置140から入力された平文mi(1≦i≦n)を共通鍵暗号で暗号化して暗号文Ci(1≦i≦n)を生成し(ステップS209)、インターネット130を介して復号装置120eへ送信する(ステップS210)。
(D) Generate c2 = s xor H (a, c1).
Next, using the derived shared key K, the encryption device 110e encrypts the plaintext mi (1 ≦ i ≦ n) input from the content server device 140 with the common key encryption, and the ciphertext Ci (1 ≦ i ≦ n). n) is generated (step S209) and transmitted to the decryption device 120e via the Internet 130 (step S210).

一方、復号装置120eは、復号装置120eの秘密鍵多項式f及び公開鍵多項式hを受け取り(ステップS251、ステップS251e)、インターネット130を介して暗号装置110eから第1暗号文c1と第2暗号文c2を受信し(ステップS208)、第1暗号文c1を秘密鍵多項式fを用いて復号して復号検証値a’を生成する(ステップS252)。次に、復号検証値a’と第1暗号文c1から関数値H(a’,c1)を生成し(ステップS253)、第2暗号文c2と関数値H(a’,c1)から復号乱数s’=c2 xor H(a’,c1)を生成する(ステップS254)。次に、復号装置120eは、復号乱数s’の関数値G(s’)を生成し(ステップS255)、生成した関数値G(s’)から検証値a’’、共有鍵K’及び乱数値u’を導出する(ステップS256e)。次に、検証値a’’を暗号化して第1再暗号文c1’を生成し(ステップS261)、c1’=c1であれば(ステップS257e)、共有鍵K’を出力する(ステップS258)。   On the other hand, the decryption device 120e receives the private key polynomial f and the public key polynomial h of the decryption device 120e (steps S251 and S251e), and the first ciphertext c1 and the second ciphertext c2 from the encryption device 110e via the Internet 130. (Step S208), the first ciphertext c1 is decrypted using the secret key polynomial f to generate a decryption verification value a ′ (step S252). Next, a function value H (a ′, c1) is generated from the decryption verification value a ′ and the first ciphertext c1 (step S253), and a decryption random number is derived from the second ciphertext c2 and the function value H (a ′, c1). s ′ = c2 xor H (a ′, c1) is generated (step S254). Next, the decryption device 120e generates a function value G (s ′) of the decrypted random number s ′ (step S255), and from the generated function value G (s ′), the verification value a ″, the shared key K ′, and the random number A numerical value u ′ is derived (step S256e). Next, the verification value a ″ is encrypted to generate the first re-ciphertext c1 ′ (step S261). If c1 ′ = c1 (step S257e), the shared key K ′ is output (step S258). .

すなわち、復号装置120eは、以下の処理(a)〜(e)を行い、共有鍵K’を導出する。
(a)秘密鍵多項式fを用いて第1暗号文c1を復号してa’を生成する。
(b)s’=c2 xor H(a’,c1)を生成する。
(c)G(s’)を生成し、G(s’)からa’’,K’,u’を生成する。
That is, the decryption device 120e performs the following processes (a) to (e) to derive the shared key K ′.
(A) Decrypt the first ciphertext c1 using the secret key polynomial f to generate a ′.
(B) Generate s ′ = c2 xor H (a ′, c1).
(C) G (s ′) is generated, and a ″, K ′, u ′ are generated from G (s ′).

(d)公開鍵多項式h及び乱数値u’を用いてa’’の第1再暗号文c1’を生成する。
(e)c1’=c1が成立するかどうかチェックする。成立すれば共有鍵K’を出力する。
ここで、暗号装置110eで用いられた公開鍵多項式hに対応する正しい秘密鍵多項式fが復号装置120eで用いられれば、第1暗号文c1は正しく復号されて、復号検証値a’=aとなり、第2暗号文c2とH(a’,c1)から生成される復号乱数s’=sとなる。従って、G(s’)から導出される検証値a’’=aとなり、共有鍵K’=Kとなり、乱数値u’=uとなる。そして、a’’=a及びu’=uが成り立つので、c1’=c1が成り立ち、復号装置120eは暗号装置110eと同じ共有鍵Kを導出できることになる。
(D) A first recipher text c1 ′ of a ″ is generated using the public key polynomial h and the random value u ′.
(E) Check whether c1 ′ = c1 holds. If it is established, the shared key K ′ is output.
Here, if the correct private key polynomial f corresponding to the public key polynomial h used in the encryption device 110e is used in the decryption device 120e, the first ciphertext c1 is correctly decrypted and the decryption verification value a ′ = a is obtained. The decrypted random number s ′ = s generated from the second ciphertext c2 and H (a ′, c1). Therefore, the verification value a ″ derived from G (s ′) = a, the shared key K ′ = K, and the random value u ′ = u. Since a ″ = a and u ′ = u hold, c1 ′ = c1 holds, and the decryption device 120e can derive the same shared key K as the encryption device 110e.

次に、復号装置120eは、導出した共有鍵K’(=K)を用いて、インターネット130を介して暗号装置110eから共通鍵暗号文Ci(1≦i≦n)を受信し(ステップS210)、受信した共通鍵暗号文Ci(1≦i≦n)を共通鍵暗号で復号して復号文mi’(1≦i≦n)を生成し(ステップS259)、生成した復号文mi’(1≦i≦n)を再生装置150へ出力する。   Next, the decryption device 120e receives the common key ciphertext Ci (1 ≦ i ≦ n) from the encryption device 110e via the Internet 130 using the derived shared key K ′ (= K) (step S210). The received common key cipher text Ci (1 ≦ i ≦ n) is decrypted with the common key cipher to generate a decrypted text mi ′ (1 ≦ i ≦ n) (step S259), and the generated decrypted text mi ′ (1 ≦ i ≦ n) is output to the playback device 150.

ここで、共通鍵暗号文生成時に用いた暗号鍵Kと復号文生成時に用いる暗号鍵K’とは同一であるので、復号装置120eは、正しくmi’=mi(1≦i≦n)を得ることができる。
5.5 コンテンツ配信システム10eにおける効果
従来のPSEC−KEMアルゴリズムでは、ハッシュ関数Hの入力にa*P、a*Wを用い、秘密鍵を用いずにa*Pからa*Wを計算することが困難なDiffie−Hellman問題を用いて、最終的に共有鍵Kを導出することにより、秘密鍵を知らなければその共有鍵Kを導出できないようにしている。従って、NTRU暗号をはじめ、Diffie−Hellman問題を利用しない他の公開鍵暗号では、Diffie−Hellman問題のa*P、a*Wに相当するものがないため、PSEC−KEMアルゴリズムを適用できないという問題点がある。
Here, since the encryption key K used when generating the common key ciphertext and the encryption key K ′ used when generating the decrypted text are the same, the decryption device 120e correctly obtains mi ′ = mi (1 ≦ i ≦ n). be able to.
5.5 Effect in Content Distribution System 10e In the conventional PSEC-KEM algorithm, a * P and a * W are used as the input of the hash function H, and a * W is calculated from a * P without using a secret key. Finally, the shared key K is derived using the Diffie-Hellman problem, which makes it difficult to derive the shared key K unless the secret key is known. Therefore, since there is no equivalent to a * P and a * W of the Diffie-Hellman problem in other public key ciphers that do not use the Diffie-Hellman problem, including the NTRU cipher, there is a problem that the PSEC-KEM algorithm cannot be applied. There is a point.

しかしながら、本発明のコンテンツ配信システム、暗号装置及び復号装置では、ハッシュ関数Hの入力を検証値aとその暗号文c1としたので、実施の形態3と同様に、NTRU暗号や他の公開鍵暗号を適用できる。
なお、復号エラーが発生すると、復号装置は誤った復号検証値a’を得ることになるが、c1’はc1と等しくならないために、共有鍵K’を出力しない。従って、復号エラーが発生しても、暗号装置と復号装置との間で誤った鍵を共有することを防止できるという効果もある。
However, in the content distribution system, encryption device, and decryption device of the present invention, the input of the hash function H is the verification value a and its ciphertext c1, so that, as in the third embodiment, NTRU encryption or other public key encryption is used. Can be applied.
If a decryption error occurs, the decryption device obtains an incorrect decryption verification value a ′, but c1 ′ is not equal to c1, and therefore does not output the shared key K ′. Therefore, even if a decryption error occurs, it is possible to prevent the wrong key from being shared between the encryption device and the decryption device.

これにより、NTRU暗号を用いて鍵カプセル化メカニズムを構成することができ、暗号装置と復号装置との間でNTRU暗号を用いて鍵配送が行えるようになる。
また、本発明による方式は、非特許文献3に記述されている証明方法と同様の方法により、理論的にその安全性が証明できる。
5.6 変形例
上記に説明した実施の形態は、本発明の実施の一例であり、本発明はこの実施の形態に何ら限定されるものではなく、その主旨を逸脱しない範囲において種々なる態様で実施し得るものである。実施の形態3におけるのと同様の変形を施すことができるのはもちろんであるが、以下のような場合も本発明に含まれる。
As a result, a key encapsulation mechanism can be configured using NTRU encryption, and key distribution can be performed between the encryption device and the decryption device using NTRU encryption.
Further, the method according to the present invention can theoretically prove its safety by a method similar to the proof method described in Non-Patent Document 3.
5.6 Modifications The embodiment described above is an example of the implementation of the present invention, and the present invention is not limited to this embodiment at all, and in various modes without departing from the gist thereof. It can be implemented. Of course, modifications similar to those of the third embodiment can be made, but the following cases are also included in the present invention.

(1)暗号化部114eで行われる乱数値uから乱数多項式rへの変換方法は、この方法に限られずuからrが一意に求まれば他の変換方法でもよい。例えば、乱数値uを多項式に対応させる関数、又は関数値テーブルを用いて変換してもよい。
また、例えば、実施の形態2の変形例(1)に述べた変換方法を用いて変換してもよい。
(1) The conversion method from the random value u to the random number polynomial r performed by the encryption unit 114e is not limited to this method, and other conversion methods may be used as long as r is uniquely obtained from u. For example, the random value u may be converted using a function corresponding to a polynomial or a function value table.
Further, for example, the conversion may be performed using the conversion method described in the modification (1) of the second embodiment.

(2)暗号化部114e及び復号化部123eで用いる公開鍵暗号は、暗号化部114eにおいて、検証値aを公開鍵と乱数値uとを用いて暗号化して第1暗号文c1を生成し、復号化部123eにおいて、第1暗号文c1を秘密鍵で復号して、検証値aと等しい復号検証値a’を生成できればよい。従って、暗号化部114e及び復号化部123eで用いる公開鍵暗号は、NTRU暗号以外に、乱数を用いる公開鍵暗号ならばどんな暗号でも利用できる。   (2) The public key cipher used by the encryption unit 114e and the decryption unit 123e is to generate the first ciphertext c1 by encrypting the verification value a using the public key and the random value u in the encryption unit 114e. The decryption unit 123e only needs to be able to decrypt the first ciphertext c1 with the secret key and generate a decryption verification value a ′ equal to the verification value a. Therefore, the public key cryptography used in the encryption unit 114e and the decryption unit 123e can be any public key cryptography that uses a random number other than the NTRU cipher.

例えば、ElGamal暗号ならば、h、fをそれぞれElGamal暗号の公開鍵、秘密鍵とし、暗号化部114eにおいて、aをhと乱数値uとを用いて暗号化してc1を生成し、復号化部123eにおいて、c1をfを用いて復号してa’を生成すればよい。
(3)乱数値uは、第1関数部113e及び第4関数部126eで生成される以外にも、暗号装置110eと復号装置120eとで同じ値を得られれば、他の生成方法でもよい。
For example, in the case of ElGamal encryption, h and f are respectively used as public and private keys of ElGamal encryption, and the encryption unit 114e generates a c1 by encrypting a using h and the random value u. In 123e, c1 may be decoded using f to generate a ′.
(3) The random value u may be generated by the first function unit 113e and the fourth function unit 126e as long as the same value can be obtained by the encryption device 110e and the decryption device 120e.

例えば、任意の関数Funcに対し、u=Func(s)として暗号装置110eと復号装置120eとで同じ値を得られるようにしてもよい。すなわち、
・G(s)を生成し、G(s)からa、Kを生成する。
・Func(s)を生成し、u=Func(s)とする。
としてもよい。
For example, for an arbitrary function Func, the same value may be obtained by the encryption device 110e and the decryption device 120e as u = Func (s). That is,
Generate G (s) and generate a and K from G (s).
Generate Func (s) and set u = Func (s).
It is good.

(4)さらに、乱数値uは、第1関数部113e及び第4関数部126eで生成される以外にも、暗号装置110eと復号装置120eとで同じ値を得られればよいため、暗号装置110eが乱数値uを復号装置120eに直接送信してもよい。
すなわち、以下のように、暗号文Cと乱数値uとを復号装置120eに送信してもよい。
(4) Furthermore, since the random value u is not generated by the first function unit 113e and the fourth function unit 126e, it is sufficient that the same value can be obtained by the encryption device 110e and the decryption device 120e. May transmit the random number u directly to the decryption device 120e.
That is, as described below, the ciphertext C and the random value u may be transmitted to the decryption device 120e.

・G(s)を生成し、G(s)からa、Kを生成する。
・暗号装置110eは、別途、乱数値uを、復号装置120eへ送信する。
また、暗号装置110eは、乱数値uを暗号化して送信してもよい。
(5)さらに、乱数値uは、暗号装置110eと復号装置120eとで同じ値を得られればよいため、乱数値uの一部から構成される部分情報を第1関数部113e及び第4関数部126eで生成し、乱数値uの残りの部分情報を暗号装置110eから復号装置120eに直接送信してもよい。
Generate G (s) and generate a and K from G (s).
The encryption device 110e separately transmits the random value u to the decryption device 120e.
Further, the encryption device 110e may encrypt the random value u and transmit it.
(5) Furthermore, since the random value u only needs to be obtained by the encryption device 110e and the decryption device 120e, partial information composed of a part of the random value u is represented by the first function unit 113e and the fourth function. The remaining partial information of the random value u generated by the unit 126e may be directly transmitted from the encryption device 110e to the decryption device 120e.

例えば、以下のように、暗号文Cと乱数値u2とを復号装置120eに送信してもよい。
・G(s)を生成し、G(s)からa、K、u1を生成する。
・暗号装置110eは、別途、乱数値u2を、復号装置120eへ送信する。
・乱数値uを、u=u1 xor u2により生成する。
For example, the ciphertext C and the random value u2 may be transmitted to the decryption device 120e as follows.
Generate G (s) and generate a, K, u1 from G (s).
The encryption device 110e separately transmits the random value u2 to the decryption device 120e.
Generate a random value u by u = u1 xor u2.

また、暗号装置110eは、乱数値u2を暗号化して送信してもよい。
(6)復号装置120eは、第1暗号文c1が第4関数部126eで得られる検証値a’’の暗号文かどうかチェックを行い、c1がa’’の暗号文であるときに共有鍵K’を用いて共通鍵暗号文Ciを復号しているが、実施の形態3の復号装置120dと同じチェック方法により行うとしてもよい。
Further, the encryption device 110e may encrypt and transmit the random value u2.
(6) The decryption device 120e checks whether the first ciphertext c1 is the ciphertext of the verification value a ″ obtained by the fourth function unit 126e, and when c1 is the ciphertext of a ″, the shared key Although the common key ciphertext Ci is decrypted using K ′, the same check method as that of the decryption device 120d of the third embodiment may be used.

すなわち、図20の処理系統図に示すように、復号装置120dと同じ復号化部123d及び比較部127dを用いて、以下のように、チェックしてもよい。
(a)秘密鍵多項式fを用いて第1暗号文c1を復号してa’を生成する(ステップS252)。
(b)s’=c2 xor H(a’,c1)を生成する(ステップS254)。
That is, as shown in the processing system diagram of FIG. 20, the same check may be performed as follows using the same decoding unit 123d and comparison unit 127d as the decoding device 120d.
(A) The first ciphertext c1 is decrypted using the secret key polynomial f to generate a ′ (step S252).
(B) Generate s ′ = c2 xor H (a ′, c1) (step S254).

(c)G(s’)を生成し(ステップS255)、G(s’)からa’’、K’、u’を生成する(ステップS256e)。
(d)a’’=a’が成立するかどうかチェックする(ステップS257)。成立すれば共有鍵K’を出力する(ステップS258)。
また、このチェックは、第1暗号文c1が復号検証値a’の暗号文かどうかのチェックでもよい。
(C) G (s ′) is generated (step S255), and a ″, K ′, and u ′ are generated from G (s ′) (step S256e).
(D) It is checked whether or not a ″ = a ′ is satisfied (step S257). If established, the shared key K ′ is output (step S258).
In addition, this check may be a check of whether or not the first ciphertext c1 is a ciphertext of the decryption verification value a ′.

7.実施の形態3及び実施の形態4のまとめ
以上説明したように、本発明は、共有鍵データと、予め与えられた公開鍵データに基づいて前記共有鍵データを暗号化した暗号化共有鍵データを出力する共有鍵生成装置であって、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて検証値データと前記共有鍵データに変換する共有鍵導出部と、前記検証値データを前記公開鍵データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記秘密数データを前記変換検証値データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部とを備え、前記暗号化共有鍵データは、前記第1の暗号予備データと前記第2の暗号予備データから構成される。
7). Summary of Embodiment 3 and Embodiment 4 As described above, the present invention uses shared key data and encrypted shared key data obtained by encrypting the shared key data based on public key data given in advance. A shared key generation device that outputs a secret number data generation unit that generates secret number data, a shared key derivation unit that converts the secret number data into verification value data and the shared key data based on a predetermined process, A first encryption unit that encrypts the verification value data based on the public key data to generate first encrypted preliminary data; and converts the verification value data into converted verification value data based on a predetermined process. And a second encryption unit that encrypts the secret number data based on the conversion verification value data to generate second encrypted preliminary data, and the encrypted shared key data includes: The first It consists of encryption preliminary data and the second encryption preliminary data.

また、本発明は、共有鍵データと、予め与えられた公開鍵データに基づいて前記共有鍵データを暗号化した暗号化共有鍵データを出力する共有鍵生成装置であって、秘密数データを生成する秘密数データ生成部と、前記秘密数データと前記第1の暗号予備データを所定の処理に基づいて検証値データと前記共有鍵データに変換する共有鍵導出部と、前記検証値データを前記公開鍵データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記秘密数データを前記変換検証値データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部とを備え、前記暗号化共有鍵データは、前記第1の暗号予備データと前記第2の暗号予備データから構成される。   Further, the present invention is a shared key generation device that outputs shared key data and encrypted shared key data obtained by encrypting the shared key data based on public key data given in advance, and generates secret number data A secret number data generating unit, a secret key data and the first encryption preliminary data that are converted into verification value data and the shared key data based on a predetermined process, and the verification value data A first encryption unit that generates first encrypted preliminary data by encrypting based on public key data; a verification value conversion unit that converts the verification value data into converted verification value data based on a predetermined process; A second encryption unit that encrypts the secret number data based on the conversion verification value data to generate second encrypted preliminary data, and the encrypted shared key data includes the first encrypted preliminary data And the second It consists of encryption preliminary data.

また、本発明は、共有鍵データと、予め与えられた公開鍵データに基づいて前記共有鍵データを暗号化した暗号化共有鍵データを出力する共有鍵生成装置であって、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて検証値データと乱数データと前記共有鍵データとに変換する共有鍵導出部と、前記検証値データを前記公開鍵データと前記乱数データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記秘密数データを前記変換検証値データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部とを備え、前記暗号化共有鍵データは、前記第1の暗号予備データと前記第2の暗号予備データから構成される。   Further, the present invention is a shared key generation device that outputs shared key data and encrypted shared key data obtained by encrypting the shared key data based on public key data given in advance, and generates secret number data A secret number data generating unit, a shared key derivation unit that converts the secret number data into verification value data, random number data, and the shared key data based on a predetermined process, and the verification value data as the public key data A first encryption unit that encrypts based on the random number data to generate first encryption preliminary data, a verification value conversion unit that converts the verification value data into converted verification value data based on a predetermined process, A second encryption unit that encrypts the secret number data based on the conversion verification value data to generate second encrypted preliminary data, and the encrypted shared key data includes the first encrypted preliminary data And said Composed of two encryption preliminary data.

また、本発明は、共有鍵データと、予め与えられた公開鍵データに基づいて前記共有鍵データを暗号化した暗号化共有鍵データを出力する共有鍵生成装置であって、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて検証値データと乱数データと前記共有鍵データとに変換する共有鍵導出部と、前記検証値データを前記公開鍵データと前記乱数データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記検証値データと前記第1の暗号予備データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記秘密数データを前記変換検証値データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部とを備え、前記暗号化共有鍵データは、前記第1の暗号予備データと前記第2の暗号予備データから構成される。   Further, the present invention is a shared key generation device that outputs shared key data and encrypted shared key data obtained by encrypting the shared key data based on public key data given in advance, and generates secret number data A secret number data generating unit, a shared key derivation unit that converts the secret number data into verification value data, random number data, and the shared key data based on a predetermined process, and the verification value data as the public key data A first encryption unit configured to generate first encrypted preliminary data by encrypting based on the random number data; converting the verification value data and the first encrypted preliminary data into converted verification value data based on a predetermined process; A verification value conversion unit for converting, and a second encryption unit for encrypting the secret number data based on the conversion verification value data to generate second encrypted preliminary data, wherein the encrypted shared key data is The above Wherein the first encryption preliminary data and a second encryption preliminary data.

ここで、前記秘密数データは、ランダムに生成される乱数であるとしてもよい。
ここで、前記共有鍵導出部は、所定の処理として、一方向性ハッシュ関数を用いるとしてもよい。
ここで、前記第1の暗号化部は、NTRU暗号方式により暗号化して前記第1の暗号予備データを生成するとしてもよい。
Here, the secret number data may be a randomly generated random number.
Here, the shared key derivation unit may use a one-way hash function as the predetermined process.
Here, the first encryption unit may generate the first encryption preliminary data by performing encryption using the NTRU encryption method.

ここで、前記検証値変換部は、所定の処理として、一方向性ハッシュ関数を用いるとしてもよい。
ここで、前記検証値変換部は、所定の処理として、前記検証値データをそのまま前記変換検証値データとするとしてもよい。
ここで、前記第2の暗号化部は、前記秘密数データと前記変換検証値データの排他的論理和演算を行って前記第2の暗号予備データを生成するとしてもよい。
Here, the verification value conversion unit may use a one-way hash function as the predetermined process.
Here, the verification value conversion unit may use the verification value data as it is as the conversion verification value data as a predetermined process.
Here, the second encryption unit may generate the second encryption preliminary data by performing an exclusive OR operation on the secret number data and the conversion verification value data.

ここで、前記第2の暗号化部は、前記秘密数データを、前記変換検証値データを暗号鍵として用いて共通鍵暗号方式により暗号化して前記第2の暗号予備データを生成するとしてもよい。
ここで、前記第2の暗号化部は、前記秘密数データに前記変換検証値データを加算して前記第2の暗号予備データを生成するとしてもよい。
Here, the second encryption unit may generate the second encryption preliminary data by encrypting the secret number data by a common key encryption method using the conversion verification value data as an encryption key. .
Here, the second encryption unit may generate the second encryption preliminary data by adding the conversion verification value data to the secret number data.

ここで、前記第2の暗号化部は、前記秘密数データに前記変換検証値データを乗算して前記第2の暗号予備データを生成するとしてもよい。
ここで、前記暗号化共有鍵データは、前記第1の暗号予備データと前記第2暗号予備データのビット連結データであるとしてもよい。
また、本発明は、予め与えられた秘密鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力すると有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと前記共有鍵データに変換する共有鍵導出部とを備え、前記検証値データと前記検証値検証データが一致する場合に、前記共有鍵データを出力する。
Here, the second encryption unit may generate the second encryption preliminary data by multiplying the secret number data by the conversion verification value data.
Here, the encrypted shared key data may be bit concatenated data of the first encrypted preliminary data and the second encrypted preliminary data.
Further, the present invention is effective when the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data is decrypted based on the secret key data given in advance and the shared key data is output. A key recovery device, wherein the first encryption preliminary data is decrypted based on the secret key data to generate verification value data; and the verification value data is converted into a predetermined process. A verification value conversion unit for converting into conversion verification value data; a second decryption unit for generating secret number data by decoding the second encrypted preliminary data based on the conversion verification value data; and the secret number data A verification value verification data and a shared key derivation unit that converts the verification value verification data into the shared key data based on a predetermined process, and outputs the shared key data when the verification value data matches the verification value verification data .

また、本発明は、予め与えられた秘密鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データと前記第1の暗号予備データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと前記共有鍵データに変換する共有鍵導出部とを備え、前記検証値データと前記検証値検証データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on pre-assigned secret key data, and outputs the shared key data A key recovery device, wherein the first encryption preliminary data is decrypted based on the secret key data to generate verification value data, the verification value data, and the first encryption preliminary data A verification value conversion unit that converts data into converted verification value data based on a predetermined process; and a second decryption that generates secret number data by decrypting the second encrypted preliminary data based on the converted verification value data And a shared key derivation unit that converts the secret number data into verification value verification data and the shared key data based on a predetermined process, and when the verification value data matches the verification value verification data , Share And it outputs the data.

また、本発明は、予め与えられた秘密鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと乱数データと前記共有鍵データに変換する共有鍵導出部とを備え、前記検証値データと前記検証値検証データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on pre-assigned secret key data, and outputs the shared key data A key recovery device, wherein the first encryption preliminary data is decrypted based on the secret key data to generate verification value data; and the verification value data is converted into a predetermined process. A verification value conversion unit for converting into conversion verification value data; a second decryption unit for generating secret number data by decoding the second encrypted preliminary data based on the conversion verification value data; and the secret number data And a shared key derivation unit that converts the verification value verification data, the random number data, and the shared key data based on a predetermined process, and when the verification value data and the verification value verification data match, the shared key data Output That.

また、本発明は、予め与えられた秘密鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データと前記第1の暗号予備データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと乱数データと前記共有鍵データに変換する共有鍵導出部とを備え、前記検証値データと前記検証値検証データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on pre-assigned secret key data, and outputs the shared key data A key recovery device, wherein the first encryption preliminary data is decrypted based on the secret key data to generate verification value data, the verification value data, and the first encryption preliminary data A verification value conversion unit that converts data into converted verification value data based on a predetermined process; and a second decryption that generates secret number data by decrypting the second encrypted preliminary data based on the converted verification value data And a shared key derivation unit that converts the secret number data into verification value verification data, random number data, and the shared key data based on a predetermined process, and the verification value data matches the verification value verification data When to And it outputs the shared key data.

また、本発明は、予め与えられた秘密鍵データ及び公開鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと乱数データと前記共有鍵データに変換する共有鍵導出部と、前記検証値検証データを前記公開鍵データと前記乱数データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記第1の暗号予備データと前記第3の暗号予備データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on the secret key data and the public key data given in advance, thereby sharing the shared key data. A first decryption unit that decrypts the first encryption preliminary data based on the secret key data to generate verification value data, and outputs the verification value data to a predetermined value. A verification value conversion unit for converting into converted verification value data based on the processing; a second decryption unit for decoding the second encrypted preliminary data based on the converted verification value data to generate secret number data; A shared key derivation unit that converts the secret number data into verification value verification data, random number data, and the shared key data based on a predetermined process, and encrypts the verification value verification data based on the public key data and the random number data. And third and a third encryption unit for generating encrypted preliminary data, the first encryption preliminary data and the third cipher preliminary data if it matches, outputs the shared key data.

また、本発明は、予め与えられた秘密鍵データ及び公開鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと乱数データと前記共有鍵データに変換する共有鍵導出部と、前記検証値データを前記公開鍵データと前記乱数データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記第1の暗号予備データと前記第3の暗号予備データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on the secret key data and the public key data given in advance, thereby sharing the shared key data. A first decryption unit that decrypts the first encryption preliminary data based on the secret key data to generate verification value data, and outputs the verification value data to a predetermined value. A verification value conversion unit for converting into converted verification value data based on the processing; a second decryption unit for decoding the second encrypted preliminary data based on the converted verification value data to generate secret number data; A shared key derivation unit that converts the secret number data into verification value verification data, random number data, and the shared key data based on a predetermined process, and encrypts the verification value data based on the public key data and the random number data. And a third encryption unit for generating third encryption preliminary data, wherein the first encryption preliminary data the third encryption preliminary data if it matches, outputs the shared key data.

また、本発明は、予め与えられた秘密鍵データ及び公開鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データと前記第1の暗号予備データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと乱数データと前記共有鍵データに変換する共有鍵導出部と、前記検証値検証データを前記公開鍵データと前記乱数データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記第1の暗号予備データと前記第3の暗号予備データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on the secret key data and the public key data given in advance, thereby sharing the shared key data. A first decryption unit that decrypts the first encrypted preliminary data based on the secret key data to generate verification value data, the verification value data, and the first A verification value conversion unit that converts one encryption preliminary data into conversion verification value data based on a predetermined process, and generates the secret number data by decrypting the second encryption preliminary data based on the conversion verification value data A second decryption unit; a shared key derivation unit that converts the secret number data into verification value verification data, random number data, and the shared key data based on a predetermined process; and the verification value verification data as the public key data. And before And a third encryption unit that generates third encrypted preliminary data by encrypting based on random number data, and when the first encrypted preliminary data and the third encrypted preliminary data match, the sharing Output key data.

また、本発明は、予め与えられた秘密鍵データ及び公開鍵データに基づいて、第1の暗号予備データと第2の暗号予備データから構成される暗号化共有鍵データを復号して共有鍵データを出力する共有鍵復元装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データと前記第1の暗号予備データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと乱数データと前記共有鍵データに変換する共有鍵導出部と、前記検証値データを前記公開鍵データと前記乱数データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記第1の暗号予備データと前記第3の暗号予備データが一致する場合に、前記共有鍵データを出力する。   Further, the present invention decrypts the encrypted shared key data composed of the first encrypted preliminary data and the second encrypted preliminary data based on the secret key data and the public key data given in advance, thereby sharing the shared key data. A first decryption unit that decrypts the first encrypted preliminary data based on the secret key data to generate verification value data, the verification value data, and the first A verification value conversion unit that converts one encryption preliminary data into conversion verification value data based on a predetermined process, and generates the secret number data by decrypting the second encryption preliminary data based on the conversion verification value data A second decryption unit; a shared key derivation unit that converts the secret number data into verification value verification data, random number data, and the shared key data based on a predetermined process; and the verification value data as the public key data Turbulence And a third encryption unit that generates third encrypted preliminary data by encrypting based on the data, and the shared key when the first encrypted preliminary data matches the third encrypted preliminary data Output data.

ここで、前記共有鍵導出部は、所定の処理として、一方向性ハッシュ関数を用いるとしてもよい。
ここで、前記第1の復号化部は、NTRU暗号方式により復号化して検証値データを生成するとしてもよい。
ここで、前記検証値変換部は、所定の処理として、一方向性ハッシュ関数を用いるとしてもよい。
Here, the shared key derivation unit may use a one-way hash function as the predetermined process.
Here, the first decryption unit may generate the verification value data by decrypting using the NTRU encryption method.
Here, the verification value conversion unit may use a one-way hash function as the predetermined process.

ここで、前記検証値変換部は、所定の処理として、前記検証値データをそのまま前記変換検証値データとするとしてもよい。
ここで、前記第2の復号化部は、前記第2の暗号予備データと前記変換検証値データの排他的論理和演算を行って前記秘密数データを生成するとしてもよい。
ここで、前記第2の復号化部は、前記第2の暗号予備データを、前記変換検証値データを暗号鍵として用いて共通鍵暗号方式により復号化して前記秘密数データを生成するとしてもよい。
Here, the verification value conversion unit may use the verification value data as it is as the conversion verification value data as a predetermined process.
Here, the second decryption unit may generate the secret number data by performing an exclusive OR operation on the second encryption preliminary data and the conversion verification value data.
Here, the second decryption unit may generate the secret number data by decrypting the second encryption preliminary data by a common key encryption method using the conversion verification value data as an encryption key. .

ここで、前記第2の復号化部は、前記第2の暗号予備データに前記変換検証値データを減算して前記秘密数データを生成するとしてもよい。
ここで、前記第2の暗号化部は、前記第2の暗号予備データを前記変換検証値データで除算して前記秘密数データを生成するとしてもよい。
また、本発明は、予め与えられた公開鍵データに基づいて平文データを暗号化した暗号文データを生成する暗号装置であって、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて検証値データと共有鍵データに変換する共有鍵導出部と、前記検証値データを前記公開鍵データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記秘密数データを前記変換検証値データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部と、前記平文データを前記共有鍵データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記暗号文データは、前記第1の暗号予備データと前記第2の暗号予備データと前記第3の暗号予備データから構成される。
Here, the second decryption unit may generate the secret number data by subtracting the conversion verification value data from the second encrypted preliminary data.
Here, the second encryption unit may generate the secret number data by dividing the second encryption preliminary data by the conversion verification value data.
Further, the present invention is an encryption device that generates ciphertext data obtained by encrypting plaintext data based on public key data given in advance, and includes a secret number data generation unit that generates secret number data, and the secret number A shared key derivation unit that converts data into verification value data and shared key data based on a predetermined process; and a first encryption preliminary data generated by encrypting the verification value data based on the public key data An encryption unit, a verification value conversion unit that converts the verification value data into conversion verification value data based on a predetermined process, and a second encryption by encrypting the secret number data based on the conversion verification value data A second encryption unit that generates preliminary data; and a third encryption unit that generates the third encrypted preliminary data by encrypting the plaintext data based on the shared key data. Said Wherein the first encryption preliminary data and the second encryption preliminary data and a third encryption preliminary data.

また、本発明は、予め与えられた秘密鍵データに基づいて、第1の暗号予備データと第2の暗号予備データと第3の暗号予備データから構成される暗号文データを復号して復号文データを出力する復号装置であって、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して検証値データを生成する第1の復号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと共有鍵データに変換する共有鍵導出部とを備え、前記検証値データと前記検証値検証データが一致する場合に、前記第3の暗号予備データを前記共有鍵データに基づいて復号化して前記復号文データを生成する復号部とを備える。   Further, the present invention decrypts ciphertext data composed of the first cipher spare data, the second cipher spare data, and the third cipher spare data on the basis of pre-given secret key data. A decryption device for outputting data, wherein the first encryption preliminary data is decrypted based on the secret key data to generate verification value data; and the verification value data is subjected to a predetermined process. A verification value conversion unit for converting into converted verification value data based on the above, a second decryption unit for decoding the second encrypted preliminary data based on the converted verification value data and generating secret number data, and A shared key derivation unit that converts secret number data into verification value verification data and shared key data based on a predetermined process, and when the verification value data matches the verification value verification data, Preliminary data before And decoding based on the shared key data and a decoding unit configured to generate the decrypted text data.

また、本発明は、予め与えられた公開鍵データに基づいて平文データを暗号化した暗号文データを生成する暗号装置、及び予め与えられた秘密鍵データに基づいて暗号文データを復号して復号文データを出力する復号装置からなる暗号システムである。前記暗号装置は、秘密数データを生成する秘密数データ生成部と、前記秘密数データを所定の処理に基づいて検証値データと共有鍵データに変換する共有鍵導出部と、前記検証値データを前記公開鍵データに基づいて暗号化して第1の暗号予備データを生成する第1の暗号化部と、前記検証値データを所定の処理に基づいて変換検証値データに変換する検証値変換部と、前記秘密数データを前記変換検証値データに基づいて暗号化して第2の暗号予備データを生成する第2の暗号化部と、前記平文データを前記共有鍵データに基づいて暗号化して第3の暗号予備データを生成する第3の暗号化部とを備え、前記暗号文データは、前記第1の暗号予備データと前記第2の暗号予備データと前記第3の暗号予備データから構成される。前記復号装置は、前記第1の暗号予備データを前記秘密鍵データに基づいて復号化して前記検証値データを生成する第1の復号化部と、前記検証値データを所定の処理に基づいて前記変換検証値データに変換する検証値変換部と、前記第2の暗号予備データを前記変換検証値データに基づいて復号化して前記秘密数データを生成する第2の復号化部と、前記秘密数データを所定の処理に基づいて検証値検証データと共有鍵データに変換する共有鍵導出部とを備え、前記検証値データと前記検証値検証データが一致する場合に、前記第3の暗号予備データを前記共有鍵データに基づいて復号化して前記復号文データを生成する復号部とを備える。   The present invention also provides an encryption device that generates ciphertext data obtained by encrypting plaintext data based on public key data given in advance, and decrypts ciphertext data based on secret key data given in advance. An encryption system including a decryption device that outputs sentence data. The encryption device includes a secret number data generation unit that generates secret number data, a shared key derivation unit that converts the secret number data into verification value data and shared key data based on a predetermined process, and the verification value data. A first encryption unit which generates first encrypted preliminary data by encrypting based on the public key data, and a verification value conversion unit which converts the verification value data into converted verification value data based on a predetermined process; A second encryption unit that encrypts the secret number data based on the conversion verification value data to generate second encrypted preliminary data, and encrypts the plaintext data based on the shared key data. A third encryption unit for generating the encryption preliminary data, and the ciphertext data is composed of the first encryption preliminary data, the second encryption preliminary data, and the third encryption preliminary data . The decryption device includes: a first decryption unit that decrypts the first encryption preliminary data based on the secret key data to generate the verification value data; and the verification value data based on a predetermined process. A verification value conversion unit for converting into converted verification value data, a second decryption unit for generating the secret number data by decoding the second encrypted preliminary data based on the conversion verification value data, and the secret number And a shared key derivation unit that converts data into verification value verification data and shared key data based on a predetermined process, and when the verification value data matches the verification value verification data, the third encryption preliminary data And a decrypting unit that decrypts data based on the shared key data and generates the decrypted text data.

以上に説明したように、本発明は、従来システムにおける問題点を鑑みて行われたもので、暗号システムにおいて、NTRU暗号を適用できる鍵カプセル化メカニズムを構成することで、暗号装置と復号装置との間でNTRU暗号を用いて鍵配送が行えるようになる。
以上により、従来技術では達成できなかった暗号システムを提供することができ、その価値は大きい。
As described above, the present invention has been made in view of the problems in the conventional system. In the encryption system, the encryption device and the decryption device are configured by configuring a key encapsulation mechanism to which the NTRU encryption can be applied. Keys can be distributed using NTRU cryptography.
As described above, it is possible to provide an encryption system that could not be achieved by the prior art, and its value is great.

8.その他の変形例
なお、本発明を上記の実施の形態に基づいて説明してきたが、本発明は、上記の実施の形態に限定されないのはもちろんである。以下のような場合も本発明に含まれる。
(1)暗号装置が、インターネットを介して、各暗号文を復号装置へ送信する代わりに、暗号装置は、各暗号文をDVDなどの記録媒体に書き込み、復号装置は、記録媒体から各暗号文を読み出すとしてもよい。
8). Other Modifications Although the present invention has been described based on the above-described embodiment, it is needless to say that the present invention is not limited to the above-described embodiment. The following cases are also included in the present invention.
(1) Instead of the encryption device transmitting each ciphertext to the decryption device via the Internet, the encryption device writes each ciphertext to a recording medium such as a DVD, and the decryption device reads each ciphertext from the recording medium. May be read out.

(2)本発明で用いるNTRU暗号は、非特許文献2に記載の方式以外に、EESS(Efficient Embedded Security Standard)方式のNTRU暗号であってもよい。EESS方式のNTRU暗号については、“EESS;Consortium for Efficient Embedded Security, Efficient Embedded Security Standards #1:Implementation Aspects of NTRU Encrypt and NTRU Sign, Version 2.0 ," available at http://ceesstandards.org , May 2003.に詳細に記述されている。このため、ここではその詳細については説明を省くが、以下に簡単に説明する。   (2) The NTRU cipher used in the present invention may be an ERU (Efficient Embedded Security Standard) NTRU cipher other than the method described in Non-Patent Document 2. For EESS NTRU ciphers, see "EESS; Consortium for Efficient Embedded Security, Efficient Embedded Security Standards # 1: Implementation Aspects of NTRU Encrypt and NTRU Sign, Version 2.0," available at http://ceesstandards.org, May 2003. Is described in detail. For this reason, a detailed description thereof is omitted here, but a brief description will be given below.

EESS方式のNTRU暗号では、乱数多項式rは、d個の係数が1であり、(N−d)個の係数が0である多項式、もしくはこのような複数の多項式を用いて計算される多項式である。従って、上記の実施の形態において、乱数多項式rを生成する際に、このような多項式となるように生成すれば、NTRU暗号の代わりにEESS方式のNTRU暗号を用いることができ、同様の効果が得られる。   In the EESS NTRU cipher, the random number polynomial r is a polynomial in which d coefficients are 1 and (N−d) coefficients are 0, or a polynomial calculated using such a plurality of polynomials. is there. Therefore, in the above embodiment, when generating the random number polynomial r, if it is generated so as to be such a polynomial, the EESS NTRU cipher can be used instead of the NTRU cipher, and the same effect can be obtained. can get.

(3)コンテンツ配信システムは、次に示すように構成してもよい。
コンテンツ配信システムは、コンテンツサーバ装置と暗号装置と放送装置と受信装置と復号装置と再生装置とモニタとから構成されている。
暗号装置と復号装置とは、コンテンツ配信システム10の暗号装置110と復号装置120とに対応している。
(3) The content distribution system may be configured as follows.
The content distribution system includes a content server device, an encryption device, a broadcast device, a reception device, a decryption device, a playback device, and a monitor.
The encryption device and the decryption device correspond to the encryption device 110 and the decryption device 120 of the content distribution system 10.

コンテンツサーバ装置と暗号装置とは、専用回線を介して接続されており、コンテンツサーバ装置は、映像と音声から構成される映画などのコンテンツを専用回線を介して暗号装置へ送信する。暗号装置と放送装置とは、専用回線を介して接続されている。暗号装置は、各暗号文を放送装置へ送信し、放送装置は、各暗号文を多重化し、デジタル放送波に乗せて放送する。   The content server device and the encryption device are connected via a dedicated line, and the content server device transmits content such as a movie composed of video and audio to the encryption device via the dedicated line. The encryption device and the broadcasting device are connected via a dedicated line. The encryption device transmits each ciphertext to the broadcasting device, and the broadcasting device multiplexes each ciphertext and broadcasts it on a digital broadcast wave.

受信装置と復号装置とは、接続されており、復号装置と再生装置とは、接続されている。受信装置は、デジタル放送波を受信し、受信したデジタル放送波から各暗号文を抽出し、抽出した各暗号文を復号装置へ送信する。復号装置は、各暗号文を受け取り、受け取った各暗号文を用いて、再生コンテンツを生成し、生成した再生コンテンツを再生装置へ出力する。再生装置は、復号装置及びスピーカを内蔵するモニタに接続されている。再生装置は、再生コンテンツを受け取り、受け取った再生コンテンツから映像信号及び音声信号を生成し、モニタは、映像を表示し、音声を出力する。   The receiving device and the decoding device are connected, and the decoding device and the playback device are connected. The receiving device receives the digital broadcast wave, extracts each ciphertext from the received digital broadcast wave, and transmits each extracted ciphertext to the decryption device. The decryption device receives each ciphertext, generates playback content using each received ciphertext, and outputs the generated playback content to the playback device. The playback device is connected to a monitor incorporating a decoding device and a speaker. The playback device receives the playback content, generates a video signal and an audio signal from the received playback content, and the monitor displays the video and outputs audio.

(4)コンテンツサーバ装置と暗号装置とは、一体となった装置から構成されているとしてもよい。また、復号装置と再生装置とは、一体となった装置から構成されているとしてもよい。
(5)上記の各実施の形態において、メモリカード160は、予め公開鍵多項式hを記憶しており、メモリカード170は、予め秘密鍵多項式f及び公開鍵多項式hを記憶しており、暗号装置110及び復号装置120は、メモリカード160及びメモリカード170から、それぞれ公開鍵多項式、秘密鍵多項式を取得するとしているが、これには限定されない。
(4) The content server device and the encryption device may be configured as an integrated device. Further, the decoding device and the playback device may be configured as an integrated device.
(5) In each of the above embodiments, the memory card 160 stores the public key polynomial h in advance, and the memory card 170 stores the secret key polynomial f and the public key polynomial h in advance, and the encryption device 110 and the decryption device 120 acquire the public key polynomial and the secret key polynomial from the memory card 160 and the memory card 170, respectively, but are not limited thereto.

暗号装置110は、予め公開鍵多項式を記憶しており、復号装置120は、予め公開鍵多項式及び秘密鍵多項式を記憶しているとしてもよい。
また、鍵管理装置は、秘密鍵多項式及び公開鍵多項式を生成し、生成した秘密鍵多項式及び公開鍵多項式を秘密にかつ安全に復号装置120へ送信し、生成した公開鍵多項式を暗号装置110へ送信するとしてもよい。
The encryption device 110 may store a public key polynomial in advance, and the decryption device 120 may store a public key polynomial and a secret key polynomial in advance.
Also, the key management device generates a secret key polynomial and a public key polynomial, transmits the generated secret key polynomial and public key polynomial to the decryption device 120 in a secret and secure manner, and sends the generated public key polynomial to the encryption device 110. It may be transmitted.

(6)コンテンツ配信システムにおいて配信されるコンテンツは、映像と音声とからなる映画などのコンテンツには、限定されない。動画像、静止画像、音声、音楽、文書、小説、DBソフトにより生成されるデータベース、表計算ソフトにより生成される電子的な表データ、コンピュータプログラム、その他コンピュータ用データなどあってもよい。
また、前記コンテンツは、上記のような著作物ではなく、暗号化及び復号化、デジタル署名及び署名検証などに用いる鍵情報であるとしてもよい。
(6) The content distributed in the content distribution system is not limited to content such as a movie composed of video and audio. There may be moving images, still images, audio, music, documents, novels, databases generated by DB software, electronic table data generated by spreadsheet software, computer programs, and other computer data.
Further, the content may be key information used for encryption and decryption, digital signature, signature verification, and the like, instead of the above-mentioned copyrighted work.

例えば、上記の各実施の形態により示されるようにして、暗号装置及び復号装置は、共有鍵を共有し、暗号装置は、コンテンツ鍵を共有鍵を用いて暗号化して暗号化コンテンツ鍵を生成し、コンテンツをコンテンツ鍵を用いて暗号化して暗号化コンテンツを生成し、生成した暗号化コンテンツ鍵と生成した暗号化コンテンツとを復号装置に送信する。復号装置は、暗号化コンテンツ鍵と暗号化コンテンツとを受信し、共有鍵を用いて、暗号化コンテンツ鍵を復号してコンテンツ鍵を生成し、生成したコンテンツ鍵を用いて暗号化コンテンツを復号してコンテンツを生成するとしてもよい。   For example, as shown by the above embodiments, the encryption device and the decryption device share a shared key, and the encryption device encrypts the content key using the shared key to generate an encrypted content key. The content is encrypted using the content key to generate encrypted content, and the generated encrypted content key and the generated encrypted content are transmitted to the decryption device. The decryption device receives the encrypted content key and the encrypted content, decrypts the encrypted content key using the shared key, generates a content key, and decrypts the encrypted content using the generated content key Content may be generated.

(7)本発明は、上記に示す方法であるとしてもよい。また、これらの方法をコンピュータにより実現するコンピュータプログラムであるとしてもよいし、前記コンピュータプログラムからなるデジタル信号であるとしてもよい。
また、本発明は、前記コンピュータプログラム又は前記デジタル信号をコンピュータ読み取り可能な記録媒体、例えば、フレキシブルディスク、ハードディスク、CD―ROM、MO、DVD、DVD−ROM、DVD−RAM、BD(Blu−ray Disc)、半導体メモリなど、に記録したものとしてもよい。また、これらの記録媒体に記録されている前記コンピュータプログラム又は前記デジタル信号であるとしてもよい。
(7) The present invention may be the method described above. Further, the present invention may be a computer program that realizes these methods by a computer, or may be a digital signal composed of the computer program.
The present invention also provides a computer-readable recording medium such as a flexible disk, hard disk, CD-ROM, MO, DVD, DVD-ROM, DVD-RAM, BD (Blu-ray Disc). ), Recorded in a semiconductor memory or the like. Further, the present invention may be the computer program or the digital signal recorded on these recording media.

また、本発明は、前記コンピュータプログラム又は前記デジタル信号を、電気通信回線、無線又は有線通信回線、インターネットを代表とするネットワーク、データ放送等を経由して伝送するものとしてもよい。
また、本発明は、マイクロプロセッサとメモリとを備えたコンピュータシステムであって、前記メモリは、上記コンピュータプログラムを記憶しており、前記マイクロプロセッサは、前記コンピュータプログラムに従って動作するとしてもよい。
Further, the present invention may transmit the computer program or the digital signal via an electric communication line, a wireless or wired communication line, a network represented by the Internet, a data broadcast, or the like.
The present invention may be a computer system including a microprocessor and a memory, wherein the memory stores the computer program, and the microprocessor operates according to the computer program.

また、前記プログラム又は前記デジタル信号を前記記録媒体に記録して移送することにより、又は前記プログラム又は前記デジタル信号を前記ネットワーク等を経由して移送することにより、独立した他のコンピュータシステムにより実施するとしてもよい。
(8)上記実施の形態及び上記変形例をそれぞれ組み合わせるとしてもよい。
In addition, the program or the digital signal is recorded on the recording medium and transferred, or the program or the digital signal is transferred via the network or the like, and is executed by another independent computer system. It is good.
(8) The above embodiment and the above modifications may be combined.

上記において説明したコンテンツ配布システムは、コンテンツ供給者から利用者に対して、音楽、映画、小説などのデジタル化された著作物を供給する産業において、経営的、反復的かつ継続的に使用される。また、コンテンツ配布システムを構成する暗号装置及び復号装置は、電化製品などを製造する電機機器産業において、製造され、販売される。
特に、デシタル化された著作物を、DVDなどの記録媒体に格納して市場に流通させることにより、ネットワークを介して流通させることにより、又は放送により、供給する産業において好適である。
The content distribution system described above is used in a management, repetitive, and continuous manner in an industry that supplies digital works such as music, movies, and novels to users from content suppliers. . The encryption device and the decryption device that constitute the content distribution system are manufactured and sold in the electrical equipment industry that manufactures electrical appliances and the like.
In particular, it is suitable in the industry where digitalized works are stored in a recording medium such as a DVD and distributed to the market, distributed via a network, or broadcast.

図1は、コンテンツ配信システム10の構成と、構成要素の間の接続形態とを示す概念図である。FIG. 1 is a conceptual diagram showing a configuration of a content distribution system 10 and a connection form between components. 図2は、暗号装置110の構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of the encryption device 110. 図3は、復号装置120の構成を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration of the decoding device 120. 図4は、暗号装置110及び復号装置120の動作を示す処理系統図である。FIG. 4 is a processing system diagram showing operations of the encryption device 110 and the decryption device 120. 図5は、暗号装置110及び復号装置120の動作を示すフローチャートである。FIG. 5 is a flowchart showing operations of the encryption device 110 and the decryption device 120. 図6は、暗号装置110bの構成を示すブロック図である。FIG. 6 is a block diagram showing the configuration of the encryption device 110b. 図7は、復号装置120bの構成を示すブロック図である。FIG. 7 is a block diagram illustrating a configuration of the decoding device 120b. 図8は、暗号装置110b及び復号装置120bの動作を示す処理系統図である。FIG. 8 is a processing system diagram showing operations of the encryption device 110b and the decryption device 120b. 図9は、暗号装置110cの構成を示すブロック図である。FIG. 9 is a block diagram illustrating a configuration of the encryption device 110c. 図10は、復号装置120cの構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of the decoding device 120c. 図11は、暗号装置110c及び復号装置120cの動作を示す処理系統図である。FIG. 11 is a processing system diagram showing operations of the encryption device 110c and the decryption device 120c. 図12は、暗号装置110c及び復号装置120cの変形例の動作を示す処理系統図である。FIG. 12 is a processing system diagram showing the operation of a modified example of the encryption device 110c and the decryption device 120c. 図13は、暗号装置110dの構成を示すブロック図である。FIG. 13 is a block diagram illustrating a configuration of the encryption device 110d. 図14は、復号装置120dの構成を示すブロック図である。FIG. 14 is a block diagram illustrating a configuration of the decoding device 120d. 図15は、暗号装置110d及び復号装置120dの動作を示すフローチャートである。FIG. 15 is a flowchart showing operations of the encryption device 110d and the decryption device 120d. 図16は、暗号装置110d及び復号装置120dの動作を示す処理系統図である。FIG. 16 is a processing system diagram showing operations of the encryption device 110d and the decryption device 120d. 図17は、暗号装置110eの構成を示すブロック図である。FIG. 17 is a block diagram illustrating a configuration of the encryption device 110e. 図18は、復号装置120eの構成を示すブロック図である。FIG. 18 is a block diagram illustrating a configuration of the decoding device 120e. 図19は、暗号装置110e及び復号装置120eの動作を示す処理系統図である。FIG. 19 is a processing system diagram showing operations of the encryption device 110e and the decryption device 120e. 図20は、暗号装置110e及び復号装置120eの変形例の動作を示す処理系統図である。FIG. 20 is a processing system diagram showing the operation of a modification of the encryption device 110e and the decryption device 120e.

符号の説明Explanation of symbols

10 コンテンツ配信システム
110 暗号装置
111 公開鍵入力部
112 乱数生成部
113 第1関数部
114 暗号化部
117 第1送信部
118 共通鍵暗号部
119 第2送信部
120 復号装置
121 秘密鍵入力部
122 第1受信部
123 復号化部
126 第2関数部
127 比較部
128 共通鍵復号部
129 第2受信部
130 インターネット
140 コンテンツサーバ装置
150 再生装置
155 モニタ
160 メモリカード
170 メモリカード
DESCRIPTION OF SYMBOLS 10 Content delivery system 110 Encryption apparatus 111 Public key input part 112 Random number generation part 113 1st function part 114 Encryption part 117 1st transmission part 118 Common key encryption part 119 2nd transmission part 120 Decryption device 121 Private key input part 122 1st 1 receiving unit 123 decrypting unit 126 second function unit 127 comparing unit 128 common key decrypting unit 129 second receiving unit 130 Internet 140 content server device 150 reproducing device 155 monitor 160 memory card 170 memory card

Claims (51)

第3者に知られることなく共有鍵を生成する共有鍵生成装置及び共有鍵復元装置から構成される鍵共有システムであって、
前記共有鍵生成装置は、
シード値を生成するシード値生成手段と、
生成された前記シード値から検証値及び共有鍵を生成する第1共有鍵生成手段と、
生成された前記検証値を暗号化して、第1暗号化情報を生成する第1暗号化手段と、
生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成する第2暗号化手段と、
生成された前記第1暗号化情報及び前記第2暗号化情報を送信する送信手段とを備え、
前記共有鍵復元装置は、
前記第1暗号化情報及び前記第2暗号化情報を受信する受信手段と、
受信された前記第1暗号化情報を復号して第1復号検証値を生成する第1復号手段と、
生成された前記第1復号検証値に基づいて、受信された前記第2暗号化情報を復号して、復号シード値を生成する第2復号手段と、
前記第1共有鍵生成手段と同一の方法により、生成された前記復号シード値から第2復号検証値及び復号共有鍵を生成する第2共有鍵生成手段と、
生成された前記第1復号検証値及び前記第2復号検証値に基づいて、生成された前記復号共有鍵を出力するか否かを判断する判断手段と、
出力すると判断される場合に、生成された前記復号共有鍵を出力する出力手段とを備える
ことを特徴とする鍵共有システム。
A key sharing system composed of a shared key generating device and a shared key restoring device that generates a shared key without being known to a third party,
The shared key generation device includes:
Seed value generating means for generating a seed value;
First shared key generation means for generating a verification value and a shared key from the generated seed value;
A first encryption means for encrypting the generated verification value to generate first encrypted information;
Second encryption means for encrypting the generated seed value based on the generated verification value to generate second encrypted information;
Transmission means for transmitting the generated first encrypted information and the second encrypted information,
The shared key restoration device includes:
Receiving means for receiving the first encrypted information and the second encrypted information;
First decryption means for decrypting the received first encrypted information to generate a first decryption verification value;
Second decryption means for decrypting the received second encrypted information based on the generated first decryption verification value to generate a decryption seed value;
Second shared key generation means for generating a second decryption verification value and a decryption shared key from the generated decryption seed value by the same method as the first shared key generation means;
Determining means for determining whether to output the generated decryption shared key based on the generated first decryption verification value and the second decryption verification value;
An output means for outputting the generated decryption shared key when it is determined to output the key sharing system.
前記共有鍵生成装置は、さらに、
コンテンツを取得する取得手段と、
生成された前記共有鍵を用いて、取得されたコンテンツを暗号化して、暗号化コンテンツを生成する暗号化手段とを備え、
前記送信手段は、さらに、生成された前記暗号化コンテンツを送信し、
前記受信手段は、さらに、前記暗号化コンテンツを受信し、
前記共有鍵復元装置は、さらに、
出力された前記復号共有鍵を用いて、受信された前記暗号化コンテンツを復号して、復号コンテンツを生成する復号手段と、
生成された復号コンテンツを出力する出力手段とを備える
ことを特徴とする請求項1に記載の鍵共有システム。
The shared key generation device further includes:
Acquisition means for acquiring content;
Encrypting the acquired content using the generated shared key, and generating encrypted content, and
The transmission means further transmits the generated encrypted content,
The receiving means further receives the encrypted content,
The shared key recovery device further includes:
Decryption means for decrypting the received encrypted content using the output decryption shared key to generate decrypted content;
The key sharing system according to claim 1, further comprising output means for outputting the generated decrypted content.
第3者に知られることなく共有鍵を相手の装置へ伝える共有鍵生成装置であって、
シード値を生成するシード値生成手段と、
生成された前記シード値から検証値及び共有鍵を生成する共有鍵生成手段と、
生成された前記検証値を暗号化して、第1暗号化情報を生成する第1暗号化手段と、
生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成する第2暗号化手段と、
生成された前記第1暗号化情報及び前記第2暗号化情報を送信する送信手段と
を備えることを特徴とする共有鍵生成装置。
A shared key generation device that transmits a shared key to a partner device without being known to a third party,
Seed value generating means for generating a seed value;
Shared key generation means for generating a verification value and a shared key from the generated seed value;
A first encryption means for encrypting the generated verification value to generate first encrypted information;
Second encryption means for encrypting the generated seed value based on the generated verification value to generate second encrypted information;
A shared key generation apparatus comprising: transmission means for transmitting the generated first encryption information and the second encryption information.
前記シード値生成手段は、乱数を生成し、生成した乱数を前記シード値とすることにより、前記シード値を生成する
ことを特徴とする請求項3に記載の共有鍵生成装置。
The shared key generation device according to claim 3, wherein the seed value generation unit generates the seed value by generating a random number and using the generated random number as the seed value.
前記共有鍵生成手段は、前記シード値に一方向性関数を施して関数値を生成し、生成した前記関数値から前記検証値及び前記共有鍵を生成する
ことを特徴とする請求項3に記載の共有鍵生成装置。
The shared key generation unit generates a function value by applying a one-way function to the seed value, and generates the verification value and the shared key from the generated function value. Shared key generator.
前記共有鍵生成手段は、前記シード値に、前記一方向性関数として、ハッシュ関数を施して前記関数値を生成する
ことを特徴とする請求項5に記載の共有鍵生成装置。
The shared key generation apparatus according to claim 5, wherein the shared key generation unit generates the function value by applying a hash function to the seed value as the one-way function.
前記共有鍵生成手段は、生成された前記関数値の一部を前記検証値とし、他の一部を前記共有鍵とすることにより、前記検証値及び前記共有鍵を生成する
ことを特徴とする請求項5に記載の共有鍵生成装置。
The shared key generation unit generates the verification value and the shared key by using a part of the generated function value as the verification value and the other part as the shared key. The shared key generation apparatus according to claim 5.
前記共有鍵生成手段は、前記シード値に一方向性関数を施して関数値を生成し、生成した前記関数値から前記検証値、前記共有鍵及びブラインド値を生成する
ことを特徴とする請求項3に記載の共有鍵生成装置。
The shared key generation unit generates a function value by applying a one-way function to the seed value, and generates the verification value, the shared key, and a blind value from the generated function value. 4. The shared key generation device according to 3.
前記第1暗号化手段は、
公開鍵を取得する公開鍵取得部と、
取得された前記公開鍵及び生成された前記ブラインド値を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成する公開鍵暗号化部と含む
ことを特徴とする請求項8に記載の共有鍵生成装置。
The first encryption means includes
A public key acquisition unit for acquiring a public key;
A public key encryption unit that generates a first encryption information by applying a public key encryption algorithm to the verification value using the acquired public key and the generated blind value. The shared key generation device according to claim 8.
前記公開鍵暗号化アルゴリズムは、NTRU暗号方式によるものであり、
前記公開鍵取得部は、前記公開鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された公開鍵多項式を取得し
前記公開鍵暗号化部は、前記検証値から検証値多項式を生成し、前記ブラインド値からブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記検証値多項式を攪乱するために前記ブラインド値多項式を用いて、前記検証値多項式を暗号化して、多項式としての前記第1暗号化情報を生成する
ことを特徴とする請求項9に記載の共有鍵生成装置。
The public key encryption algorithm is based on the NTRU encryption method,
The public key acquisition unit acquires, as the public key, a public key polynomial generated by an NTRU encryption key generation algorithm, the public key encryption unit generates a verification value polynomial from the verification value, and the blind A blind value polynomial is generated from the value, and the verification value polynomial is encrypted by using the public key polynomial as a key and the blind value polynomial to disturb the verification value polynomial by the encryption algorithm of the NTRU cryptosystem. The shared key generation device according to claim 9, wherein the first encryption information as a polynomial is generated.
前記第1暗号化手段は、
公開鍵を取得する公開鍵取得部と、
取得された前記公開鍵を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成する公開鍵暗号化部と含む
ことを特徴とする請求項3に記載の共有鍵生成装置。
The first encryption means includes
A public key acquisition unit for acquiring a public key;
The shared key according to claim 3, further comprising: a public key encryption unit that generates a first encryption information by applying a public key encryption algorithm to the verification value using the acquired public key. Key generator.
前記公開鍵暗号化アルゴリズムは、NTRU暗号方式によるものであり、
前記公開鍵取得部は、前記公開鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された公開鍵多項式を取得し
前記公開鍵暗号化部は、前記検証値から検証値多項式を生成し、ブラインド値を生成し、生成した前記ブラインド値からブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記検証値多項式を攪乱するために前記ブラインド値多項式を用いて、前記検証値多項式を暗号化して、多項式としての前記第1暗号化情報を生成する
ことを特徴とする請求項11に記載の共有鍵生成装置。
The public key encryption algorithm is based on the NTRU encryption method,
The public key acquisition unit acquires, as the public key, a public key polynomial generated by a key generation algorithm of an NTRU cryptosystem, the public key encryption unit generates a verification value polynomial from the verification value, and a blind value A blind value polynomial is generated from the generated blind value, and the public key polynomial is used as a key by the NTRU encryption algorithm, and the blind value polynomial is used to disturb the verification value polynomial. The shared key generation apparatus according to claim 11, wherein the verification value polynomial is encrypted to generate the first encryption information as a polynomial.
前記第2暗号化手段は、前記検証値に一方向性関数を施して関数値を生成し、生成した前記関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成する
ことを特徴とする請求項3に記載の共有鍵生成装置。
The second encryption means generates a function value by applying a one-way function to the verification value, and uses the generated function value to apply an encryption algorithm to the seed value to generate the second encryption information. The shared key generation apparatus according to claim 3, wherein the shared key generation apparatus generates the shared key.
前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして排他的論理和を施すことにより、前記第2暗号化情報を生成する
ことを特徴とする請求項13に記載の共有鍵生成装置。
The second encryption unit generates the second encryption information by performing an exclusive OR as the encryption algorithm on the generated function value and the seed value. 14. The shared key generation device according to 13.
前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして共通鍵暗号化アルゴリズムを施すことにより、前記第2暗号化情報を生成する
ことを特徴とする請求項13に記載の共有鍵生成装置。
The second encryption means generates the second encryption information by applying a common key encryption algorithm as the encryption algorithm to the generated function value and the seed value. Item 14. The shared key generation device according to Item 13.
前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして加算を施すことにより、前記第2暗号化情報を生成する
ことを特徴とする請求項13に記載の共有鍵生成装置。
The said 2nd encryption means produces | generates the said 2nd encryption information by performing addition as the said encryption algorithm with respect to the said generated function value and the said seed value. Shared key generator.
前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして乗算を施すことにより、前記第2暗号化情報を生成する
ことを特徴とする請求項13に記載の共有鍵生成装置。
The second encryption information is generated by multiplying the generated function value and the seed value as the encryption algorithm by generating the second encryption information. Shared key generator.
前記第2暗号化手段は、前記検証値に、前記一方向性関数としてハッシュ関数を施して前記関数値を生成する
ことを特徴とする請求項13に記載の共有鍵生成装置。
The shared key generation apparatus according to claim 13, wherein the second encryption unit generates the function value by applying a hash function as the one-way function to the verification value.
前記第2暗号化手段は、前記検証値を用いて、前記シード値に暗号化アルゴリズムを施して第2暗号化情報を生成する
ことを特徴とする請求項3に記載の共有鍵生成装置。
The shared key generation apparatus according to claim 3, wherein the second encryption unit generates second encryption information by applying an encryption algorithm to the seed value using the verification value.
前記第2暗号化手段は、前記検証値及び前記第1暗号化情報を用いて、前記シード値を暗号化する
ことを特徴とする請求項3に記載の共有鍵生成装置。
The shared key generation device according to claim 3, wherein the second encryption unit encrypts the seed value using the verification value and the first encryption information.
前記第2暗号化手段は、前記検証値及び前記第1暗号化情報に一方向性関数を施して関数値を生成し、生成した前記関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成する
ことを特徴とする請求項20に記載の共有鍵生成装置。
The second encryption means generates a function value by applying a one-way function to the verification value and the first encryption information, and applies an encryption algorithm to the seed value using the generated function value. The shared key generation device according to claim 20, wherein the second encrypted information is generated.
前記第2暗号化手段は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして排他的論理和を施すことにより、前記第2暗号化情報を生成する
ことを特徴とする請求項21に記載の共有鍵生成装置。
The second encryption unit generates the second encryption information by performing an exclusive OR as the encryption algorithm on the generated function value and the seed value. The shared key generation device according to 21.
前記共有鍵生成装置は、さらに、
コンテンツを取得する取得手段と、
生成された前記共有鍵を用いて、取得されたコンテンツを暗号化して、暗号化コンテンツを生成する暗号化手段とを備え、
前記送信手段は、さらに、生成された前記暗号化コンテンツを送信する
ことを特徴とする請求項3に記載の共有鍵生成装置。
The shared key generation device further includes:
Acquisition means for acquiring content;
Encrypting the acquired content using the generated shared key, and generating encrypted content, and
The shared key generation apparatus according to claim 3, wherein the transmission unit further transmits the generated encrypted content.
第3者に知られることなく共有鍵生成装置から共有鍵を受け取る共有鍵復元装置であって、
前記共有鍵生成装置は、シード値を生成し、生成された前記シード値から検証値及び共有鍵を生成し、生成された前記検証値を暗号化して、第1暗号化情報を生成し、生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成し、生成された前記第1暗号化情報及び前記第2暗号化情報を送信し、
前記共有鍵復元装置は、
前記第1暗号化情報及び前記第2暗号化情報を受信する受信手段と、
受信された前記第1暗号化情報を復号して第1復号検証値を生成する第1復号手段と、
生成された前記第1復号検証値に基づいて、受信された前記第2暗号化情報を復号して、復号シード値を生成する第2復号手段と、
前記共有鍵生成装置と同一の方法により、生成された前記復号シード値から第2復号検証値及び復号共有鍵を生成する共有鍵生成手段と、
生成された前記第1復号検証値及び前記第2復号検証値に基づいて、生成された前記復号共有鍵を出力するか否かを判断する判断手段と、
出力すると判断される場合に、生成された前記復号共有鍵を出力する出力手段と
を備えることを特徴とする共有鍵復元装置。
A shared key restoration device that receives a shared key from a shared key generation device without being known to a third party,
The shared key generation device generates a seed value, generates a verification value and a shared key from the generated seed value, encrypts the generated verification value, generates first encrypted information, and generates And encrypting the generated seed value based on the verification value generated to generate second encrypted information, transmitting the generated first encrypted information and the second encrypted information,
The shared key restoration device includes:
Receiving means for receiving the first encrypted information and the second encrypted information;
First decryption means for decrypting the received first encrypted information to generate a first decryption verification value;
Second decryption means for decrypting the received second encrypted information based on the generated first decryption verification value to generate a decryption seed value;
Shared key generation means for generating a second decryption verification value and a decryption shared key from the generated decryption seed value by the same method as the shared key generation device;
Determining means for determining whether to output the generated decryption shared key based on the generated first decryption verification value and the second decryption verification value;
An output unit that outputs the generated decryption shared key when it is determined to output the shared key recovery apparatus.
前記共有鍵生成装置は、公開鍵を取得し、取得された前記公開鍵を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成し、
前記第1復号手段は、
前記公開鍵に対応する秘密鍵を取得する秘密鍵取得部と、
取得された前記秘密鍵を用いて、受信した前記第1暗号化情報に、前記公開鍵暗号化アルゴリズムに対応する公開鍵復号アルゴリズムを施して前記第1復号検証値を生成する公開鍵復号部と含む
ことを特徴とする請求項24に記載の共有鍵復元装置。
The shared key generation device acquires a public key, and uses the acquired public key to generate a first encryption information by applying a public key encryption algorithm to the verification value,
The first decoding means includes
A secret key acquisition unit for acquiring a secret key corresponding to the public key;
A public key decryption unit configured to apply a public key decryption algorithm corresponding to the public key encryption algorithm to the received first encrypted information using the acquired secret key to generate the first decryption verification value; 25. The shared key restoration apparatus according to claim 24, comprising:
前記公開鍵暗号化アルゴリズム及び前記公開鍵復号アルゴリズムは、NTRU暗号方式によるものであり、
前記共有鍵生成装置は、前記公開鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された公開鍵多項式を取得し、前記検証値から検証値多項式を生成し、ブラインド値を生成し、生成した前記ブラインド値からブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記検証値多項式を攪乱するために前記ブラインド値多項式を用いて、前記検証値多項式を暗号化して、多項式としての前記第1暗号化情報を生成し、
前記受信手段は、多項式としての前記第1暗号化情報を受信し、
前記秘密鍵取得部は、前記秘密鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された秘密鍵多項式を取得し、
前記公開鍵復号部は、NTRU暗号方式の前記暗号化アルゴリズムに対応する復号アルゴリズムにより、前記秘密鍵多項式を鍵として用いて、多項式としての前記第1暗号化情報を復号して、復号検証値多項式を生成し、生成した前記復号検証値多項式から前記第1復号検証値を生成する
ことを特徴とする請求項25に記載の共有鍵復元装置。
The public key encryption algorithm and the public key decryption algorithm are based on the NTRU cryptosystem,
The shared key generation device acquires, as the public key, a public key polynomial generated by an NTRU encryption key generation algorithm, generates a verification value polynomial from the verification value, generates a blind value, A blind value polynomial is generated from the blind value, and the public key polynomial is used as a key by an encryption algorithm of the NTRU cryptosystem, the blind value polynomial is used to disturb the verification value polynomial, and the verification value polynomial is Encrypting to generate the first encrypted information as a polynomial;
The receiving means receives the first encrypted information as a polynomial;
The secret key acquisition unit acquires a secret key polynomial generated by a key generation algorithm of the NTRU cryptosystem as the secret key,
The public key decryption unit decrypts the first encrypted information as a polynomial by using the secret key polynomial as a key by a decryption algorithm corresponding to the encryption algorithm of the NTRU cryptosystem, and a decryption verification value polynomial 26. The shared key restoration device according to claim 25, wherein the first decryption verification value is generated from the generated decryption verification value polynomial.
前記共有鍵生成装置は、前記検証値に一方向性関数を施して関数値を生成し、生成した前記関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成し、
前記第2復号手段は、生成された前記第1復号検証値に、前記一方向性関数を施して復号関数値を生成し、生成した前記復号関数値を用いて、受信された前記第2暗号化情報に、前記暗号化アルゴリズムに対応する復号アルゴリズムを施して前記復号シード値を生成する
ことを特徴とする請求項24に記載の共有鍵復元装置。
The shared key generation device generates a function value by applying a one-way function to the verification value, and uses the generated function value to apply an encryption algorithm to the seed value to obtain the second encryption information. Generate
The second decryption means generates the decryption function value by applying the one-way function to the generated first decryption verification value, and uses the generated decryption function value to receive the second cipher 25. The shared key restoration apparatus according to claim 24, wherein the decryption algorithm corresponding to the encryption algorithm is subjected to decryption algorithm to generate the decryption seed value.
前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして排他的論理和を施すことにより、前記第2暗号化情報を生成し、
前記第2復号手段は、生成した前記復号関数値と前記第2暗号化情報とに、前記復号アルゴリズムとして排他的論理和を施すことにより、前記復号シード値を生成する
ことを特徴とする請求項27に記載の共有鍵復元装置。
The shared key generation device generates the second encryption information by performing an exclusive OR as the encryption algorithm on the generated function value and the seed value,
The second decryption unit generates the decryption seed value by performing an exclusive OR as the decryption algorithm on the generated decryption function value and the second encryption information. 27. The shared key recovery device according to 27.
前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして共通鍵暗号化アルゴリズムを施すことにより、前記第2暗号化情報を生成し、
前記第2復号手段は、生成した前記復号関数値と前記第2暗号化情報とに、前記復号アルゴリズムとして、前記共通鍵暗号化アルゴリズムに対応する共通鍵復号アルゴリズムを施すことにより、前記復号シード値を生成する
ことを特徴とする請求項27に記載の共有鍵復元装置。
The shared key generation device generates the second encryption information by applying a common key encryption algorithm as the encryption algorithm to the generated function value and the seed value,
The second decryption unit applies the common key decryption algorithm corresponding to the common key encryption algorithm as the decryption algorithm to the generated decryption function value and the second encryption information, thereby obtaining the decryption seed value. 28. The shared key restoration device according to claim 27, wherein:
前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして加算を施すことにより、前記第2暗号化情報を生成し、
前記第2復号手段は、生成した前記復号関数値と前記第2暗号化情報とに、前記復号アルゴリズムとして、減算を施すことにより、前記復号シード値を生成する
ことを特徴とする請求項27に記載の共有鍵復元装置。
The shared key generation device generates the second encryption information by performing addition as the encryption algorithm to the generated function value and the seed value,
28. The second decryption unit generates the decryption seed value by performing subtraction as the decryption algorithm on the generated decryption function value and the second encryption information. The shared key recovery device described.
前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして乗算を施すことにより、前記第2暗号化情報を生成し、
前記第2復号手段は、生成した前記復号関数値と前記第2暗号化情報とに、前記復号アルゴリズムとして、除算を施すことにより、前記復号シード値を生成する
ことを特徴とする請求項27に記載の共有鍵復元装置。
The shared key generation device generates the second encryption information by multiplying the generated function value and the seed value as the encryption algorithm,
28. The second decryption unit generates the decryption seed value by performing division as the decryption algorithm on the generated decryption function value and the second encryption information. The shared key recovery device described.
前記共有鍵生成装置は、前記検証値に、前記一方向性関数としてハッシュ関数を施して前記関数値を生成し、
前記第2復号手段は、生成された前記第1復号検証値に、前記一方向性関数として前記ハッシュ関数を施して前記復号関数値を生成する
ことを特徴とする請求項27に記載の共有鍵復元装置。
The shared key generation device generates a function value by applying a hash function to the verification value as the one-way function,
28. The shared key according to claim 27, wherein the second decryption unit generates the decryption function value by applying the hash function as the one-way function to the generated first decryption verification value. Restore device.
前記共有鍵生成装置は、前記検証値を用いて、前記シード値に暗号化アルゴリズムを施して第2暗号化情報を生成し、
前記第2復号手段は、生成された前記第1復号検証値を用いて、前記第2暗号化情報に、前記暗号化アルゴリズムに対応する復号アルゴリズムを施して、前記復号シード値を生成する
ことを特徴とする請求項24に記載の共有鍵復元装置。
The shared key generation device generates second encryption information by applying an encryption algorithm to the seed value using the verification value,
The second decryption means applies the decryption algorithm corresponding to the encryption algorithm to the second encryption information using the generated first decryption verification value to generate the decryption seed value. 25. The shared key restoration apparatus according to claim 24, wherein
前記共有鍵生成装置は、前記検証値及び前記第1暗号化情報を用いて、前記シード値を暗号化し、
前記第2復号手段は、生成された前記第1復号検証値及び受信された前記第1暗号化情報を用いて、前記第2暗号化情報を復号して前記復号シード値を生成する
ことを特徴とする請求項24に記載の共有鍵復元装置。
The shared key generation device encrypts the seed value using the verification value and the first encryption information,
The second decryption means decrypts the second encrypted information using the generated first decryption verification value and the received first encrypted information to generate the decryption seed value. The shared key recovery apparatus according to claim 24.
前記共有鍵生成装置は、前記検証値及び前記第1暗号化情報に一方向性関数を施して関数値を生成し、生成した前記関数値を用いて、前記シード値に暗号化アルゴリズムを施して前記第2暗号化情報を生成し、
前記第2復号手段は、前記第1復号検証値及び前記第1暗号化情報に前記一方向性関数を施して復号関数値を生成し、生成した前記復号関数値を用いて、前記第2暗号化情報に、前記暗号化アルゴリズムに対応する復号アルゴリズムを施して、前記復号シード値を生成する
ことを特徴とする請求項34に記載の共有鍵復元装置。
The shared key generation device generates a function value by applying a one-way function to the verification value and the first encryption information, and uses the generated function value to apply an encryption algorithm to the seed value Generating the second encrypted information;
The second decryption means generates a decryption function value by applying the one-way function to the first decryption verification value and the first encryption information, and uses the generated decryption function value to generate the second encryption 35. The shared key restoration apparatus according to claim 34, wherein the decryption algorithm corresponding to the encryption algorithm is subjected to decryption information to generate the decryption seed value.
前記共有鍵生成装置は、生成した前記関数値と前記シード値とに、前記暗号化アルゴリズムとして排他的論理和を施すことにより、前記第2暗号化情報を生成し、
前記第2復号手段は、前記復号関数値及び前記第2暗号化情報に、前記復号アルゴリズムとして、排他的論理和を施すことにより、前記復号シード値を生成する
ことを特徴とする請求項35に記載の共有鍵復元装置。
The shared key generation device generates the second encryption information by performing an exclusive OR as the encryption algorithm on the generated function value and the seed value,
36. The second decryption unit generates the decryption seed value by performing an exclusive OR as the decryption algorithm on the decryption function value and the second encryption information. The shared key recovery device described.
前記共有鍵生成装置は、前記シード値に一方向性関数を施して関数値を生成し、生成した前記関数値から前記検証値及び前記共有鍵を生成し、
前記共有鍵生成手段は、生成された前記復号シード値に、前記一方向性関数を施して復号関数値を生成し、生成した前記復号関数値から前記第2復号検証値及び前記復号共有鍵を生成する
ことを特徴とする請求項24に記載の共有鍵復元装置。
The shared key generation device generates a function value by applying a one-way function to the seed value, generates the verification value and the shared key from the generated function value,
The shared key generation means generates a decryption function value by applying the one-way function to the generated decryption seed value, and generates the second decryption verification value and the decryption shared key from the generated decryption function value. 25. The shared key restoration apparatus according to claim 24, wherein the shared key restoration apparatus is generated.
前記共有鍵生成装置は、前記シード値に、前記一方向性関数として、ハッシュ関数を施して前記関数値を生成し、
前記共有鍵生成手段は、生成された前記復号シード値に、前記一方向性関数として、前記ハッシュ関数を施して前記復号関数値を生成する
ことを特徴とする請求項37に記載の共有鍵復元装置。
The shared key generation device generates a function value by applying a hash function to the seed value as the one-way function,
The shared key restoration unit according to claim 37, wherein the shared key generation unit generates the decryption function value by performing the hash function as the one-way function on the generated decryption seed value. apparatus.
前記共有鍵生成装置は、生成された前記関数値の一部を前記検証値とし、他の一部を前記共有鍵とすることにより、前記検証値及び前記共有鍵を生成し、
前記共有鍵生成手段は、生成された前記復号関数値の一部を前記第2復号検証値とし、他の一部を前記復号共有鍵とすることにより、前記第2復号検証値及び前記復号共有鍵を生成する
ことを特徴とする請求項37に記載の共有鍵復元装置。
The shared key generation device generates the verification value and the shared key by using a part of the generated function value as the verification value and the other part as the shared key,
The shared key generation means uses a part of the generated decryption function value as the second decryption verification value and the other part as the decryption shared key, whereby the second decryption verification value and the decryption shared value 38. The shared key recovery apparatus according to claim 37, wherein the key is generated.
前記共有鍵生成装置は、前記シード値に一方向性関数を施して関数値を生成し、生成した前記関数値から前記検証値、前記共有鍵及びブラインド値を生成し、公開鍵を取得し、取得された前記公開鍵及び生成された前記ブラインド値を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成し、
前記共有鍵生成手段は、生成された前記復号シード値に、前記一方向性関数を施して復号関数値を生成し、生成した前記復号関数値から前記第2復号検証値、前記復号共有鍵及び復号ブラインド値を生成する
ことを特徴とする請求項24に記載の共有鍵復元装置。
The shared key generation device generates a function value by applying a one-way function to the seed value, generates the verification value, the shared key, and a blind value from the generated function value, acquires a public key, Using the acquired public key and the generated blind value, the verification value is subjected to a public key encryption algorithm to generate the first encryption information,
The shared key generation means generates a decryption function value by applying the one-way function to the generated decryption seed value, and generates the second decryption verification value, the decryption shared key, and the generated decryption function value. 25. The shared key restoration apparatus according to claim 24, wherein a decryption blind value is generated.
前記共有鍵生成装置は、公開鍵を取得し、取得された前記公開鍵及び生成された前記ブラインド値を用いて、前記検証値に公開鍵暗号化アルゴリズムを施して前記第1暗号化情報を生成し、
前記判断手段は、前記第1復号検証値及び前記第2復号検証値に基づく前記判断に代えて、
前記公開鍵を取得する公開鍵取得部と、
取得された前記公開鍵及び生成された前記復号ブラインド値を用いて、生成された前記第1復号検証値又は前記第2復号検証値に前記公開鍵暗号化アルゴリズムを施して再暗号化情報を生成する再暗号化部と、
受信された前記第1暗号化情報及び生成された前記再暗号化情報に基づいて、生成された前記復号共有鍵を出力するか否かを判断する判断部とを備える
ことを特徴とする請求項40に記載の共有鍵復元装置。
The shared key generation device acquires a public key, and generates a first encryption information by applying a public key encryption algorithm to the verification value using the acquired public key and the generated blind value And
The determination means, instead of the determination based on the first decryption verification value and the second decryption verification value,
A public key acquisition unit for acquiring the public key;
Using the acquired public key and the generated decryption blind value, generate the re-encrypted information by applying the public key encryption algorithm to the generated first decryption verification value or the second decryption verification value A re-encryption unit to
And a determination unit that determines whether or not to output the generated decryption shared key based on the received first encryption information and the generated re-encryption information. 40. The shared key recovery device according to 40.
前記判断部は、前記第1暗号化情報と前記再暗号化情報とを比較し、前記第1暗号化情報と前記再暗号化情報とが一致する場合に、前記復号共有鍵を出力すると判断する
ことを特徴とする請求項41に記載の共有鍵復元装置。
The determination unit compares the first encrypted information and the re-encrypted information, and determines that the decryption shared key is output when the first encrypted information and the re-encrypted information match. 42. The shared key restoration apparatus according to claim 41, wherein
前記公開鍵暗号化アルゴリズムは、NTRU暗号方式によるものであり、
前記共有鍵生成装置は、前記公開鍵として、NTRU暗号方式の鍵生成アルゴリズムにより生成された公開鍵多項式を取得し、前記検証値から検証値多項式を生成し、前記ブラインド値からブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記検証値多項式を攪乱するために前記ブラインド値多項式を用いて、前記検証値多項式を暗号化して、多項式としての前記第1暗号化情報を生成し、
前記公開鍵取得部は、前記公開鍵多項式を取得し、
前記再暗号化部は、前記第2復号検証値から復号検証値多項式を生成し、前記復号ブラインド値から復号ブラインド値多項式を生成し、NTRU暗号方式の暗号化アルゴリズムにより、前記公開鍵多項式を鍵として用い、前記復号検証値多項式を攪乱するために前記復号ブラインド値多項式を用いて、前記復号検証値多項式を暗号化して、多項式としての前記再暗号化情報を生成する
ことを特徴とする請求項41に記載の共有鍵復元装置。
The public key encryption algorithm is based on the NTRU encryption method,
The shared key generation apparatus acquires, as the public key, a public key polynomial generated by an NTRU encryption key generation algorithm, generates a verification value polynomial from the verification value, and generates a blind value polynomial from the blind value The verification value polynomial is encrypted using the public key polynomial as a key and the blind value polynomial is used to disturb the verification value polynomial by the encryption algorithm of the NTRU cryptosystem, Generating first encrypted information;
The public key acquisition unit acquires the public key polynomial,
The re-encryption unit generates a decryption verification value polynomial from the second decryption verification value, generates a decryption blind value polynomial from the decryption blind value, and uses the public key polynomial as a key by an NTRU encryption algorithm. The decrypted verification value polynomial is encrypted using the decrypted blind value polynomial to disrupt the decrypted verification value polynomial, and the re-encrypted information as a polynomial is generated. 42. A shared key recovery apparatus according to 41.
前記判断手段は、前記第1復号検証値と前記第2復号検証値とを比較し、一致する場合に、前記復号共有鍵を出力すると判断する
ことを特徴とする請求項24に記載の共有鍵復元装置。
25. The shared key according to claim 24, wherein the determination unit compares the first decryption verification value and the second decryption verification value, and determines that the decryption shared key is output if they match. Restore device.
前記共有鍵生成装置は、さらに、コンテンツを取得し、生成された前記共有鍵を用いて、取得されたコンテンツを暗号化して、暗号化コンテンツを生成し、生成された前記暗号化コンテンツを送信し、
前記受信手段は、さらに、前記暗号化コンテンツを受信し、
前記共有鍵復元装置は、さらに、
出力された前記復号共有鍵を用いて、受信された前記暗号化コンテンツを復号して、復号コンテンツを生成する復号手段と、
生成された復号コンテンツを出力する出力手段とを備える
ことを特徴とする請求項24に記載の共有鍵復元装置。
The shared key generation device further acquires content, encrypts the acquired content using the generated shared key, generates encrypted content, and transmits the generated encrypted content ,
The receiving means further receives the encrypted content,
The shared key recovery device further includes:
Decryption means for decrypting the received encrypted content using the output decryption shared key to generate decrypted content;
The shared key restoration apparatus according to claim 24, further comprising: an output unit that outputs the generated decrypted content.
第3者に知られることなく共有鍵を相手の装置へ伝える共有鍵生成装置で用いられる共有鍵生成方法であって、
シード値を生成するシード値生成ステップと、
生成された前記シード値から検証値及び共有鍵を生成する共有鍵生成ステップと、
生成された前記検証値を暗号化して、第1暗号化情報を生成する第1暗号化ステップと、
生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成する第2暗号化ステップと、
生成された前記第1暗号化情報及び前記第2暗号化情報を送信する送信ステップと
を含むことを特徴とする共有鍵生成方法。
A shared key generation method used in a shared key generation device that transmits a shared key to a partner device without being known to a third party,
A seed value generation step for generating a seed value;
A shared key generation step of generating a verification value and a shared key from the generated seed value;
A first encryption step of encrypting the generated verification value to generate first encrypted information;
A second encryption step of encrypting the generated seed value based on the generated verification value to generate second encrypted information;
And a transmission step of transmitting the generated first encryption information and the second encryption information.
第3者に知られることなく共有鍵を相手の装置へ伝える共有鍵生成装置で用いられる共有鍵生成プログラムであって、
シード値を生成するシード値生成ステップと、
生成された前記シード値から検証値及び共有鍵を生成する共有鍵生成ステップと、
生成された前記検証値を暗号化して、第1暗号化情報を生成する第1暗号化ステップと、
生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成する第2暗号化ステップと、
生成された前記第1暗号化情報及び前記第2暗号化情報を送信する送信ステップと
を含むことを特徴とする共有鍵生成プログラム。
A shared key generation program used in a shared key generation device that transmits a shared key to a partner device without being known to a third party,
A seed value generation step for generating a seed value;
A shared key generation step of generating a verification value and a shared key from the generated seed value;
A first encryption step of encrypting the generated verification value to generate first encrypted information;
A second encryption step of generating second encrypted information by encrypting the generated seed value based on the generated verification value;
A shared key generation program, comprising: a transmission step of transmitting the generated first encryption information and the second encryption information.
前記共有鍵生成プログラムは、コンピュータ読み取り可能な記録媒体に記録されている
ことを特徴とする請求項48に記載の共有鍵生成プログラム。
The shared key generation program according to claim 48, wherein the shared key generation program is recorded on a computer-readable recording medium.
第3者に知られることなく共有鍵生成装置から共有鍵を受け取る共有鍵復元装置で用いられる共有鍵復元方法であって、
前記共有鍵生成装置は、シード値を生成し、生成された前記シード値から検証値及び共有鍵を生成し、生成された前記検証値を暗号化して、第1暗号化情報を生成し、生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成し、生成された前記第1暗号化情報及び前記第2暗号化情報を送信し、
前記共有鍵復元方法は、
前記第1暗号化情報及び前記第2暗号化情報を受信する受信ステップと、
受信された前記第1暗号化情報を復号して第1復号検証値を生成する第1復号ステップと、
生成された前記第1復号検証値に基づいて、受信された前記第2暗号化情報を復号して、復号シード値を生成する第2復号ステップと、
前記共有鍵生成装置と同一の方法により、生成された前記復号シード値から第2復号検証値及び復号共有鍵を生成する共有鍵生成ステップと、
生成された前記第1復号検証値及び前記第2復号検証値に基づいて、生成された前記復号共有鍵を出力するか否かを判断する判断ステップと、
出力すると判断される場合に、生成された前記復号共有鍵を出力する出力ステップと
を含むことを特徴とする共有鍵復元方法。
A shared key restoration method used in a shared key restoration device that receives a shared key from a shared key generation device without being known to a third party,
The shared key generation device generates a seed value, generates a verification value and a shared key from the generated seed value, encrypts the generated verification value, generates first encrypted information, and generates And encrypting the generated seed value based on the verification value generated to generate second encrypted information, transmitting the generated first encrypted information and the second encrypted information,
The shared key restoration method includes:
Receiving the first encrypted information and the second encrypted information; and
A first decryption step of decrypting the received first encrypted information to generate a first decryption verification value;
A second decryption step of decrypting the received second encryption information based on the generated first decryption verification value to generate a decryption seed value;
A shared key generation step of generating a second decryption verification value and a decryption shared key from the generated decryption seed value by the same method as the shared key generation device;
A determination step of determining whether to output the generated decryption shared key based on the generated first decryption verification value and the second decryption verification value;
An output step of outputting the generated decryption shared key when it is determined to output the shared key restoration method.
第3者に知られることなく共有鍵生成装置から共有鍵を受け取る共有鍵復元装置で用いられる共有鍵復元プログラムであって、
前記共有鍵生成装置は、シード値を生成し、生成された前記シード値から検証値及び共有鍵を生成し、生成された前記検証値を暗号化して、第1暗号化情報を生成し、生成された前記検証値に基づいて、生成された前記シード値を暗号化して、第2暗号化情報を生成し、生成された前記第1暗号化情報及び前記第2暗号化情報を送信し、
前記共有鍵復元プログラムは、
前記第1暗号化情報及び前記第2暗号化情報を受信する受信ステップと、
受信された前記第1暗号化情報を復号して第1復号検証値を生成する第1復号ステップと、
生成された前記第1復号検証値に基づいて、受信された前記第2暗号化情報を復号して、復号シード値を生成する第2復号ステップと、
前記共有鍵生成装置と同一の方法により、生成された前記復号シード値から第2復号検証値及び復号共有鍵を生成する共有鍵生成ステップと、
生成された前記第1復号検証値及び前記第2復号検証値に基づいて、生成された前記復号共有鍵を出力するか否かを判断する判断ステップと、
出力すると判断される場合に、生成された前記復号共有鍵を出力する出力ステップと
を含むことを特徴とする共有鍵復元プログラム。
A shared key restoration program used in a shared key restoration device that receives a shared key from a shared key generation device without being known to a third party,
The shared key generation device generates a seed value, generates a verification value and a shared key from the generated seed value, encrypts the generated verification value, generates first encrypted information, and generates And encrypting the generated seed value based on the verification value generated to generate second encrypted information, transmitting the generated first encrypted information and the second encrypted information,
The shared key restoration program includes:
Receiving the first encrypted information and the second encrypted information; and
A first decryption step of decrypting the received first encrypted information to generate a first decryption verification value;
A second decryption step of decrypting the received second encryption information based on the generated first decryption verification value to generate a decryption seed value;
A shared key generation step of generating a second decryption verification value and a decryption shared key from the generated decryption seed value by the same method as the shared key generation device;
A determination step of determining whether to output the generated decryption shared key based on the generated first decryption verification value and the second decryption verification value;
An output step of outputting the generated decryption shared key when it is determined to output the shared key restoration program.
前記共有鍵復元プログラムは、コンピュータ読み取り可能な記録媒体に記録されている
ことを特徴とする請求項50に記載の共有鍵復元プログラム。
The shared key restoration program according to claim 50, wherein the shared key restoration program is recorded on a computer-readable recording medium.
JP2003396217A 2002-12-03 2003-11-26 Key sharing system, shared key generating device, and shared key restoring device Expired - Fee Related JP4485175B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003396217A JP4485175B2 (en) 2002-12-03 2003-11-26 Key sharing system, shared key generating device, and shared key restoring device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002351063 2002-12-03
JP2002351062 2002-12-03
JP2003396217A JP4485175B2 (en) 2002-12-03 2003-11-26 Key sharing system, shared key generating device, and shared key restoring device

Publications (2)

Publication Number Publication Date
JP2004201292A JP2004201292A (en) 2004-07-15
JP4485175B2 true JP4485175B2 (en) 2010-06-16

Family

ID=32776797

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003396217A Expired - Fee Related JP4485175B2 (en) 2002-12-03 2003-11-26 Key sharing system, shared key generating device, and shared key restoring device

Country Status (1)

Country Link
JP (1) JP4485175B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6069852B2 (en) * 2011-08-29 2017-02-01 ソニー株式会社 Information processing apparatus, information processing method, and program
EP3474484A1 (en) * 2017-10-17 2019-04-24 Koninklijke Philips N.V. Cryptographic device with updatable shared matrix
JP2021034858A (en) * 2019-08-23 2021-03-01 日本電信電話株式会社 Key exchange system, key exchange device, key exchange method and program
CN120803818B (en) * 2025-09-09 2025-11-18 深圳市乐数科技有限责任公司 IOS backup cipher cracking and data recovery system

Also Published As

Publication number Publication date
JP2004201292A (en) 2004-07-15

Similar Documents

Publication Publication Date Title
KR101027199B1 (en) Key sharing system, shared key generator and shared key restorer
KR102040120B1 (en) Apparatus for processing approximate encripted messages and methods thereof
JP5291795B2 (en) ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, SECURITY METHOD, PROGRAM, AND RECORDING MEDIUM
EP2656537B1 (en) Cryptography module for use with fragmented key and methods for use therewith
US7936874B2 (en) Information transfer system, encryption device, and decryption device
JP5257357B2 (en) Key generation device, encryption device, and decryption device
JP4786531B2 (en) Encryption system, encryption device, decryption device, program, and integrated circuit
WO2001030020A1 (en) Variable length key encrypting system
JPWO2009025220A1 (en) Secret information distribution system, method and program, and transmission system
US7236589B2 (en) Device for point compression for Jacobians of hyperelliptic curves
US20020001383A1 (en) Cryptosystem using multivariable polynomials
JP4422981B2 (en) Cryptographic communication system
CN1745537B (en) Key sharing system, shared key generating device, and shared key restoring device
JP4485175B2 (en) Key sharing system, shared key generating device, and shared key restoring device
US7321658B2 (en) Padding application method ensuring security of cryptosystem and encryptor/decryptor
JP2004201293A (en) Key sharing system, shared key generation device, and shared key recovery device
JP3706398B2 (en) Signature, authentication and secret communication method using elliptic curve
JP2005321719A (en) COMMUNICATION SYSTEM, DECRYPTION DEVICE, RESTORE DEVICE, KEY GENERATION DEVICE, AND COMMUNICATION METHOD
JP3592118B2 (en) Encryption device, encryption communication method, encryption communication system, and recording medium
JP2012227652A (en) Device, method, system, and program for verifying decryption result
JP2004135250A (en) Information processing system and information processing method
JPH11258986A (en) Encryption device, decryption device, encryption system, and program recording medium therefor
JP2004147270A (en) Information processing system and information processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060921

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4485175

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130402

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130402

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140402

Year of fee payment: 4

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350