JP2020052215A - Public key encryption system, public key encryption method, and public key encryption program - Google Patents

Public key encryption system, public key encryption method, and public key encryption program Download PDF

Info

Publication number
JP2020052215A
JP2020052215A JP2018180880A JP2018180880A JP2020052215A JP 2020052215 A JP2020052215 A JP 2020052215A JP 2018180880 A JP2018180880 A JP 2018180880A JP 2018180880 A JP2018180880 A JP 2018180880A JP 2020052215 A JP2020052215 A JP 2020052215A
Authority
JP
Japan
Prior art keywords
random number
public key
number seed
initial value
ciphertext
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018180880A
Other languages
Japanese (ja)
Other versions
JP7023584B2 (en
Inventor
隆 岩野
Takashi Iwano
隆 岩野
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.)
Toshiba Information Systems Japan Corp
Original Assignee
Toshiba Information Systems Japan Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Information Systems Japan Corp filed Critical Toshiba Information Systems Japan Corp
Priority to JP2018180880A priority Critical patent/JP7023584B2/en
Publication of JP2020052215A publication Critical patent/JP2020052215A/en
Application granted granted Critical
Publication of JP7023584B2 publication Critical patent/JP7023584B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To provide a public key encryption system capable of reducing arithmetic costs.SOLUTION: A public key encryption system includes: a transmission device 100 for encrypting plain text with a public key and transmitting cypher text; and a reception device 200 for receiving the transmitted cypher text and decrypting it with a secret key corresponding to the public key to return it to the plain text. The transmission device 100 includes encryption means 102 that performs a Bernoulli shift mapping with the public key to convert plain text to cipher text, and the reception device 200 includes decryption means 202 that performs the Bernoulli shift mapping with the secret key to convert the cypher text to the plain text.SELECTED DRAWING: Figure 1

Description

この発明は、公開鍵暗号システム、公開鍵暗号方法、公開鍵暗号プログラムに関するものである。   The present invention relates to a public key encryption system, a public key encryption method, and a public key encryption program.

従来、公開鍵暗号方式としては、RSA暗号が知られている。このRSA暗号の基本は、冪乗を行って、法(Modulo)を取る演算であり、余りを掛け算していくことで演算精度幅を大きくすることなく剰余を行うなど演算コストを削減する手法や冪乗法が用いられることが知られている。即ち、この特許文献1の発明では、CPUの空き時間をRSA暗号では、法を取る計算において剰余算が必須であり、割り算を行うために演算コストがかかってしまう。   Conventionally, RSA encryption has been known as a public key encryption method. The basics of the RSA cryptosystem are operations that take powers and take modulo. A method of multiplying the remainder to reduce the operation cost such as performing the remainder without increasing the operation accuracy width, It is known that the power method is used. That is, in the invention of Patent Document 1, in the RSA encryption of the idle time of the CPU, the remainder calculation is indispensable in the calculation that modulates, and the calculation cost is required to perform the division.

上記のRSA(Rivest−Shamir−Adleman)暗号処理を採用したものは、特許文献1に紹介されている。この特許文献1には、RSA暗号では、演算負荷が大きく、処理能力の低い組み込み機器のCPUでは、CPUを占有する時間が長くなるといった問題が指摘され、これを解決するために、CPUの空き時間をできる限り少なくなるように、非均等に分割し、短時間でRSA暗号処理を完了させることが開示されている。   Japanese Patent Application Laid-Open Publication No. HEI 10-163566 discloses an apparatus employing the above-described RSA (Rivest-Shamir-Adleman) encryption processing. Patent Document 1 points out that the RSA encryption has a large computational load, and a CPU of an embedded device having a low processing capability requires a long time to occupy the CPU. It is disclosed that the time is divided as unequally as possible so that the RSA encryption processing is completed in a short time.

また、RSA暗号の弱点としては、決まりきった平文として“Yes”か“No”のみにより構成される場合、同じ平文を同じ公開鍵で暗号化するために行い続けると暗号文が限られるため平文が見破られるといった問題がある。これを解決するために平文に乱数を付加して毎回の暗号文を見かけ上変更して送信する手法が取り入られている。しかしながら、この手法では、受信者が復号してから乱数部分を取り除くといった手間が必要であること、また乱数の付加によって平文のサイズが増加するという問題がある。そして、このような乱数を付加する形態では、仮に公開鍵暗号の秘密鍵が第三者に知られてしまった場合には、復号後に乱数部分を取り除くことで平文が特定されてしまう欠点がある。   Further, the weak point of the RSA encryption is that if the plaintext is composed of only “Yes” or “No” as a definite plaintext, and if the same plaintext is continuously encrypted with the same public key, the ciphertext is limited, the plaintext is limited. There is a problem that can be found. In order to solve this, a method of adding a random number to the plaintext, apparently changing the encrypted text every time, and transmitting the encrypted text is adopted. However, in this method, there is a problem that the receiver needs to remove the random number part after decryption, and the size of the plain text increases due to the addition of the random number. Then, in such a form in which a random number is added, if the private key of the public key cryptosystem is known to a third party, there is a disadvantage that the plain text is specified by removing the random number part after decryption. .

また、特許文献2には、共有鍵を安全に共有することが可能な暗号化方式が開示されている。この特許文献2においては、一時鍵発生手段22が乱数である一時鍵riを発生し、この一時鍵riを暗号化手段14が第1初期鍵ki1を用いて暗号化し暗号文ci1を得て、送信手段20が暗号文ci1を受信装置50に送信する。上記暗号化手段14は、上記一時鍵riを第2初期鍵ki2により暗号化し、共有鍵ksを得る。一方、受信装置50は、暗号文ci1を受信し、復号化手段56に供給し、復号化手段56は、暗号文ci1を復号化して、元の一時鍵riを得る。暗号化手段54が第2初期鍵ki2を用いてこの一時鍵riを暗号化することによって、送信装置10側と同様に受信装置50側でも共有鍵ksを得ることができる。以降、この共有鍵ksを用いて秘密の通信を行うというものである。   Patent Document 2 discloses an encryption method capable of safely sharing a shared key. In this Patent Document 2, the temporary key generation means 22 generates a temporary key ri which is a random number, and the encryption means 14 encrypts the temporary key ri using the first initial key ki1 to obtain a ciphertext ci1. The transmitting unit 20 transmits the ciphertext ci1 to the receiving device 50. The encryption means 14 encrypts the temporary key ri with the second initial key ki2 to obtain a shared key ks. On the other hand, the receiving device 50 receives the cipher text ci1 and supplies it to the decrypting means 56. The decrypting means 56 decrypts the cipher text ci1 to obtain the original temporary key ri. The encryption unit 54 encrypts the temporary key ri using the second initial key ki2, so that the shared key ks can be obtained on the receiving device 50 side as well as on the transmitting device 10 side. Thereafter, secret communication is performed using the shared key ks.

特許文献3には、情報を暗号化して伝送するのに好適な暗号通信システムが開示されている。この特許文献3のものは、暗号通信システム101の送信装置131と受信装置151とは、それぞれ秘密鍵と公開鍵を生成するとともに、現在時刻をもとに乱数を生成し、この乱数を用いてセッション鍵を作り、RSA暗号の技術を用いてセッション鍵を共有するものである。共有されたセッション鍵は、乱数の暗号化にも用いられ、暗号化された乱数を復号したときに元の乱数と一致することによって、セッション鍵を認証する。認証されたセッション鍵により伝送すべき情報をベクトルストリーム暗号によって暗号化し伝送することで、通信の秘密を保つことができる。   Patent Document 3 discloses an encryption communication system suitable for encrypting and transmitting information. According to Patent Document 3, the transmitting device 131 and the receiving device 151 of the cryptographic communication system 101 generate a secret key and a public key, respectively, generate a random number based on the current time, and use the random number. A session key is created, and the session key is shared using RSA encryption technology. The shared session key is also used for encrypting the random number, and authenticates the session key by matching the original random number when the encrypted random number is decrypted. By encrypting the information to be transmitted with the authenticated session key using the vector stream encryption and transmitting the encrypted information, communication confidentiality can be maintained.

特許文献4には、高速演算が可能な新規なカオス的時系列を探索し、このカオス的時系列を用いてカオス発生装置やカオス暗号装置などを実現することが開示されている。具体的には、このカオス発生装置は、変数nの増加に従って急激に増加する関数fi(n)[i=1〜L、L≧1]に対し素数mi[i=1〜L、L≧1]を設定する手段、変数nの初期値n0に対してfi(n0)から素数miを法として剰余ri(n0)[i=1〜L、L≧1]を導出する初期値演算手段、fi(n+1)の計算では剰余ri(n)を利用して素数miを法として導出された剰余ri(n+1)を導出する反復演算手段、変数nをn0から順次増大させながら前記剰余ri(n)[i=1〜L、L≧1]を通して生成される一意の値を有するカオス的時系列Xnを出力するカオス信号出力手段により構成される。   Patent Literature 4 discloses that a new chaotic time series capable of high-speed operation is searched for, and a chaos generator or a chaos encryption device is realized using the chaotic time series. More specifically, this chaos generating device has a prime mi [i = 1 to L, L ≧ 1] for a function fi (n) [i = 1 to L, L ≧ 1] that rapidly increases as the variable n increases. ]; Initial value computing means for deriving a remainder ri (n0) [i = 1 to L, L ≧ 1] from fi (n0) with respect to an initial value n0 of a variable n by using a prime mi as a modulus; fi In the calculation of (n + 1), it is an iterative operation means for deriving a remainder ri (n + 1) derived modulo the prime number mi using the remainder ri (n), and while increasing the variable n sequentially from n0, the remainder ri (n) The chaotic signal output unit outputs a chaotic time series Xn having a unique value generated through [i = 1 to L, L ≧ 1].

更に、特許文献5には、R/Wから乱数生成の初期値を暗号フレームに包含/送付し、乱数種を暗号フレーム毎に変化させることで、RFIDの利便性を確保しつつ、暗号解読を困難にする暗号化方法が開示されている。この特許文献5の発明では、リーダ/ライタが、下り暗号フレームの送信の前に、前回送信した下り暗号フレームに包含した付与データを格納する第1の付与データ格納手段の格納値を元に乱数種を生成し、乱数種を初期値として第1の乱数生成手段にて生成する乱数データを元に暗号化/復号化を行うものである。一方、タグでは、下り暗号フレームの受信の前に、前回受信した下り暗号フレームに包含する付与データを格納する第2の付与データ格納手段の格納値を元に乱数種を生成し、乱数種を初期値として第2の乱数生成手段にて生成する乱数データを元に復号化/暗号化を行うものである。   Further, Patent Literature 5 discloses that an initial value of random number generation is included / sent from an R / W in an encryption frame, and the random number seed is changed for each encryption frame, thereby ensuring the convenience of RFID while ensuring decryption. An encryption method that makes it difficult is disclosed. According to the invention of Patent Document 5, before the transmission of the downlink encrypted frame, the reader / writer uses the random number based on the value stored in the first additional data storage unit that stores the additional data included in the previously transmitted downlink encrypted frame. A seed is generated, and encryption / decryption is performed based on random number data generated by a first random number generation unit using the random number seed as an initial value. On the other hand, in the tag, before receiving the downlink encrypted frame, a random number seed is generated based on the value stored in the second additional data storage unit that stores the additional data included in the previously received downlink encrypted frame, and the random number seed is generated. The decryption / encryption is performed based on random number data generated by the second random number generation means as an initial value.

特開2011−75611号公報JP 2011-75611 A 特開2006−254417号公報JP 2006-254417 A 特開2006−67412号公報JP 2006-67412 A 特開2005−17612号公報JP 2005-17612 A 特開2009−10597号公報JP 2009-10597 A

上記の従来の暗号化の手法によると、秘匿性の観点からのものが多く、処理の過程に含まれる割算など演算コストが高い処理の低減につながるようなものではなかった。本実施形態では、演算コストの低減を図ることが可能な公開鍵暗号システム、公開鍵暗号方法、公開鍵暗号プログラムを提供する。   According to the above-described conventional encryption methods, many methods are used from the viewpoint of confidentiality, and do not lead to a reduction in processing having a high operation cost such as division included in the processing process. In the present embodiment, a public key encryption system, a public key encryption method, and a public key encryption program capable of reducing the operation cost are provided.

実施形態に係る公開鍵暗号システムは、公開鍵を用いて平文を暗号化し暗号文を送る送信装置と、送信された暗号文を受信し、前記公開鍵に対応する秘密鍵を用いて復号し平文へ戻す受信装置とを備える公開鍵暗号システムにおいて、前記送信装置は、前記公開鍵を用いてベルヌーイシフト写像を実行して平文を暗号文へ変換する暗号化手段を備えており、前記受信装置は、前記秘密鍵を用いてベルヌーイシフト写像を実行して暗号文を平文へ変換する復号手段を備えていることを特徴とする。   A public key cryptosystem according to an embodiment includes a transmitting device that encrypts a plaintext using a public key and sends the ciphertext, receives the transmitted ciphertext, and decrypts the plaintext using a secret key corresponding to the public key. And a receiving device that returns to the public key cryptosystem, the transmitting device includes an encryption unit that performs a Bernoulli shift mapping using the public key to convert a plaintext into a ciphertext, and the receiving device includes: And decrypting means for executing a Bernoulli shift mapping using the secret key to convert a ciphertext into a plaintext.

本発明に係る公開鍵暗号システムの第1の実施形態の構成を示すブロック図。FIG. 1 is a block diagram showing a configuration of a first embodiment of a public key cryptosystem according to the present invention. 本発明に係る公開鍵暗号システムの第2の実施形態の構成を示すブロック図。FIG. 2 is a block diagram showing a configuration of a second embodiment of the public key cryptosystem according to the present invention. 本発明に係る公開鍵暗号システムの第3の実施形態の構成を示すブロック図。FIG. 9 is a block diagram showing a configuration of a third embodiment of the public key cryptosystem according to the present invention. 本発明に係る公開鍵暗号システムの第4の実施形態の構成を示すブロック図。FIG. 11 is a block diagram showing a configuration of a fourth embodiment of the public key cryptosystem according to the present invention. 本発明に係る公開鍵暗号システムの第5の実施形態の構成を示すブロック図。FIG. 13 is a block diagram showing a configuration of a fifth embodiment of the public key cryptosystem according to the present invention. 本発明に係る公開鍵暗号システムの実施形態において用いるベルヌーイシフト写像のマップを示す図。FIG. 3 is a diagram showing a map of Bernoulli shift mapping used in the embodiment of the public key cryptosystem according to the present invention. 本発明に係る公開鍵暗号システムの実施形態において用いるベルヌーイシフト写像の結果の時系列を示す図。FIG. 9 is a diagram showing a time series of a result of Bernoulli shift mapping used in the embodiment of the public key cryptosystem according to the present invention. 傾き係数A=2の時のベルヌーイシフト写像と合同算術の時系列を示す図。The figure which shows the time series of the Bernoulli shift mapping and joint arithmetic at the time of the inclination coefficient A = 2. 傾き係数A=5のベルヌーイシフト写像マップを示す図。The figure which shows the Bernoulli shift map of inclination coefficient A = 5. 係数A=5の時のベルヌーイシフト写像と合同算術の時系列を示す図。The figure which shows the time series of the Bernoulli shift mapping and joint arithmetic at the time of coefficient A = 5. ベルヌーイシフト写像と合同算術のC言語によるソースコードを示す図。The figure which shows the source code in C language of Bernoulli shift map and joint arithmetic. 図7のベルヌーイシフト写像と合同算術による演算結果を示す図。FIG. 8 is a diagram showing a calculation result by Bernoulli shift mapping and joint arithmetic in FIG. 7. 一次元不定方程式の整数解によって秘密鍵SKとなる“x”と“y”を求める過程を示す図。The figure which shows the process which calculates | requires "x" and "y" used as the secret key SK by the integer solution of a one-dimensional indefinite equation. 本発明に係る公開鍵暗号システムの第1の実施形態の動作を示すフローチャート。4 is a flowchart showing the operation of the first embodiment of the public key cryptosystem according to the present invention. ベルヌーイシフト写像による平文3通りの暗号化の結果)と復号の結果を示す図。FIG. 9 is a diagram showing a result of three types of plaintext encryption by Bernoulli shift mapping) and a result of decryption. ベルヌーイシフト写像による公開鍵暗号の暗号化・復号イメージを示す図。The figure which shows the encryption / decryption image of public key encryption by Bernoulli shift mapping. 本発明に係る公開鍵暗号システムの第3の実施形態の動作を示すフローチャート。9 is a flowchart showing an operation of the third embodiment of the public key cryptosystem according to the present invention. 本発明に係る公開鍵暗号システムの第4の実施形態の動作を示すフローチャート。13 is a flowchart showing the operation of the fourth embodiment of the public key cryptosystem according to the present invention. ベルヌーイシフト写像の初期値X0を変更したときのXi X i when the initial value X 0 of the Bernoulli shift map is changed 本発明に係る公開鍵暗号システムの第5の実施形態の動作を示すフローチャート。14 is a flowchart showing the operation of the fifth embodiment of the public key cryptosystem according to the present invention.

以下添付図面を参照して、本発明に係る公開鍵暗号システム、公開鍵暗号方法、公開鍵暗号プログラムの実施形態を説明する。   An embodiment of a public key encryption system, a public key encryption method, and a public key encryption program according to the present invention will be described below with reference to the accompanying drawings.

本発明の実施形態として、公開鍵を元に暗号化を行い、秘密鍵を保有している受信装置により復号を行うベルヌーイシフト写像による公開鍵暗号の演算を用い、安全で演算コストが低い公開鍵暗号システムを提案する。従来の代表的な公開鍵暗号の一つとして、RSA暗号が知られている。RSA暗号で用いられている数理は、フェルマーの小定理を素数以外の数値に適用できるように拡張したオイラーの定理に基づくものである。   As an embodiment of the present invention, a public key is encrypted based on a public key, and a public key cryptography operation by Bernoulli shift mapping is performed by a receiving device having a secret key to perform decryption. We propose a cryptographic system. RSA encryption is known as one of the conventional representative public key encryption. The mathematics used in the RSA cryptography is based on Euler's theorem which extends Fermat's small theorem so that it can be applied to numerical values other than prime numbers.

本願発明者は、一次元写像として知られるベルヌーイシフト写像を整数演算化し、傾きを一律に変更して反復する値を追跡すると合同算術の定理で知られるフェルマーの小定理と同期することを発見した。この点に着目するとオイラーの定理もベルヌーイシフト写像の反復周期と同期するため、RSA暗号の合同算術による演算をベルヌーイシフト写像による公開鍵暗号として適応可能である。   The inventor of the present application has found that a Bernoulli shift map known as a one-dimensional map is converted to an integer operation, and that when a slope is uniformly changed and a repeated value is tracked, it is synchronized with Fermat's small theorem known as a joint arithmetic theorem. . Focusing on this point, Euler's theorem also synchronizes with the repetition period of the Bernoulli shift mapping, so that the operation by the joint arithmetic of the RSA encryption can be applied as the public key encryption by the Bernoulli shift mapping.

RSA暗号は、法演算(modulo)である合同算術を基本としており、この合同算術には割り算が必須である。これに対し、本発明の実施形態に係るベルヌーイシフト写像による公開鍵暗号アルゴリズムでは割り算を行わず、引き算を1回のみ行えば良いため、合同算術を用いるものと比較して演算コストを削減できる。また、RSA暗号の弱点としては、決まり切った平文が“Yes”か“No”のみにより構成される場合、同じ平文を同じ公開鍵で暗号化を行うと暗号文が限定されるため、平文が見破られやすいといった問題があることは前述したことである。これを解決するため、平文に乱数を付加して送信する手法があるが、受信側の手間が増加することについても述べた。   The RSA encryption is based on joint arithmetic, which is a modulo operation, and division is essential for this joint arithmetic. On the other hand, in the public key encryption algorithm based on the Bernoulli shift mapping according to the embodiment of the present invention, the division is not performed and the subtraction needs to be performed only once, so that the operation cost can be reduced as compared with the one using the joint arithmetic. Further, as a weak point of the RSA encryption, when a definite plain text is composed of only “Yes” or “No”, if the same plain text is encrypted with the same public key, the cipher text is limited. As mentioned above, there is a problem of being easily detected. In order to solve this, there is a method of adding a random number to the plaintext and transmitting it. However, it also mentioned that the work on the receiving side increases.

上記に対し本実施形態に係るベルヌーイシフト写像よる公開鍵暗号の演算では、初期値X0を変更できる自由度を有する。即ち、初期値X0を初期ベクターとして変更することで、同じ平文を同じ公開鍵で暗号化しても暗号文のパターンが毎回変動されるので、同じ平文を使用していることが第三者に悟られ難くなることが期待できる。 On the other hand, in the operation of the public key cryptography based on the Bernoulli shift mapping according to the present embodiment, the initial value X 0 has a degree of freedom to be changed. In other words, by changing the initial value X 0 as an initial vector, even if the same plaintext is encrypted with the same public key, the pattern of the ciphertext changes every time, so that the third party is not allowed to use the same plaintext. It can be expected that it will be difficult to realize.

公開鍵暗号方式は、共通鍵暗号方式の鍵の配送の問題から共通鍵を通信相手に渡す際に公開鍵暗号を利用するハイブリット型暗号として用いられているが、同じ共通鍵を使い回し続ける場合は同じ暗号文が出力されるため安全性が小さくなる。実施形態に係るベルヌーイシフト写像を用いた公開鍵暗号システムでは、初期値X0を乱数で毎回変更することで毎回異なる暗号文が生成できる構成が採れるため同じ鍵を使用していることが第三者にわからなくなり安全性を高めることが期待できる。このため、同じパスコードを使い回す用途にも好適となる鍵交換方法となる。本実施形態の暗号の安全性は、RSA暗号と同様に大きな桁の素数同士の掛け算の合成数は、素因数分解に莫大な計算量がかかることを根拠とする。 Public key cryptography is used as a hybrid type cryptography that uses public key cryptography when passing a common key to a communication partner due to the problem of key distribution in common key cryptography, but when the same common key is repeatedly used Output the same ciphertext, which reduces security. The public key cryptosystem using the Bernoulli shift mapping according to the embodiment employs a configuration in which a different ciphertext can be generated each time by changing the initial value X 0 with a random number every time. It can be expected that the safety will be improved because the people will not understand. For this reason, the key exchange method is also suitable for applications where the same passcode is reused. The security of the encryption according to the present embodiment is based on the fact that, as in the case of the RSA encryption, the composite number obtained by multiplying prime numbers of large digits requires an enormous amount of calculation for the factorization of the prime numbers.

次に、図を用いて実施形態を説明する。各図において、同一の構成要素には同一の符号を付して重複する説明を省略する。第1の実施形態に係る公開鍵暗号システムは図1に示すように、送信装置100と受信装置200とを備えて構成される。   Next, an embodiment will be described with reference to the drawings. In the respective drawings, the same components are denoted by the same reference numerals, and redundant description will be omitted. As shown in FIG. 1, the public key encryption system according to the first embodiment includes a transmitting device 100 and a receiving device 200.

送信装置100と受信装置200とは、コンピュータ機能と通信機能を備える装置であるならば、特に限定されず、パーソナルコンピュータやワークステーション、スマートフォン、PDA(パーソナルディジタルアシスタント)などによって構成することができる。送信装置100は、公開鍵を用いて平文を暗号化し暗号文を送るものであり、送信のための送信手段101を備えている。受信装置200は、送信された暗号文を受信し、上記公開鍵に対応する秘密鍵を用いて復号し平文へ戻すものであり、受信のための受信手段201を備えている。   The transmitting device 100 and the receiving device 200 are not particularly limited as long as they have a computer function and a communication function, and can be configured by a personal computer, a workstation, a smartphone, a PDA (personal digital assistant), or the like. The transmitting apparatus 100 encrypts a plaintext using a public key and transmits the encrypted text, and includes a transmitting unit 101 for transmission. The receiving apparatus 200 receives the transmitted ciphertext, decrypts the ciphertext using the secret key corresponding to the public key, and returns the plaintext to the plaintext. The receiving apparatus 200 includes a receiving unit 201 for reception.

送信装置100と受信装置200とは、有線または無線の伝送路300により接続されている。送信装置100は、暗号化手段102を備えている。暗号化手段102は、上記公開鍵を用いてベルヌーイシフト写像を実行して平文を暗号文へ変換するものである。受信装置200は、復号手段202を備えている。復号手段202は、上記秘密鍵を用いてベルヌーイシフト写像を実行して暗号文を平文へ変換するものである。   The transmitting device 100 and the receiving device 200 are connected by a wired or wireless transmission path 300. The transmission device 100 includes an encryption unit 102. The encrypting means 102 converts a plaintext into a ciphertext by executing Bernoulli shift mapping using the public key. The receiving device 200 includes a decoding unit 202. The decryption means 202 converts the ciphertext into plaintext by executing Bernoulli shift mapping using the secret key.

受信装置200には、上記公開鍵を生成する公開鍵生成手段203と上記秘密鍵を生成する秘密鍵生成手段204が備えられている。上記図1の構成を備える本実施形態の公開鍵暗号システムは、基本的にベルヌーイシフト写像を用いるものであるから、ベルヌーイシフト写像の説明から始める。   The receiving device 200 includes a public key generation unit 203 for generating the public key and a secret key generation unit 204 for generating the secret key. Since the public key encryption system of the present embodiment having the configuration shown in FIG. 1 basically uses a Bernoulli shift mapping, the description starts with the Bernoulli shift mapping.

○ベルヌーイシフト写像について
ベルヌーイシフト写像は以下の式(1)で定義される。

Figure 2020052215
ベルヌーイシフト写像のマップを図2に示し、式(1)による横軸をi、縦軸をxi+1とした時系列を図3に示す。 About Bernoulli shift mapping Bernoulli shift mapping is defined by the following equation (1).
Figure 2020052215
FIG. 2 shows a map of Bernoulli shift mapping, and FIG. 3 shows a time series in which the horizontal axis according to equation (1) is i and the vertical axis is x i + 1 .

図3では、初期値x0=0.234とし、“x0<0.5”であるため、“x1=2x0”の演算を行い、x1=0.468が得られる。x1については、“x1<0.5” であるため、“x2=2x1”の演算を行い、x2=0.936が得られ、以降“x3,x4,…”と開区間(0,1)を反復し遷移してゆく。 In FIG. 3, since the initial value x 0 = 0.234 and “x 0 <0.5”, the calculation “x 1 = 2x 0 ” is performed, and x 1 = 0.468 is obtained. For x 1 are the "x 1 <0.5", performs an operation of "x 2 = 2x 1", x 2 = 0.936 is obtained, since "x 3, x 4, ... " and The open section (0, 1) is repeated to make a transition.

次に、ベルヌーイシフト写像と合同算術との同期について説明する。初等整数論の合同算術における重要な定理として、フェルマーの小定理が知られている。Pを素数とし、AをPの倍数でない整数(AとPは互いに素[最大公約数が1]、つまりPが素数であればよい)とするとき、以下の式が成り立つことが知られている。

Figure 2020052215
Next, the synchronization between the Bernoulli shift mapping and the joint arithmetic will be described. Fermat's little theorem is known as an important theorem in the joint arithmetic of elementary number theory. When P is a prime number and A is an integer that is not a multiple of P (A and P are mutually prime [the greatest common divisor is 1], that is, P is a prime number), it is known that the following equation holds. I have.
Figure 2020052215

例えば,211≡2(mod11)の場合211=2048に対して,素数11で割る演算を行うと、余りが2となることを示し、11の法(modulo)をとった剰余は2であることを表す式である。また、“P−1”を乗数とした(両辺をAで割る)場合には、以下式(2)のように余りが1となる。

Figure 2020052215
For example, in the case of 2 11 ≡2 (mod 11 ), if 2 11 = 2048 is divided by a prime number 11 to perform an operation, it indicates that the remainder is 2, and the remainder obtained by taking the modulus of 11 is 2 It is an expression indicating that there is. When “P−1” is a multiplier (both sides are divided by A), the remainder is 1 as in the following equation (2).
Figure 2020052215

ここで、式(1)の初期値x0に“1/11”を設定し、反復演算したxiの値と、式(2)に“A=2”を設定し、法として素数P=11を設定し、左辺の指数Pを0〜11に振った余りの値は、図4に示すようになる。ここで、式(2)について指数が大きくなるほど桁が莫大になるため、合同算術では法(modulo)をとることで、ある値Q同士を掛け算した結果の余りにもう一回ある値Qを掛け算して、余りを出すと元の掛け算(Q3)の余りに等しくなるといった性質があり、桁を抑えて演算できるため、このテクニックを使って計算している。 Here, “1/11” is set as the initial value x 0 of the equation (1), “ i = 2” is set in the equation (2), and the value of the repeated x i is set as a modulus P = 11 is set, and the remainder after the index P on the left side is changed from 0 to 11 is as shown in FIG. Here, the larger the exponent in equation (2), the greater the number of digits. Therefore, in the joint arithmetic, modulo is used to multiply the value Q by another value once more. Therefore, when the remainder is taken out, it has the property that it becomes equal to the remainder of the original multiplication (Q 3 ), and the calculation can be performed with a reduced number of digits. Therefore, the calculation is performed using this technique.

図4(A)に示すように、ベルヌーイシフト写像は分数で計算を行っており、この計算におけるXiの分子の数値が、図4(B)の合同算術による余りの数値と同じになっており、同期していることが判る。これは、割り切れない数は仮分数(2i/11)が、例えばi=6のとき、64/11=55/11+9/11=5+9/11となり、帯分数は11の倍数として、5が括りだされ、真分数(9/11)における分子の値“9”は11の割り算の余りとしても示されるからである。以上の図4から、x10の時点で1/11とX0に戻り、ベルヌーイシフト写像は周期長10で繰り返されることが判る。 As shown in FIG. 4A, the Bernoulli shift map is calculated by a fraction, and the numerical value of the numerator of X i in this calculation becomes the same as the surplus numerical value by the joint arithmetic in FIG. 4B. And that they are synchronized. This is because the indivisible number is a provisional fraction (2 i / 11), for example, when i = 6, 64/11 = 55/11 + 9/11 = 5 + 9/11. However, the value of the numerator “9” in the true fraction (9/11) is also indicated as the remainder of division by 11. From Figure 4 above, return to 1/11 and X 0 at time x 10, Bernoulli shift map is seen to be repeated in the cycle length of 10.

次に、式(2)のAが2以外の数値のときに対応するベルヌーイシフト写像の式を考える。例としてA=5の場合を考えて、これと同期するベルヌーイシフト写像は以下式(3)の5つからなる式になる。式(3)のマップを図5に示す。

Figure 2020052215
Next, a Bernoulli shift mapping equation corresponding to a case where A in equation (2) is a numerical value other than 2 is considered. Considering the case where A = 5 as an example, the Bernoulli shift mapping synchronized with this is expressed by the following five equations (3). FIG. 5 shows the map of the equation (3).
Figure 2020052215

式(3)に、初期値X0=1/11を与えて反復演算を行った場合の値と、式(2)において“A=5”を設定し、法として素数P=11を設定した値の遷移を、図6に示す。図6を参照するとA=2の場合と同様に、図6(A)に示される式(3)の反復演算におけるXiの分子と、図6(B)に示される合同算術による余りの数値が同じ値となっており、同期している。これも、分数の演算では真分数の分子が合同算術の余りを指しているからであり、傾きAがどのような値でも同様に真分数の分子と合同算術の余りが同じ値になることが判る。そして、X5=1/11となっており、初期値X0に戻るため周期長は5で繰り返されることが判る。これらを考察すると、ベルヌーイシフト写像の反復値の真分数の分子は合同算術の余りに相当し、合同算術の余りと同義であることが判る。以上から、傾きAの冪乗の法を取る合同算術は、ベルヌーイシフト写像に代替できることが示された。 Equation (3) is set to a value obtained by performing an iterative operation by giving an initial value X 0 = 1/11, “A = 5” in Equation (2), and a prime number P = 11 as a modulus. The transition of the values is shown in FIG. Referring to FIG. 6, similarly to the case where A = 2, the numerator of X i in the iterative operation of equation (3) shown in FIG. 6 (A) and the remainder value by the joint arithmetic shown in FIG. 6 (B) Have the same value and are synchronized. This is also because the numerator of the true fraction indicates the remainder of the joint arithmetic in the operation of the fraction, and any value of the slope A may have the same value as the remainder of the joint arithmetic with the numerator of the true fraction. I understand. Then, X 5 = 1/11, and the cycle length is repeated at 5 to return to the initial value X 0 . From these considerations, it can be seen that the numerator of the exact fraction of the repetition value of the Bernoulli shift map corresponds to the remainder of the joint arithmetic, and is synonymous with the remainder of the joint arithmetic. From the above, it was shown that the joint arithmetic using the power of the gradient A can be replaced with the Bernoulli shift map.

ここまでベルヌーイシフト写像は開区間(0,1)を扱っていたが、整数演算が行えるよう区間を素数P倍して開区間(0,P)にすることで、冪乗の合同算術の余りに相当するXiを得ることができる。傾きを“A”とし、開区間(0,P)に拡大し整数演算化したベルヌーイシフト写像は各傾きAの一次式をまとめて、次の式(4)のように、簡潔に表すものとする。

Figure 2020052215
上記式(4)のMkの下付き添え字kは、式(4)の各一次式(一次式の数はA個)を選択する範囲毎の変数を示し、kは0(M0=0)から傾きA(Mk+1=A)までを表している。例えば、P=1(拡大無し)とすれば、傾きA=2では式(1)、傾きA=5では式(3)が得られる。 Up to this point, the Bernoulli shift mapping has dealt with the open interval (0, 1). However, by multiplying the interval by a prime number P so that the integer operation can be performed to make the open interval (0, P), The corresponding X i can be obtained. The Bernoulli shift map obtained by enlarging the slope to “A” and expanding to the open interval (0, P) and converting it into an integer is a simple expression that summarizes a linear equation of each slope A and is expressed by the following equation (4). I do.
Figure 2020052215
The subscript k of M k in the above equation (4) indicates a variable for each range for selecting each linear equation (the number of linear equations is A) of the equation (4), and k is 0 (M 0 = 0) to the gradient A (M k + 1 = A). For example, if P = 1 (no enlargement), equation (1) is obtained when the slope A = 2, and equation (3) is obtained when the slope A = 5.

図7(A)に、整数演算化したベルヌーイシフト写像の式(4)をC言語で記述したプログラムのソースコードを示し、図7(B)に、合同算術の式(2)をC言語で記述したプログラムのソースコードを示す。図7のプラグラムを実行した演算結果、を図8に示す。図8(A)がベルヌーイシフト写像式(4)を係数A=5、最大区間P=11、反復回数ret=11に設定して、X10まで反復を行った場合の結果であるXiの値を示す。図8(B)は、合同算術式(2)を係数A=5、法P=11として左辺のべき乗のP−1を“0,1,2,…,10”(r=11に設定)まで変更して、それぞれの5のべき乗を法11で割った余りを示している。この図8によれば、図8(A)に示されるベルヌーイシフト写像の反復iの値Xiと、冪乗の値(5i(mod11))が対応して、同じ解となっていることが確認できる。 FIG. 7A shows a source code of a program in which the expression (4) of the Bernoulli shift mapping converted into an integer operation is described in C language, and FIG. 7B shows the expression of the joint arithmetic expression (2) in C language. Shows the source code of the described program. FIG. 8 shows a calculation result obtained by executing the program of FIG. FIG. 8 (A) shows the result of X i obtained by repeating Bernoulli shift mapping equation (4) up to X 10 with coefficient A = 5, maximum interval P = 11, and number of repetitions ret = 11. Indicates a value. FIG. 8B shows that the joint arithmetic equation (2) has a coefficient A = 5, a modulus P = 11, and the power P-1 on the left side is “0, 1, 2,..., 10” (r = 11). To the remainder of dividing each power of 5 by modulo 11. According to FIG. 8, the value X i of the iteration i of the Bernoulli shift map shown in FIG. 8A and the value of the power (5 i (mod 11)) correspond to the same solution. Can be confirmed.

なお、図7(A)のベルヌーイシフト写像式(4)のプログラムでは、各区間の境界“P×Mk/A”や“P×Mk+1/A”が割り切れるよう区間(0,P)をさらにA倍することで、最大区間(0,A×P)とし各区間の境界を整数のみで扱えるようにしている。具体例には、係数A=5の場合、区間の境界値は式(4)から“0/5,11/5,22/5,33/5,44/5,55/5”となるが、割り切れないため5倍して“0,11,22,33,44,55”の値を境界値として求めておき、メモリ(配列interval[A])に保存している。Xiの値に対応する区間の検索処理(図7のプログラムでは降順に全件探索し見つかった時点で検索終了)により引き算する値“P×Mk”を選定している。このため、プログラム中の演算結果をモニターに出力する“printf”文ではXiはAで割ってから出力し、関数の返り値もXiは、Aで割った値としている。 Note that in the program of the Bernoulli shift mapping equation (4) in FIG. 7A, the sections (0, P, M) are such that the boundaries “P × M k / A” and “P × M k + 1 / A” of each section are divisible. ) Is further multiplied by A so that the maximum section (0, A × P) can be set and the boundary of each section can be handled only by integers. In a specific example, when the coefficient A = 5, the boundary value of the section is “0/5, 11/5, 22/5, 33/5, 44/5, 55/5” from equation (4). Since it is not divisible, the value of “0, 11, 22, 33, 44, 55” is obtained as a boundary value by multiplying by 5, and stored in a memory (array [A]). The value “P × M k ” to be subtracted is selected by the search processing for the section corresponding to the value of X i (in the program of FIG. 7, the search is performed in descending order and the search is completed when found). Therefore, the X i is "printf" statement outputs the result to the monitor in the program output from the divided by A, the return value is also X i of the function is a value obtained by dividing by A.

合同算術の式(2)の合同算術演算はC言語で実装した図7(B)に示すソースコードのように、法11の余りに対して、A=5を掛け算して法11の余りを取りA=5を掛け算する繰り返しで余りの算術を行う手法を使っている。これに対してベルヌーイシフト写像の式(4)では区間の境界値を保存しておくメモリ領域と区間を検索する処理が発生するが演算が1回の引き算のみで良く、割り算を行い余りをとる除算剰余と比較して演算コストの低減が期待できる。   The joint arithmetic operation of the joint arithmetic expression (2) is performed by multiplying the remainder of the modulus 11 by A = 5 to obtain the remainder of the modulus 11 as shown in the source code shown in FIG. A method of performing the remainder arithmetic by repeating A = 5 is used. On the other hand, in the formula (4) of the Bernoulli shift mapping, a process for searching the memory area for storing the boundary value of the section and the section occurs. However, the operation only requires one subtraction, and the remainder is left after performing the division. It can be expected that the operation cost is reduced as compared with the division remainder.

実際に図7のソースコードの演算の繰り返し部分を、100万回反復(関数の入力値にA=5,P=11,図7(A):ret=1000000, 図7(B):r=1000000に設定して“printf”部分はコメントアウト)を行いオペレーションシステムLinux(登録商標)で提供されているコマンドツール“time”を使って処理時間を調べると、ベルヌーイシフト写像による演算は合同算術の約半分の処理時間になることが確認された。式(4)のベルヌーイシフト写像は、傾きAが大きな値となることで区間の分割数が増加し検索に時間がかかると推測されるが、区間の検索処理は二部探索法を利用するなど検索コストを削減することがより望ましい。   Actually, the repetition part of the operation of the source code of FIG. 7 is repeated 1 million times (A = 5, P = 11, FIG. 7 (A): ret = 1000000, FIG. 7 (B): r = When "printf" is set to 1000000 and the "printf" part is commented out) and the processing time is examined using the command tool "time" provided by the operation system Linux (registered trademark), the operation by Bernoulli shift mapping is approximately the joint arithmetic. It was confirmed that the processing time was reduced to half. In the Bernoulli shift mapping of the equation (4), it is estimated that a large value of the slope A increases the number of divisions of the section and takes a long time to search, but the search processing of the section uses a bipartite search method or the like. It is more desirable to reduce search costs.

以上の考察と実験結果から、合同算術によるべき乗とベルヌーイシフト写像の反復回数は同期して、合同算術によるべき乗の余りとベルヌーイシフト写像のXiは同じ値となる関係が得られることが推定される。よって、RSA暗号で用いられているフェルマーの小定理を素数以外の数にも適応できるよう拡張されたオイラーの定理についてもベルヌーイシフト写像と同期することが推定される。 From the above considerations and the experimental results, it is estimated that the power of joint arithmetic and the number of iterations of the Bernoulli shift map are synchronized, and the relationship that the remainder of the power of joint arithmetic and X i of the Bernoulli shift map have the same value is obtained. You. Therefore, it is estimated that Euler's theorem extended so that the Fermat's small theorem used in the RSA cryptography can be applied to numbers other than prime numbers is also synchronized with the Bernoulli shift mapping.

○オイラーの定理について
オイラーの定理は、Nが正の整数でAをNと互いに素な正の整数としたとき、以下の式(5)が成り立つ、という定理である。

Figure 2020052215
上記式(5)におけるφ(N)は、オイラーのトーシェント関数と呼ばれ、φ(N)はNより小さい正の整数のうちNと互いに素な数の個数を表す。例えばN=10のときを考えると10と互いに素な10より小さい数をピックアップすると{1,3,7,9}の4個となるため、φ(10)=4となる。 Euler's Theorem Euler's theorem is that when N is a positive integer and A is a positive integer which is relatively prime to N, the following equation (5) holds.
Figure 2020052215
Φ (N) in the above formula (5) is called Euler's torsional function, and φ (N) represents the number of positive integers smaller than N and relatively prime to N. For example, considering N = 10, picking up a number smaller than 10 that is relatively prime to 10 results in four {1, 3, 7, 9}, so that φ (10) = 4.

また、Nが素数Pの場合、Pと互いに素な数は{1,2,…,P−2,P−1}のP−1個となるため、φ(P)=P−1となり、式(5)はフェルマーの小定理の式(2)になることが判る。このため、オイラーの定理はフェルマーの小定理を素数以外にも適応できるようにした拡張版とされる。特に、素数Pと素数Qを用意して“N=P×Q”としたときには、“φ(N)=(P−1)×(Q−1)”が成り立つことが知られており、RSA暗号では法(modulo)の値としてこの2つの素数を掛け算したNを公開鍵の一部として使用する。注意点として、AとNは互いに素な整数であることが条件のため、Aは素数Pもしくは素数Qを使用しないことである。   Also, when N is a prime number P, since the prime numbers relatively prime to P are {1, 2,..., P-2, P-1}, φ (P) = P−1, It can be seen that equation (5) becomes equation (2) of Fermat's little theorem. For this reason, Euler's theorem is an extended version of Fermat's little theorem that can be applied to other than prime numbers. In particular, it is known that when the prime numbers P and Q are prepared and “N = P × Q”, “φ (N) = (P−1) × (Q−1)” holds. In cryptography, N obtained by multiplying these two prime numbers is used as a part of a public key as a modulo value. Note that A does not use primes P or Q because A and N must be relatively prime integers.

○RSA(Rivest−Shamir−Adleman)暗号について
RSA暗号は、合同算術による冪乗の余りの周期性に着目したオイラーの定理に基づく公開鍵暗号方式である。公開鍵暗号方式は、第三者に公開する公開鍵により暗号化を行い、秘密鍵を持った本人のみが復号を行えるといった暗号化と復号に別々の鍵を用いる暗号方式である。送信者と受信者が同じ鍵を共有する共通鍵暗号方式は、鍵の配送の問題があるため共通鍵の交換や認証にも広く利用されている。公開鍵はPK(Public Key)と法Nとし、秘密鍵はSK(Secret Key)と法Nとなる。これらの鍵はベルヌーイシフト写像よる暗号化と復号の演算でRSA暗号と等しく利用できるため、本実施形態では、これを用いるものであり、以下に鍵の生成方法について説明する。
Regarding RSA (Rivest-Shamir-Adleman) encryption RSA encryption is a public key cryptosystem based on Euler's theorem focusing on the periodicity of the remainder of the exponentiation by joint arithmetic. The public key cryptosystem is a cryptosystem in which encryption is performed using a public key that is disclosed to a third party, and only a person having a secret key can perform decryption, and separate keys are used for encryption and decryption. The common key cryptosystem in which the sender and the receiver share the same key is widely used for exchanging and authenticating the common key because of the problem of key distribution. The public key is PK (Public Key) and modulus N, and the secret key is SK (Secret Key) and modulus N. Since these keys can be used equally for the RSA encryption in the encryption and decryption operations by Bernoulli shift mapping, the present embodiment uses them, and a key generation method will be described below.

RSA暗号では、平文をPL(Plain)とし公開鍵PKと公開鍵Nとすると、暗号文C(Cipher)は2つの公開鍵を利用して以下の合同算術式(6)で得る。

Figure 2020052215
暗号文Cから復号鍵となる秘密鍵SKを用意し、以下の合同算術の式(7)で復号を行い平文に復元する。
Figure 2020052215
ここで式(6)に式(7)を代入し暗号文Cを消去すると、
Figure 2020052215
と復号を行うことができる。 In the RSA encryption, assuming that the plaintext is PL (Plain) and the public key PK and the public key N are, the ciphertext C (Cipher) is obtained by the following joint arithmetic expression (6) using two public keys.
Figure 2020052215
A secret key SK serving as a decryption key is prepared from the ciphertext C, and decrypted by the following joint arithmetic expression (7) to restore the plaintext.
Figure 2020052215
Here, when equation (7) is substituted into equation (6) and ciphertext C is deleted,
Figure 2020052215
And decryption can be performed.

RSA暗号では、公開鍵PKと公開鍵Nで式(6)の暗号文Cを生成し、復号鍵(秘密鍵)SKと復号鍵Nを持つ本人だけが暗号文Cから正しい平文PLを得られる仕組みとなっており、式(8)が成り立つようなPKとSKを見つけることで公開鍵暗号として成立する。式(8)を成立させることを考えると、式(5)のオイラーの定理を利用することができる。式(5)のAに平文PLを代入して正の整数“y”を導入し、y乗すると、以下の式(8A)が得られる。

Figure 2020052215
In the RSA encryption, a ciphertext C of Expression (6) is generated using a public key PK and a public key N, and only a person having a decryption key (secret key) SK and a decryption key N can obtain a correct plaintext PL from the ciphertext C. It is structured as a public key cryptosystem by finding PK and SK that satisfy Expression (8). Considering that equation (8) is satisfied, Euler's theorem of equation (5) can be used. Substituting the plaintext PL into A in equation (5), introducing a positive integer “y”, and raising it to the power of y yields the following equation (8A).
Figure 2020052215

上記式(8A)において、冪乗のφ(N)をyで整数倍して法をとった値、周期長φ(N)で“1”を繰り返すことを示している。前述したように“N=P×Q”としたときには、“φ(N)=(P−1)×(Q−1)”が成り立ち、Nは素数Pと素数Qを掛け算したもの(素数同士の掛け算はRSA暗号の安全性根拠になる)を採用する。更に、式(8A)の両辺に“PL”を掛け算すると、以下の式(9)となる。

Figure 2020052215
In the above equation (8A), “1” is repeated with a period length φ (N), which is a value obtained by multiplying the exponentiation φ (N) by an integer with y, and taking the modulus. As described above, when “N = P × Q”, “φ (N) = (P−1) × (Q−1)” holds, and N is a value obtained by multiplying a prime number P and a prime number Q (prime numbers Is used as the basis for the security of the RSA encryption). Further, when both sides of the equation (8A) are multiplied by “PL”, the following equation (9) is obtained.
Figure 2020052215

式(8)と式(9)の指数を見比べると、

Figure 2020052215
が成り立つようなPKとSKを見つけることで、式(8)は成り立つため暗号文Cは復号できる。ここで、上記式(9A)の右辺の“φ(N)・y”を左辺に移項すると以下の式(10)が得られる。
Figure 2020052215
式(10)からベズーの等式としても知られる一次不定方程式の整数解を利用することで、PKとSKが導出できる。以下に、一次不定方程式の解法により具体的な例を提示しPKとSKの導出例を示す。 Comparing the exponents of equation (8) and equation (9),
Figure 2020052215
By finding PK and SK such that holds, the equation (8) holds and the ciphertext C can be decrypted. Here, when “φ (N) · y” on the right side of the above equation (9A) is transposed to the left side, the following equation (10) is obtained.
Figure 2020052215
PK and SK can be derived from equation (10) by using an integer solution of a linear indeterminate equation, also known as a Bézout equation. In the following, a specific example is presented by solving a linear indefinite equation, and an example of deriving PK and SK is shown.

<定理> 一次不定方程式の整数解
“a”と“b”を互いに素な整数としたとき、以下の二元一次方程式を満たす整数解“x”と“y”が存在する。

Figure 2020052215
式(10)と式(11)を見比べると、a=PK,x=SK,φ(N)=bに相当することが判る。“y”は“−y”に置き換える。
前述から、“φ(N)=(P−1)×(Q−1)”のため、例として素数P=11と素数Q=13を用意してNとφ(N)を求めると、
N=11×13=143,φ(N)=10×12=120
となる。次にPKを導出するが式(11)は定理より、“a”と“b”を互いに素(最大公約数が1)な整数とするため、φ(N)=120と素な整数を公開鍵PK(=a)としてランダムに選択できる。 <Theorem> Integer solutions of linear indefinite equations When “a” and “b” are relatively prime integers, there are integer solutions “x” and “y” that satisfy the following binary linear equation.
Figure 2020052215
Comparing Equation (10) and Equation (11), it can be seen that a = PK, x = SK, and φ (N) = b. “Y” is replaced with “−y”.
From the above, since “φ (N) = (P−1) × (Q−1)”, for example, when prime numbers P = 11 and Q = 13 are prepared and N and φ (N) are obtained,
N = 11 × 13 = 143, φ (N) = 10 × 12 = 120
Becomes Next, PK is derived. Equation (11) discloses a prime integer of φ (N) = 120 in order to make “a” and “b” mutually prime integers (the greatest common divisor is 1) from the theorem. The key PK (= a) can be randomly selected.

なお、式(5)は、φ(N)は“P−1”と“Q−1”の最小公倍数LCM(Least Common Multiple)をとっても成り立つため、最小公倍数をとる関数をLCM(P−1,Q−1)として“φ(N)”を置き換え、“N=P×Q”のため、これも置き換えて

Figure 2020052215
が成り立つ。上記から10と12で共に割り切れる最小の値(最小公倍数)は60となるため、“LCM(10,12)=60”であり、上記の式の素数Pか素数Q以外の適当な整数Aの指数に“60”を当て嵌めると“60,120,180,…”と60刻みに周期的に“P×Q”で法をとった値は1になる。 In Equation (5), since φ (N) also holds as the least common multiple LCM (Least Common Multiple) of “P−1” and “Q−1”, the function that takes the least common multiple is LCM (P−1, Q-1) is replaced with “φ (N)”, and since “N = P × Q”, this is also replaced.
Figure 2020052215
Holds. From the above, since the minimum value (least common multiple) divisible by 10 and 12 is 60, “LCM (10, 12) = 60”, and an appropriate integer A other than the prime number P or the prime number Q in the above equation When “60” is applied to the exponent, a value obtained by modulating “P × Q” periodically by 60 such as “60, 120, 180,...” Becomes 1.

公開鍵PK(=a)の選択は、文献によってφ(N)=LCM(P−1,Q−1)となる最小公倍数を当て、それより小さい素な値の
“0<PK<LCM(P−1,Q−1)”を採用することが紹介されているが、ここでも最小公倍数“φ(N)=60”を使う。
公開鍵PK(=a)は、例として適当に素数7(60と素な値)を当てることとする。
これで式(11)の“a”と“b”は以下のように決まった。

Figure 2020052215
一次不定方程式の整数解「拡張されたユークリッドの互除法」によって秘密鍵SKとなる“x”と“y”を求める。“x”と“y”を求める例を図9に示す。
Figure 2020052215
The public key PK (= a) is selected by applying the least common multiple that satisfies φ (N) = LCM (P−1, Q−1) according to the literature, and a smaller prime value “0 <PK <LCM (P -1, Q-1) ”is introduced, but the least common multiple“ φ (N) = 60 ”is used here.
For example, the public key PK (= a) is appropriately assigned a prime number 7 (a prime value equal to 60).
Thus, “a” and “b” in equation (11) are determined as follows.
Figure 2020052215
"X" and "y" to be secret keys SK are obtained by an integer solution of a linear indefinite equation "extended Euclidean algorithm". FIG. 9 shows an example of obtaining “x” and “y”.
Figure 2020052215

上記式のように“x=−17,y=2”が得られたが、“x”はマイナス、“y”はプラスになっており式(10)と見比べると、”y”はマイナスつまり“y=−y”となるようにしたいため“x”がプラスとなるように、以下のテクニックを利用する。式(11)を以下の式(12)に変形する。

Figure 2020052215
式(12)の“a×b”の部分は差し引きで消去できるため式(11)と等しい。
求めた値は“x=−17,b=60”、また“y=2,a=7”であるため、これを式(12)に代入すると、
Figure 2020052215
と“x=43,y=−5”になり、式(10)の形式が得られこれで残りの秘密鍵SK=43が得られた。
以上、RSA暗号は平文を底の数値として、公開鍵PKで冪乗を行い“N=素数P×素数Q”で法をとり暗号文を生成し、暗号文を底の数値として秘密鍵SKで冪乗を行い、“N=素数P×素数Q”で法をとり、復号を行い平文に戻すことを示した。 Although “x = −17, y = 2” is obtained as in the above equation, “x” is minus and “y” is plus. When compared with equation (10), “y” is minus. To make “y = −y”, the following technique is used so that “x” becomes positive. Equation (11) is transformed into the following equation (12).
Figure 2020052215
Since the portion of “a × b” in the equation (12) can be deleted by subtraction, it is equal to the equation (11).
Since the obtained values are “x = −17, b = 60” and “y = 2, a = 7”, when these values are substituted into Expression (12),
Figure 2020052215
And "x = 43, y = -5", and the form of Expression (10) is obtained, and the remaining secret key SK = 43 is obtained.
As described above, the RSA cryptosystem generates a ciphertext by raising the plaintext to the base number, raising the power to the public key PK, performing a modulus by “N = prime number P × prime number Q”, and setting the ciphertext to the base number as the secret key SK. It has been shown that the power is raised, the modulus is calculated by “N = prime number P × prime number Q”, and the decryption is performed to return to the plain text.

図1に示したように、受信装置200の公開鍵生成手段203が公開鍵を生成し、秘密鍵生成手段204が秘密鍵を生成する。生成した公開鍵であるPKとNを、第三者としての送信装置100のユーザに公開する。Nを素因数分解して素数Pと素数Qを求めて式(10)にPKとφ(N)を当て嵌めれば、秘密鍵SKが容易にわかってしまうが、大きな桁の素数同士を掛け算した合成数の素因数分解は、莫大な計算量が必要となり素数Pと素数Qが割り出せないことを安全性の根拠としている。2011年1月に、米国商務省国立標準技術研究所(NIST)は、RSA暗号に使用する法Nを2048ビット以上にすることを公表(NIST SP800−131)している。   As shown in FIG. 1, the public key generation means 203 of the receiving device 200 generates a public key, and the secret key generation means 204 generates a secret key. The generated public keys PK and N are disclosed to the user of the transmission device 100 as a third party. If PK and φ (N) are applied to equation (10) by prime factorization of N to obtain prime numbers P and Q, the secret key SK can be easily found, but the prime numbers of large digits are multiplied. The prime factorization of a composite number requires an enormous amount of calculation and is based on the fact that the prime numbers P and Q cannot be determined. In January 2011, the National Institute of Standards and Technology (NIST) of the United States Department of Commerce (NIST SP800-131) announced that the law N used for RSA encryption should be 2048 bits or more.

なお、他に秘密鍵SKの導出方法については、文献によって、

Figure 2020052215
が成り立つ”SK”を見つけることであると、紹介されている。しかしながら、これは被除数PK×SKを除数φ(N)で割った商yの剰余が1ということであり、以下の式が成り立つ。
Figure 2020052215
この式は、式(10)と同じであり、本実施形態では一次不定方程式の整数解により秘密鍵SKを導出することとした。 In addition, regarding the method of deriving the secret key SK, according to the literature,
Figure 2020052215
Is to find “SK” that holds. However, this means that the remainder of the quotient y obtained by dividing the dividend PK × SK by the divisor φ (N) is 1, and the following equation is established.
Figure 2020052215
This expression is the same as Expression (10), and in the present embodiment, the secret key SK is derived by an integer solution of a linear indeterminate equation.

<第1の実施形態>
以上のようにして、求められた公開鍵と秘密鍵を用いて、図1に示した第1の実施形態に係る公開鍵暗号システムは、図10に示すフローチャートに基づく動作を行い、ベルヌーイシフト写像よる暗号化と復号を実行する。なお、図10では素数Pと素数Qから公開鍵PKと秘密鍵SKと法Nは受信装置200において生成済みであり、公開鍵PKと法Nは送信装置100へ渡されているものとする。
<First embodiment>
Using the public key and secret key obtained as described above, the public key cryptosystem according to the first embodiment shown in FIG. 1 performs an operation based on the flowchart shown in FIG. Perform encryption and decryption. In FIG. 10, it is assumed that the public key PK, the secret key SK, and the modulus N have already been generated in the receiving device 200 from the prime numbers P and Q, and the public key PK and the modulus N have been passed to the transmitting device 100.

即ち、送信装置100は、公開鍵PKと公開鍵N(法N)を入手し(S11)、平文を入手し(S12)、公開鍵PKをベルヌーイシフト写像の反復回数にセットし、公開鍵Nをベルヌーイシフト写像の最大区間にセットし、平文をベルヌーイシフト写像の傾き係数にセットし(S13)、準備が完了となる。   That is, the transmitting apparatus 100 obtains the public key PK and the public key N (law N) (S11), obtains the plaintext (S12), sets the public key PK to the number of repetitions of the Bernoulli shift mapping, and sets the public key N Is set to the maximum section of the Bernoulli shift mapping, the plain text is set to the inclination coefficient of the Bernoulli shift mapping (S13), and the preparation is completed.

次に、ベルヌーイシフト写像により暗号化を行う(S14)。このステップS14の処理は、図7(A)に示したプログラムの実行による処理となる。ステップS14の処理が行われ、反復回数PK繰り返された結果の値XPKが暗号文として生成される(S15)。この暗号文XPKは受信装置200へ伝送路300を介して送信される。 Next, encryption is performed by Bernoulli shift mapping (S14). The process of step S14 is a process by executing the program shown in FIG. The process of step S14 is performed, and a value X PK resulting from the repetition PK is generated as a cipher text (S15). This ciphertext XPK is transmitted to receiving apparatus 200 via transmission path 300.

一方受信装置200は、秘密鍵SKと秘密鍵N(法N)を入手し(S21)、暗号文を受信する(S22)。次に、秘密鍵SKをベルヌーイシフト写像の反復回数にセットし、秘密鍵Nをベルヌーイシフト写像の最大区間にセットし、暗号文をベルヌーイシフト写像の傾き係数にセットし(S23)、準備が完了となる。   On the other hand, the receiving device 200 obtains the secret key SK and the secret key N (law N) (S21), and receives the ciphertext (S22). Next, the secret key SK is set to the number of iterations of the Bernoulli shift mapping, the secret key N is set to the maximum section of the Bernoulli shift mapping, and the ciphertext is set to the inclination coefficient of the Bernoulli shift mapping (S23), and the preparation is completed. Becomes

次に、ベルヌーイシフト写像により復号を行う(S24)。このステップS24の処理は、図7(A)に示したプログラムの実行による処理となる。ステップS24の処理が行われ、反復回数SK繰り返された結果の値XSKが復号文(平文)として生成される(S25)。 Next, decoding is performed by Bernoulli shift mapping (S24). The process of step S24 is a process by executing the program shown in FIG. The process in step S24 is performed, and a value XSK resulting from the repetition of the number of repetitions SK is generated as a decrypted text (plaintext) (S25).

上記公開鍵暗号システムの処理を、具体例により説明する。例として、3つの平文(A=5,A=19,A=101)を用意し、公開鍵による暗号化と秘密鍵による復号したときのそれぞれの反復Xiの値を図11に示す。前述したが、平文Aには素数P=11もしくは素数Q=13と同じ値を入れない。このため、実用では平文は素数Pと素数Q以下の値にするなど制約を与える。各平文は公開鍵の値となる7回分を式(4)で反復演算を行なった図11(A)の“i=7”の行に示す“X7”が暗号文となる。暗号文に秘密鍵の値となる43回を式(4)で反復演算を行ったX43が、元の平文に復号されていることが図11(B)の“i=43”の行において確認できる。なお、初期値X0は暗号化と復号で共に“1”に設定している。 The processing of the public key cryptosystem will be described with a specific example. As an example, it provides three plaintext (A = 5, A = 19 , A = 101), shown in Figure 11 the value of each iteration X i when the decoding by encryption and a secret key by the public key. As described above, the plaintext A does not include the same value as the prime number P = 11 or the prime number Q = 13. For this reason, in practical use, the plaintext is restricted to a value equal to or less than the prime number P and the prime number Q. In each plaintext, “X 7 ” shown in the row of “i = 7” in FIG. 11A obtained by repeatedly performing the operation of the value of the public key seven times by the equation (4) is a ciphertext. In the row of “i = 43” in FIG. 11B, X 43 obtained by performing a repetitive operation on the cipher text for 43 times as the value of the secret key using equation (4) is decrypted into the original plain text. You can check. Note that the initial value X 0 is set to “1” for both encryption and decryption.

この暗号化と復号のイメージを、ベルヌーイシフト写像のマップとして図12に示す。この図12によって、平文を5としたときの式(4)における傾きがA=5になり、復号鍵分(PK=7)の回数の反復を行って暗号化することで暗号文X7=47が得られることが判る。復号時はX7=47を式(4)の傾きA=47に設定して、秘密鍵分の回数(SK=43)の反復写像を行うことによってX43=5の平文5が復元される。 FIG. 12 shows an image of this encryption and decryption as a map of Bernoulli shift mapping. According to FIG. 12, when the plain text is set to 5, the slope in the equation (4) becomes A = 5, and the encryption is performed by repeating the decryption key (PK = 7) times and encrypting the encrypted text X 7 = 47 is obtained. At the time of decryption, the plaintext 5 of X 43 = 5 is restored by setting X 7 = 47 to the gradient A = 47 in equation (4) and performing repetitive mapping for the number of times of the secret key (SK = 43). .

演算負荷について考察する。図7のソースコードに示すように、傾きAの値で区間の分割数が決まるため、例えば送信者がパスワード8文字のような64bitのデータを送信する場合、8bitずつ小分けにして平文(傾きA)を小さくして暗号化を行い8回分送信する。これにより、1回(8bit)の暗号処理における区間の最大分割数(最大255)が少なくなり、区間の検索回数を少なくできる。送信する暗号文Xi(復号に使用する傾きA)は法Nの値により大きな値になるため、送信側は処理能力の低い携帯端末で暗号化を行い、受信者側は処理能力の高いサーバで復号を行うといったパスコード認証のような形態において好適となる。 Consider the computational load. As shown in the source code of FIG. 7, since the number of divisions of the section is determined by the value of the slope A, for example, when the sender transmits 64-bit data such as a password of 8 characters, the plaintext (tilt A) is divided into 8 bits. ) Is reduced and encrypted, and transmitted eight times. As a result, the maximum number of divisions (up to 255) of a section in one (8-bit) encryption process is reduced, and the number of times of section search can be reduced. Since the cipher text X i to be transmitted (slope A used for decryption) becomes larger depending on the value of the modulus N, the transmitting side performs encryption with a portable terminal having low processing capability, and the receiving side performs processing with a server having high processing capability. This is suitable for a form such as passcode authentication in which decryption is performed by using.

従来の合同算術による計算では、図7(B)のソースコードのステップ数“r”が公開鍵もしくは秘密鍵の値に相当するが、実際には大きな値を扱うため計算量が莫大になり現実的ではなくなる。このため、“冪乗法”を利用することで計算量が少なくなる手法を用いている。   In the calculation by the conventional joint arithmetic, the number of steps “r” in the source code of FIG. 7B corresponds to the value of the public key or the secret key. It is no longer a target. For this reason, a technique is used in which the amount of calculation is reduced by using the “power method”.

例として図11の暗号文47を復号文5に戻す場合は式(7)より以下の合同算術式が成り立っている。

Figure 2020052215
指数部分の秘密鍵SK=43から図7では43ステップの計算が必要となる。冪乗法ではこの計算に補助項
Figure 2020052215
を計算する。この手法はその前の項の2乗
Figure 2020052215
から得られるため計算ステップは5回となる。
Figure 2020052215
となり、計算ステップが3回となるため、合計8回のステップで計算が可能となり演算負荷を軽減できる。 As an example, when the ciphertext 47 in FIG. 11 is returned to the decryption text 5, the following joint arithmetic expression is established from Expression (7).
Figure 2020052215
In FIG. 7, 43 steps of calculation are required from the secret key SK = 43 in the exponent part. In the power method, an auxiliary term is used for this calculation.
Figure 2020052215
Is calculated. This method is the square of the previous term
Figure 2020052215
, The number of calculation steps is five.
Figure 2020052215
Thus, the number of calculation steps is three, so that calculation can be performed in a total of eight steps, and the calculation load can be reduced.

ここまでの計算では法N=143であるため、最大桁は “1432=20449”までを扱うことが考えられるが、最大桁を“143×2=286”までに小さくする手法がある。たとえば上記の

Figure 2020052215
の箇所ついて“53×27=1431”となるが、27を2進展開すると
“24+23+21+20”となり、補助項を求めると、
Figure 2020052215
となり、
Figure 2020052215
となり、足し算の計算は
Figure 2020052215
となり、ここまでのすべての途中の計算は最大桁を、“143×2=286”以下にできている。 In the calculations so far, since the modulus N = 143, the maximum digit may be handled up to “143 2 = 20449”. However, there is a method of reducing the maximum digit to “143 × 2 = 286”. For example,
Figure 2020052215
Is obtained as "53 × 27 = 1431", but when 27 is binary-expanded, it becomes "2 4 +2 3 +2 1 +2 0 ".
Figure 2020052215
Becomes
Figure 2020052215
And the calculation of addition is
Figure 2020052215
, And the maximum digit in all the intermediate calculations up to this point can be set to “143 × 2 = 286” or less.

また、

Figure 2020052215
であるが、同様に47を2進展開すると“25+23+22+21+20”となり、補助項を求めると
Figure 2020052215
となり、
Figure 2020052215
が最終的に導かれ、足し算部分は上記のように一回の足し算の余りの結果を次の値と足し算して余りを順に求めて行く。 Also,
Figure 2020052215
However, similarly, when 47 is binary-expanded, it becomes “2 5 +2 3 +2 2 +2 1 +2 0 ”.
Figure 2020052215
Becomes
Figure 2020052215
Is finally derived, and in the addition part, the remainder of one addition is added to the next value to obtain the remainder in order, as described above.

式(13)と比較すると、計算ステップ数は増えているがすべての途中の計算は最大桁を“143×2=286”以下にでき、桁数を抑えることができる。こうした演算に必要な最大桁を小さくするテクニックを取り込み、図7に示すように合同算術部分をベルヌーイシフト写像の演算に置き換えることで、傾きAの桁数が小さくなり区間の検索回数を減らすことができるため、演算負荷を小さくすることが期待できる。   Compared with Expression (13), the number of calculation steps is increased, but the maximum number of digits in all intermediate calculations can be reduced to “143 × 2 = 286” or less, and the number of digits can be reduced. By adopting a technique of reducing the maximum digit required for such an operation and replacing the joint arithmetic part with the operation of Bernoulli shift mapping as shown in FIG. 7, the number of digits of the slope A is reduced, and the number of searches for the section is reduced. Therefore, it is expected that the calculation load can be reduced.

図1Aには、第2の実施形態に係る公開鍵暗号システムが示されている。第2の実施形態に係る第2の実施形態に係る公開鍵暗号システムでは、送信装置100Aがベルヌーイシフト写像の初期値を暗号化の度に変更する送信側初期値変更制御手段105を備えており、受信装置200Aが、暗号文を復号する度にベルヌーイシフト写像の初期値を、上記送信側初期値変更制御手段105によって変更された初期値と同じ値に変更する受信側初期値変更制御手段205と、上記受信側初期値変更制御手段205により変更された初期値を用いて前記暗号文の逆元を算出する逆元算出手段206を備えている。暗号化手段102は、送信側初期値変更制御手段105により変更された初期値を用いてベルヌーイシフト写像を実行して暗号化を行う。復号手段202は、受信側初期値変更制御手段205により変更された初期値を用いて得られた逆元の暗号文に対してベルヌーイシフト写像を実行して復号を行う。この逆元については、次の第3の実施形態で詳しく述べる。本実施形態によれば、暗号文の暗号化の度に初期値が変更されるので、決り切った平文として“Yes”か“No”のみにより構成される場合、同じ平文を同じ公開鍵で暗号化するために行い続けると暗号文が限られるため平文が見破られる危険性を低減させる。   FIG. 1A shows a public key encryption system according to the second embodiment. In the public key encryption system according to the second embodiment according to the second embodiment, the transmission device 100A includes a transmission-side initial value change control unit 105 that changes the initial value of the Bernoulli shift mapping every time encryption is performed. Each time the receiving device 200A decrypts the ciphertext, the receiving-side initial value change control unit 205 changes the initial value of the Bernoulli shift mapping to the same value as the initial value changed by the transmitting-side initial value change control unit 105. And an inverse element calculating means 206 for calculating an inverse element of the ciphertext using the initial value changed by the receiving-side initial value changing control means 205. The encryption means 102 performs Bernoulli shift mapping using the initial value changed by the transmission-side initial value change control means 105 to perform encryption. The decryption means 202 performs Bernoulli shift mapping on the inverse ciphertext obtained using the initial value changed by the reception-side initial value change control means 205 to perform decryption. This inverse element will be described in detail in the next third embodiment. According to the present embodiment, the initial value is changed each time the ciphertext is encrypted. Therefore, when the plaintext is composed of only “Yes” or “No”, the same plaintext is encrypted with the same public key. If the encryption is continued, the risk that the plaintext can be detected is reduced because the ciphertext is limited.

図1Bには、第3の実施形態に係る公開鍵暗号システムが示されている。この実施形態では、ベルヌーイシフト写像を実行する場合の初期値となる乱数種を生成する乱数種生成手段400を有する。乱数種生成手段400は、送信装置100Bと受信装置200B以外の装置に設けられ、生成された乱数種は、秘匿した状態で送信装置100Bと受信装置200Bに与えられる。ここでは、伝送路300を用いた配信の場合に暗号化して送信し、送信装置100Bと受信装置200Bにおいて復号して用いるようにすることができる。勿論、乱数種生成手段400は、送信装置100Bと受信装置200Bの少なくとも一方に設けられても良い。   FIG. 1B shows a public key cryptosystem according to the third embodiment. This embodiment includes a random number seed generating unit 400 that generates a random number seed that is an initial value when executing the Bernoulli shift mapping. The random number seed generation means 400 is provided in a device other than the transmitting device 100B and the receiving device 200B, and the generated random number seed is provided to the transmitting device 100B and the receiving device 200B in a secret state. Here, in the case of distribution using the transmission path 300, the data can be encrypted and transmitted, and can be decrypted and used by the transmitting device 100B and the receiving device 200B. Of course, the random number seed generation means 400 may be provided in at least one of the transmitting device 100B and the receiving device 200B.

前記暗号化手段102Bは、上記乱数種生成手段400により生成され送信側初期値変更制御手段105を介して与えられた乱数種を初期値とし、この初期値と上記公開鍵を用いてベルヌーイシフト写像を実行して平文を暗号文へ変換する。また、受信装置200Bには、上記暗号文を上記乱数種生成手段400により生成され受信側初期値変更制御手段205を介して与えられた乱数種を用いて上記暗号文の逆元を算出する逆元算出手段206が備えられる。復号手段202Bは、上記逆元算出手段206により算出された逆元とされた暗号文に対し、ベルヌーイシフト写像を用いた復号を実行して暗号文を平文へ変換する。   The encryption unit 102B sets a random number seed generated by the random number seed generation unit 400 and given via the transmission-side initial value change control unit 105 as an initial value, and uses this initial value and the public key to perform a Bernoulli shift mapping. To convert the plaintext into ciphertext. In addition, the receiving apparatus 200B calculates the inverse of the ciphertext by using the random number seed generated by the random number seed generation unit 400 and given through the receiving-side initial value change control unit 205. Source calculation means 206 is provided. The decryption means 202B performs decryption using the Bernoulli shift map on the inverse ciphertext calculated by the inverse element calculation means 206, and converts the encrypted text into plaintext.

この第3の実施形態による処理のフローチャートを図13に示す。このフローチャートの処理は図10のものを変更したもので、送信装置100Bと受信装置200Bにおいては、乱数種の取得ステップ(S16,S26)が加わっている。そして、送信側では、ステップS17において、公開鍵PKをベルヌーイシフト写像の反復回数にセットし、公開鍵Nをベルヌーイシフト写像の最大区間にセットし、平文をベルヌーイシフト写像の傾き係数にセットし、乱数種を初期値X0にセットし(S17)、準備が完了となる。また、受信装置200Bにおいては、暗号文の受信後に乱数種を用いて逆元を求める処理を行い(S27)、この逆元算出した暗号文を復号する暗号文にセットする(S28)。これ以外の処理は、第1の実施形態による処理と同様である。 FIG. 13 shows a flowchart of the process according to the third embodiment. The processing in this flowchart is a modification of the processing in FIG. 10, and the transmitting device 100B and the receiving device 200B additionally include a random number seed acquisition step (S16, S26). Then, on the transmitting side, in step S17, the public key PK is set to the number of iterations of the Bernoulli shift mapping, the public key N is set to the maximum section of the Bernoulli shift mapping, and the plain text is set to the slope coefficient of the Bernoulli shift mapping, set the random number seed to the initial value X 0 (S17), preparation is completed. After receiving the ciphertext, the receiving device 200B performs a process of obtaining an inverse using a random number seed (S27), and sets the ciphertext calculated by the inverse as a ciphertext to be decrypted (S28). Other processes are the same as the processes according to the first embodiment.

上記公開鍵暗号システムの処理を、具体例により説明する。図13における送信装置100Bによる暗号化のフローチャートにて、平文を5とし初期値X0=1の場合に追加して、例としてX0=3とX0=67の2つ初期値X0を用意した。この2つのX0=3とX0=67を初期値に設定し、復号鍵(PK=7)の回数を反復演算して、取得した“Xi”を示す表が図14である。初期値X0=3に設定した場合は、この暗号文をC3と表現してC3=141が得られている。初期値X0=1では暗号文をC1とすると暗号文C1=47であるのに対し、初期値X0=3に変えたことで異なる暗号文が得られることが確認できる。ここで、初期値X0から初めてX0,X1,X2,・・・と変化する各Xiの値に着目すると、X0=3,X1=15,X2=75となっておいる。これらをX0=3で各々割ると、X0=1,X1=5,X2=25となり初期値X0=1に設定した場合と同じ値になることが判る。このように、初期値を変更したときに得られる暗号文は、初期値X0=1のときの暗号文が異なってしまうので、初期値を変更したことにより得られる暗号文から変更した初期値を用いて、初期値X0=1のときの暗号文を求まる処理を、「逆元を算出する処理」という。そして、逆元算出手段が「逆元を算出する処理」を実行することになる。 The processing of the public key cryptosystem will be described with a specific example. The flowchart of encryption by the transmitting device 100B in FIG. 13, in addition to when the plain text and 5 of the initial value X 0 = 1, the two initial value X 0 of X 0 = 3 and X 0 = 67 as an example Prepared. FIG. 14 is a table showing “X i ” obtained by setting these two X 0 = 3 and X 0 = 67 to initial values and repeatedly calculating the number of times of the decryption key (PK = 7). When the initial value X 0 is set to 3, the cipher text is expressed as C 3, and C 3 = 141 is obtained. With the initial value X 0 = 1, assuming that the cipher text is C 1 , the cipher text C 1 = 47, whereas by changing the initial value X 0 = 3, a different cipher text can be obtained. Here, the first X 0 from the initial value X 0, X 1, X 2, paying attention to the value of the X i that changes ..., becomes X 0 = 3, X 1 = 15, X 2 = 75 Oil. When these are divided by X 0 = 3, X 0 = 1, X 1 = 5, and X 2 = 25, which are the same values as when the initial value X 0 = 1 is set. As described above, since the ciphertext obtained when the initial value is changed differs from the ciphertext when the initial value X 0 = 1, the initial value changed from the ciphertext obtained by changing the initial value. Is used to calculate the cipher text when the initial value X 0 = 1. Then, the inverse calculation means executes the “process of calculating the inverse”.

初期値X0=3から始めた場合に暗号文C3=141となるまでの各暗号文の値について、3で合同算術の逆数をとれば、初期値X0=1のときの各々の“Xi”が取得でき、X7となる暗号文C1=47を取得できる。この場合では、

Figure 2020052215
が成り立つ暗号文C1を求めればよいため、“141/3”を計算した結果のC1=47が該当することが判る。ただし、注意点がある。初期値X0=1の場合と同等になる暗号文C1は乱数で決めた初期値X0で逆数をとることで求められるが、合同算術において乗法逆元は上記合同式を満たすC1=47のみでなく複数の解が得られることである。 For each value of ciphertext when starting from the initial value X 0 = 3 until ciphertext C 3 = 141, Taking the reciprocal of the modular arithmetic at 3, each time the initial value X 0 = 1 " X i ″ can be obtained, and the ciphertext C 1 = 47 that is X 7 can be obtained. In this case,
Figure 2020052215
Because may be obtained ciphertext C 1 to holds, "141/3" is C 1 = 47 of the calculated results it can be seen that appropriate. However, there is a caveat. The ciphertext C 1 equivalent to the case of the initial value X 0 = 1 can be obtained by taking the reciprocal with the initial value X 0 determined by the random number. In the joint arithmetic, the multiplicative inverse is C 1 = That is, not only 47 but also a plurality of solutions can be obtained.

上記式は被除数3×C1を除数143で割った商yの剰余が141ということであり、以下の式が成り立つ

Figure 2020052215
変形すると
Figure 2020052215
となり、“y=0,3,6,…”とすることで、“C1=47,190,333,…”と際限なく複数の解が得られて元の暗号文が1つに識別できなくなる。そこで、「初期値X0とする乱数種と平文の数値は、法N以下の値とする」と言うルールを設けることで1つに絞る。この例では、C1=47のみが取得されることになる。 In the above equation, the remainder of the quotient y obtained by dividing the dividend 3 × C 1 by the divisor 143 is 141, and the following equation is established.
Figure 2020052215
When deformed
Figure 2020052215
By setting “y = 0, 3, 6,...”, “C 1 = 47, 190, 333,. Disappears. Therefore, the rule of “the random number seed and the plaintext numerical value to be set to the initial value X 0 is a value equal to or smaller than the modulus N” is provided, and the rule is reduced to one. In this example, only C 1 = 47 will be obtained.

次に、初期値X0=67に設定変更した場合は暗号文をC67として(X7=)C67=3が得られており、初期値X0=1のときと異なる暗号文が得られることが確認できる。
この場合

Figure 2020052215
が成り立つ暗号文C1を求めればよい。以下の式の解が整数になるC1を求めると、
Figure 2020052215
“y=22,89,156,…”とすることで、“C1=47,190,333,…”と複数の解が得られる。そこで、前述のルールに従って法N(ここでは143)以下の値とするためC1=47のみを取得することができる。 Next, when the setting is changed to the initial value X 0 = 67, (X 7 =) C 67 = 3 is obtained with the cipher text as C 67 , and a cipher text different from that when the initial value X 0 = 1 is obtained. It can be confirmed that it is done.
in this case
Figure 2020052215
It may be obtained ciphertext C 1, which is true. When obtaining the C 1 the solution of the following formulas is an integer,
Figure 2020052215
By setting “y = 22, 89, 156,...”, A plurality of solutions are obtained as “C 1 = 47, 190, 333,. Therefore, only C 1 = 47 can be obtained in order to make the value equal to or less than the modulus N (here, 143) according to the above-described rule.

以上から乱数種を初期値X0に設定したときに生成された暗号文Cx0から、初期値X0=1を設定したときに生成される暗号文C1に戻すとき、以下の式(14)が成立するC1を求めればよい。

Figure 2020052215
From the ciphertext C x0 which is generated when setting the random seed to the initial value X 0 from the above, when returning to the ciphertext C 1 that is generated when setting the initial value X 0 = 1, the following equation (14 ) may be determined to a C 1 to hold.
Figure 2020052215

乱数種の初期値X0は、送信装置(送信者)と受信装置(受信者)でお互い秘匿することが必要である。このための構成を備える第4の実施形態に係る公開鍵暗号システムを、図1Cに示す。乱数種生成手段400は、送信装置100Cに備えられる。この送信装置100Cに備えられている暗号化手段102Cが、乱数種生成手段400により生成された乱数種を上記公開鍵を用いて暗号化手段102Cにおいてベルヌーイシフト写像を実行して暗号化する。更に、暗号化した乱数種を送信手段101を介して受信装置200Cへ送る。受信装置200Cでは、受信した暗号化された乱数種を復号手段202Cでベルヌーイシフト写像を実行して復号して用いる。この第4の実施形態では第3の実施形態と同様に、逆元算出手段206が、変更された初期値(乱数種)を用いて逆元の算出を行う。 The initial value X 0 of the random number seed needs to be kept secret between the transmitting device (sender) and the receiving device (receiver). FIG. 1C shows a public key cryptosystem according to the fourth embodiment having the configuration for this purpose. The random number seed generation means 400 is provided in the transmitting device 100C. The encrypting means 102C provided in the transmitting apparatus 100C encrypts the random number seed generated by the random number seed generating means 400 by executing Bernoulli shift mapping in the encrypting means 102C using the public key. Further, the encrypted random number seed is sent to the receiving device 200C via the sending means 101. In the receiving apparatus 200C, the decrypted means 202C executes the Bernoulli shift mapping to decrypt the received encrypted random number seed and uses it. In the fourth embodiment, similarly to the third embodiment, the inverse calculation unit 206 calculates the inverse using the changed initial value (random number seed).

第4の実施形態における、乱数種の処理と、平文を暗号化して送信する処理及び暗号化された暗号文を復号化する処理を図13Aのフローチャートに示す。受信装置200Cにおいては、素数Pと素数Qを生成し、PとQから公開鍵N=PxQと公開鍵PKを作成し(S41)、公開鍵PKと公開鍵Nを送信者に送付する(S42)。更に、公開鍵Nと公開鍵PKから秘密鍵SKを生成する(S43)。送信装置100Cでは、乱数種を生成し上記で受信装置200Cから到来した公開鍵を用いてベルヌーイシフト写像による乱数種の暗号化を行う(S31)。次に暗号化した乱数種を受信装置200Cへ送る(S32)。これに対し、受信装置200Cでは、受信した暗号化した乱数種を秘密鍵を用いてベルヌーイシフト写像による復号を行い乱数種を復元する(S44)。以上で、送信装置100Cと受信装置200Cには同じ乱数種が暗号文の生成と復号の度に更新されて揃うことになる。   FIG. 13A is a flowchart illustrating a process of random number seed, a process of encrypting and transmitting a plaintext, and a process of decrypting an encrypted ciphertext in the fourth embodiment. The receiving device 200C generates a prime number P and a prime number Q, creates a public key N = PxQ and a public key PK from P and Q (S41), and sends the public key PK and the public key N to the sender (S42). ). Further, a secret key SK is generated from the public key N and the public key PK (S43). The transmitting apparatus 100C generates a random number seed and encrypts the random number seed by Bernoulli shift mapping using the public key received from the receiving apparatus 200C as described above (S31). Next, the encrypted random number seed is sent to the receiving device 200C (S32). On the other hand, the receiving device 200C decrypts the received encrypted random number seed by Bernoulli shift mapping using the secret key to restore the random number seed (S44). As described above, the same random number seed is updated in the transmitting apparatus 100C and the receiving apparatus 200C every time a ciphertext is generated and decrypted.

次に、送信装置100Cが、公開鍵を用いて乱数種を初期値X0に設定したベルヌーイシフト写像による平文の暗号化を行い(S33)、暗号文を受信装置200Cへ送信する(S34)。受信装置200Cでは、送信装置100Cからの暗号文を受け取り、乱数種を逆数として受信した暗号文の逆元を計算する(S45)。これで、乱数種を初期値として暗号化された暗号文が初期値が1である暗号文へと変換される(逆元の暗号文が求められる)。受信装置200Cでは、この逆元の暗号文に秘密鍵を用いてベルヌーイシフト写像により平文に復号する(S46)。而して、送信装置100Cにおいて暗号化される前の平文が受信装置200Cにおいて安全に復元される。 The transmitter and 100C, performs encryption of the plaintext by Bernoulli shift map which sets the random number seed to the initial value X 0 using a public key (S33), and transmits the ciphertext to the receiver 200C (S34). The receiving device 200C receives the cipher text from the transmitting device 100C, and calculates the inverse of the received cipher text using the random number seed as the reciprocal (S45). As a result, the encrypted text encrypted with the random number seed as the initial value is converted into the encrypted text whose initial value is 1 (an inverse encrypted text is obtained). The receiving apparatus 200C decrypts the inverse ciphertext into a plaintext by Bernoulli shift mapping using a secret key (S46). Thus, the plaintext before being encrypted in transmitting apparatus 100C is safely restored in receiving apparatus 200C.

図1Dに第5の実施形態に係る公開鍵暗号システムの構成を示す。本実施形態では、送信装置100Dに設けられた乱数種生成手段400Dは、暗号文の生成に際して乱数種の元となる元乱数種を1つ生成する。この元乱数種は、送信手段101を介して受信装置200Dへ与える。乱数種生成手段400Dは、平文の暗号化の毎に上記元乱数種に基づき所定のアルゴリズムで乱数種を生成し送信側初期値変更制御手段105を介して暗号化手段102Dへ与え、暗号化の初期値として用いさせる。   FIG. 1D shows a configuration of a public key cryptosystem according to the fifth embodiment. In the present embodiment, the random number seed generation means 400D provided in the transmission device 100D generates one elementary random number seed that is a source of the random number seed when generating the ciphertext. This original random number seed is provided to the receiving device 200D via the transmitting means 101. The random number seed generation means 400D generates a random number seed by a predetermined algorithm based on the original random number seed every time the plaintext is encrypted, and supplies the random number seed to the encryption means 102D via the transmission-side initial value change control means 105 to perform encryption. Let it be used as an initial value.

受信装置200Dでは、受信手段201Dにより受信された暗号化されている元乱数種は復号手段202Dへ送られて復号されて元乱数種とされる。上記受信装置200Dには、受信側乱数種生成手段208が備えられる。受信側乱数種生成手段208は、暗号文の復号毎に元乱数種に基づき乱数種生成手段400Dと同じアルゴリズムで乱数種を生成する。受信装置200Dでは、受信側乱数種生成手段208により生成された乱数種を用いて復号を行う。即ち、上記で生成された乱数種が逆元算出手段206へ与えられ、これを初期値として用いて上記暗号文の逆元を算出する。逆元の算出された暗号文は、復号手段202Dにより他の実施形態と同様にして復号され平文が得られる。   In the receiving device 200D, the encrypted original random number seed received by the receiving unit 201D is sent to the decrypting unit 202D and decrypted to be the original random number seed. The receiving device 200D includes a receiving-side random number seed generation unit 208. The receiving-side random number generation means 208 generates a random number seed by the same algorithm as the random number seed generation means 400D based on the original random number seed every time the encrypted text is decrypted. The receiving device 200D performs decoding using the random number seed generated by the receiving-side random number seed generation means 208. That is, the random number seed generated above is provided to the inverse element calculating means 206, and the inverse element of the ciphertext is calculated using the random number seed as an initial value. The ciphertext for which the inverse element has been calculated is decrypted by the decryption means 202D in the same manner as in the other embodiments, and a plaintext is obtained.

本第5の実施形態のポイントは、送信装置(送信者)から受信装置(受信者)へ送られる初期値X0を秘匿とすることにある。図1Bに示した第3の実施形態では送信装置が暗号文を受信装置に送付する度に乱数種(初期値X0)を生成して、それを公開鍵で暗号化して送信し、受信装置側は秘密鍵で復号を行い、乱数種(初期値X0)を入手することでお互いに秘匿の情報を共有するものであった。しかしながら、この実施形態によれば、通信の度に乱数を生成して暗号化と復号を公開鍵暗号方式で行うことは比較的時間がかかってしまう問題が生じる。 Point of the fifth embodiment is to the initial value X 0 sent from the transmitting device (the sender) to a receiving apparatus (receiver) and confidentiality. In the third embodiment shown in FIG. 1B, each time the transmitting device sends the ciphertext to the receiving device, a random number seed (initial value X 0 ) is generated, and the seed is encrypted with a public key and transmitted. The side performs decryption using a secret key and obtains a random number seed (initial value X 0 ) to share secret information with each other. However, according to this embodiment, there is a problem that it takes a relatively long time to generate a random number for each communication and perform encryption and decryption using a public key cryptosystem.

このため、この第5の実施形態では、最初の1回目だけお互い秘匿とする乱数である元乱数種を送受信し、2回目以降はその秘匿の乱数(元乱数種)を種にして秘密情報である初期値X0を生成すれば、毎回乱数種を送信装置が暗号化して送信する手間と、受信装置が暗号化された乱数種を受信して復号する手間が、削減できる。 For this reason, in the fifth embodiment, an original random number seed, which is a random number to be kept secret from each other only in the first time, is transmitted and received, and in the second and subsequent times, the secret random number (original random number seed) is used as a seed to generate secret information. By generating a certain initial value X 0 , it is possible to reduce the time and effort required for the transmitting apparatus to encrypt and transmit the random number seed each time and for the receiving apparatus to receive and decrypt the encrypted random number seed.

本実施形態のフローチャートを図15に示す。受信装置200Dにおいては、素数Pと素数Qを生成し、PとQから公開鍵N=PxQと公開鍵PKを作成し(S41)、公開鍵PKと公開鍵Nを送信者に送付する(S42)。更に、公開鍵Nと公開鍵PKから秘密鍵SKを生成する(S43)。送信装置100Dでは元乱数種を生成して(S31D)、受信装置200Dに送信する(S32D)。送信装置100Dと受信装置200Dは、予め秘匿の乱数種(1つ)を共有している。秘匿で共有するまでの手法に制限はないが、例えば、図1Cの第4の実施形態が暗号化毎の乱数種を共有した手法と同じ手法により、受信装置200Dへ送信を行っておくことができる。送信装置100Dと受信装置200Dは、同じアルゴリズムで乱数生成を行う。秘匿の乱数種と送信装置100Dで都度生成した乱数種を受信装置200Dと送信装置100Dで共有する同一の乱数生成アルゴリズムにて乱数種を変換(生成)する(S35、S47)。   FIG. 15 shows a flowchart of the present embodiment. The receiving device 200D generates a prime number P and a prime number Q, creates a public key N = PxQ and a public key PK from P and Q (S41), and sends the public key PK and the public key N to the sender (S42). ). Further, a secret key SK is generated from the public key N and the public key PK (S43). The transmitting device 100D generates an original random number seed (S31D) and transmits it to the receiving device 200D (S32D). The transmitting device 100D and the receiving device 200D share a secret random seed (one) in advance. There is no limitation on the method of sharing the information confidentially. For example, the method may be transmitted to the receiving device 200D in the same manner as the method of the fourth embodiment in FIG. 1C in which the random number seed for each encryption is shared. it can. The transmitting device 100D and the receiving device 200D generate random numbers using the same algorithm. The secret random number seed and the random number seed generated each time by the transmitting device 100D are converted (generated) by the same random number generation algorithm shared by the receiving device 200D and the transmitting device 100D (S35, S47).

変換した乱数種はベルヌーイシフト写像の初期値X0に設定して送信装置100Dは図1Dの暗号化手段102Dにより暗号化を行って(S33)、暗号文を受信装置200Dへ送信する(S34)。受信装置200Dでは、送信装置100Dから受信した元乱数種に基づき受信側乱数種生成手段208により乱数種を変換して(S47)、受信した暗号文を変換した乱数種で逆元を算出する(S45)。逆元演算の結果取得した暗号文は秘密鍵SKを用いて復号を行い平文を得る(S46)。このような構成を採ることで、通信の度に生成する乱数種を送信装置100Dで暗号化して受信装置200Dで復号するといった比較的計算コストの高い公開鍵暗号の計算を省くことができる。 The converted random number seed is set to the initial value X 0 of the Bernoulli shift mapping, and the transmitting device 100D performs encryption by the encryption means 102D of FIG. 1D (S33), and transmits the ciphertext to the receiving device 200D (S34). . In the receiving device 200D, the receiving-side random number seed generation means 208 converts the random number seed based on the original random number seed received from the transmitting device 100D (S47), and calculates the inverse with the random number seed obtained by converting the received cipher text (S47). S45). The ciphertext obtained as a result of the inverse operation is decrypted using the secret key SK to obtain a plaintext (S46). By adopting such a configuration, it is possible to omit the calculation of the public key cryptography, which has a relatively high calculation cost, such as encrypting the random number seed generated at every communication by the transmitting device 100D and decoding by the receiving device 200D.

受信装置200Dと送信装置100Dで共有する乱数生成アルゴリズムは、例えばベルヌーイシフト写像を用いる。この場合、秘匿の乱数を傾きの値にして送信装置100Dで生成した乱数種は初期値X0に設定し、所定回数(受信装置200Dと送信装置100Dで秘匿している乱数種が望ましい)を反復演算して変換した乱数種を求めることが考えられる。 The random number generation algorithm shared by the receiving device 200D and the transmitting device 100D uses, for example, Bernoulli shift mapping. In this case, the random number seed generated by the transmitting device 100D with the secret random number as the slope value is set to the initial value X 0 , and a predetermined number of times (preferably the random number seed concealed by the receiving device 200D and the transmitting device 100D) is used. It is conceivable to obtain a random number seed converted by an iterative operation.

また、近年インターネットから銀行の預金口座にアクセス(ログイン)する際にパスワードカードを利用するサービスが提供されている。ここで、サーバで生成される乱数とユーザが持つパスワードカードで生成される乱数は、時間を種として同じ乱数生成変換アルゴリズムから生成される。そして、常にサーバとユーザが持つパスワードカードの乱数が同期できるようお互い秘匿とする乱数として保持できる仕組みとなっており、このような乱数種を用いてもよい。   In recent years, a service that uses a password card when accessing (logging in) a bank account from the Internet has been provided. Here, the random number generated by the server and the random number generated by the password card possessed by the user are generated from the same random number generation conversion algorithm using time as a seed. Then, the random number of the password card held by the server and the random number of the password card held by the user are always held as random numbers to be kept secret so that they can be synchronized. Such a random number seed may be used.

上記第2〜5の実施形態によれば、初期値X0を送信の度(暗号文生成の度)に毎回初期ベクターとして変更を行ってベルヌーイシフト写像による平文の暗号化を行うので、毎回同じ平文(パスコード)でも通信上は異なる暗号文となるため、第三者(攻撃者)が同一の平文を通信していることが判らなくなり、安全性向上が期待できる。 According to the second to fifth embodiments, the plaintext is encrypted by the Bernoulli shift mapping by changing the initial value X 0 as the initial vector every time of transmission (every time ciphertext is generated). Even plaintext (passcode) is a different ciphertext in communication, so it is difficult to determine that a third party (attacker) is communicating the same plaintext, and an improvement in security can be expected.

以上のように、お互い秘匿の乱数種を共通鍵暗号の共通鍵として捕えると公開鍵暗号方式に共通鍵暗号方式を追加した安全性強度を持たせることができる。公開鍵の法Nの鍵長はコンピュータの処理性能の向上と共に安全性確保のため年々大きくなる傾向があるが公開鍵の鍵長が大きくなると演算コストも大きくなるため、公開鍵の長さを抑えて秘匿の乱数種を共通鍵として与えて安全性を確保する形態をとることで安全性の強度と演算コストをトレードオフする構成をとることができる。   As described above, if the mutually confidential random seeds are captured as the common key of the common key cryptosystem, it is possible to provide security strength in which the common key cryptosystem is added to the public key cryptosystem. The key length of the public key modulus N tends to increase year by year for the purpose of ensuring security along with the improvement of computer processing performance. However, as the key length of the public key increases, the operation cost also increases. By giving a secret random number seed as a common key to secure the security, a configuration can be made to trade off the strength of the security and the calculation cost.

RSA暗号では合同算術による演算を基礎とするが、本実施形態では、ベルヌーイシフト写像で演算することで除算剰余は不要となり、一回の引き算で行えるため演算コストを抑えることができる。また、式(4)の傾きAの値によって区間の分割数が決まる。そこで本実施形態では、暗号化処理において送信装置は平文を小分けにして平文(傾きA)の値を小さくすることによって区間の検索回数の演算コストを少なくしても良い。このため送信側は処理能力の低い携帯端末で暗号化を行い、受信側は処理能力の高いサーバで復号を行うといったパスコード認証のような形態に好適である。   The RSA cryptosystem is based on the operation based on joint arithmetic, but in the present embodiment, the operation is performed by Bernoulli shift mapping, so that the division remainder becomes unnecessary and the operation can be performed by one subtraction, so that the operation cost can be reduced. Further, the number of divisions of the section is determined by the value of the slope A in Expression (4). Therefore, in the present embodiment, in the encryption process, the transmitting device may reduce the value of the plaintext (slope A) by dividing the plaintext into small parts, thereby reducing the calculation cost of the number of search times of the section. For this reason, it is suitable for a form such as passcode authentication in which the transmitting side performs encryption with a portable terminal having low processing capability and the receiving side performs decryption with a server having high processing capability.

本実施形態では、ベルヌーイシフト写像の初期値X0を初期ベクターとして乱数種で変更する構成を採用している。このため、同じ平文を同じ公開鍵で暗号化すると乱数種に応じた毎回異なる暗号文を出力するようにでき、同じ平文を暗号化していると第三者に知られる可能性が低下し、安全性が高くなる効果が期待できる。また、本実施形態を、初期値X0となるお互い秘匿の乱数種を共通鍵暗号の共通鍵を用いるものであるとして捕えると、公開鍵暗号に追加して共通鍵暗号を追加した安全性強度を持たせる効果が期待できる。 This embodiment employs a configuration in which the initial value X 0 of the Bernoulli shift mapping is changed by a random number seed as an initial vector. For this reason, if the same plaintext is encrypted with the same public key, a different ciphertext can be output every time according to the random number seed. The effect that the property becomes high can be expected. Further, when the present embodiment regards the mutually confidential random number seeds having the initial value X 0 as those using the common key of the common key cryptosystem, the security strength obtained by adding the common key cryptosystem to the public key cryptosystem is added. Can be expected to have an effect.

公開鍵の法Nの鍵長はコンピュータの処理性能の向上と共に安全性確保のため年々大きくなる傾向がある。公開鍵の鍵長が大きくなると演算コストが高くなるため、本実施形態を、公開鍵の長さを抑えて秘匿の乱数種を共通鍵として採用するものであると見立てることで、安全性の強度と演算コストをトレードオフする構成をとることができるものである。   The key length of the public key modulus N tends to increase year by year for the purpose of improving security as well as improving computer processing performance. Since the operation cost increases as the key length of the public key increases, the present embodiment assumes that the length of the public key is reduced and the secret random number seed is adopted as the common key. And a configuration that trades off operation cost.

100、100A、100B、100C、100D 送信装置
101 送信手段
102、102B、102C、102D 暗号化手段
105 送信側初期値変更制御手段
200、200A、200B、200C、200D 受信装置
201 受信手段
202、202B、202C、202D 復号手段
203 公開鍵生成手段
204 秘密鍵生成手段
205 受信側初期値変更制御手段
206 逆元算出手段
208 受信側乱数種生成手段
300 伝送路
400、400D 乱数種生成手段
100, 100A, 100B, 100C, 100D Transmission device 101 Transmission means 102, 102B, 102C, 102D Encryption means 105 Transmission-side initial value change control means 200, 200A, 200B, 200C, 200D Receiving device 201 Receiving means 202, 202B 202C, 202D Decryption means 203 Public key generation means 204 Private key generation means 205 Reception-side initial value change control means 206 Inverse element calculation means 208 Reception-side random number seed generation means 300 Transmission path 400, 400D Random number seed generation means

Claims (17)

公開鍵を用いて平文を暗号化し暗号文を送る送信装置と、送信された暗号文を受信し、前記公開鍵に対応する秘密鍵を用いて復号し平文へ戻す受信装置とを備える公開鍵暗号システムにおいて、
前記送信装置は、前記公開鍵を用いてベルヌーイシフト写像を実行して平文を暗号文へ変換する暗号化手段を備えており、
前記受信装置は、前記秘密鍵を用いてベルヌーイシフト写像を実行して暗号文を平文へ変換する復号手段を備えていることを特徴とする公開鍵暗号システム。
A public key cryptosystem comprising: a transmitting device that encrypts a plaintext using a public key and sends the ciphertext; and a receiving device that receives the transmitted ciphertext, decrypts the encrypted text using a secret key corresponding to the public key, and returns the plaintext. In the system,
The transmitting device includes an encryption unit that performs a Bernoulli shift mapping using the public key and converts a plaintext into a ciphertext.
The public key cryptosystem according to claim 1, wherein the receiving device includes a decryption unit that performs a Bernoulli shift mapping using the secret key to convert a ciphertext into a plaintext.
前記送信装置が、ベルヌーイシフト写像の初期値を暗号化の度に変更する送信側初期値変更制御手段を備えており、
前記受信装置が、暗号文を復号する度にベルヌーイシフト写像の初期値を、前記送信側初期値変更制御手段によって変更された初期値と同じ値に変更する受信側初期値変更制御手段と、前記受信側初期値変更制御手段により変更された初期値を用いて前記暗号文の逆元を算出する逆元算出手段とが備えられていることを特徴とする請求項1に記載の公開鍵暗号システム。
The transmission device, comprises a transmission-side initial value change control means to change the initial value of the Bernoulli shift mapping for each encryption,
The receiving apparatus, the receiving-side initial value change control unit that changes the initial value of the Bernoulli shift mapping to the same value as the initial value changed by the transmitting-side initial value change control unit every time the ciphertext is decrypted, 2. The public key cryptosystem according to claim 1, further comprising: an inverse element calculating means for calculating an inverse element of the cipher text using an initial value changed by a receiving-side initial value change control means. .
前記初期値となる乱数種を生成する乱数種生成手段を有し、
前記暗号化手段は、前記乱数種生成手段により生成された乱数種と前記公開鍵を用いてベルヌーイシフト写像を実行して平文を暗号文へ変換し、
前記受信装置には、前記暗号文を前記乱数種生成手段により生成された乱数種を用いて前記暗号文の逆元を算出する逆元算出手段が備えられ、
前記復号手段は、前記逆元算出手段により算出された逆元に対し、ベルヌーイシフト写像を実行して暗号文を平文へ変換することを特徴とする請求項2に記載の公開鍵暗号システム。
Having a random number seed generating means for generating a random number seed to be the initial value,
The encryption unit converts a plaintext into a ciphertext by executing a Bernoulli shift mapping using the random number seed generated by the random number seed generation unit and the public key,
The receiving device includes inverse element calculating means for calculating the inverse of the cipher text using the random number seed generated by the random number seed generating means for the cipher text,
3. The public key cryptosystem according to claim 2, wherein the decryption unit converts the ciphertext into a plaintext by executing Bernoulli shift mapping on the inverse calculated by the inverse calculation unit.
前記乱数種生成手段は、暗号文の生成毎に新たな乱数種を生成し、前記送信側初期値変更制御手段及び前記受信側初期値変更制御手段へ与えることを特徴とする請求項3に記載の公開鍵暗号システム。   4. The method according to claim 3, wherein the random number seed generation means generates a new random number seed every time a ciphertext is generated, and supplies the random number seed to the transmission-side initial value change control means and the reception-side initial value change control means. Public key cryptosystem. 前記乱数種生成手段は前記送信装置に設けられ、この送信装置では生成した乱数種を前記公開鍵を用いて前記暗号化手段においてベルヌーイシフト写像を実行して暗号化し、暗号化した乱数種を前記受信装置へ送り、
前記受信装置では、受信した暗号化された乱数種を前記復号手段で復号して用いることを特徴とする請求項4に記載の公開鍵暗号システム。
The random number seed generating means is provided in the transmitting device, and the transmitting device encrypts the generated random number seed by executing Bernoulli shift mapping in the encrypting means using the public key, and encrypts the random number seed. Send to the receiving device,
5. The public key cryptosystem according to claim 4, wherein the receiving device decrypts and uses the received encrypted random number seed by the decryption unit.
前記乱数種生成手段は、暗号文の生成に際して乱数種の元となる元乱数種を1つ生成し、この元乱数種に基づき新たな乱数種を暗号文の生成毎に生成して前記送信側初期値変更制御手段へ与える一方、前記受信装置へは前記元乱数種を与える処理を行い、
前記受信装置には、暗号文の復号毎に元乱数種に基づき前記乱数種生成手段によって生成される前記新たな乱数種と同期した乱数種を生成する受信側乱数種生成手段が備えられ、この受信側乱数種生成手段により生成された乱数種を前記逆元算出手段へ与えて逆元算出を行うことを特徴とする請求項3に記載の公開鍵暗号システム。
The random number seed generation means generates one original random number seed that is a source of the random number seed when generating the ciphertext, generates a new random number seed based on the original random seed every time the ciphertext is generated, and While giving to the initial value change control means, the receiving device performs a process of giving the original random seed,
The receiving device includes a receiving-side random number seed generation unit that generates a random number seed synchronized with the new random number seed generated by the random number seed generation unit based on the original random number seed every time a ciphertext is decrypted. 4. The public key cryptosystem according to claim 3, wherein the random number seed generated by the receiving random number seed generation means is given to the inverse element calculation means to calculate an inverse element.
前記公開鍵を生成する公開鍵生成手段が、前記受信装置に設けられていることを特徴とする請求項1乃至6のいずれか1項に記載の公開鍵暗号システム。   The public key cryptosystem according to any one of claims 1 to 6, wherein a public key generating means for generating the public key is provided in the receiving device. 前記秘密鍵を生成する秘密鍵生成手段が、前記受信装置に設けられていることを特徴とする請求項1乃至7のいずれか1項に記載の公開鍵暗号システム。   The public key cryptosystem according to any one of claims 1 to 7, wherein a secret key generating means for generating the secret key is provided in the receiving device. 公開鍵を用いて平文を暗号化し暗号文を送る送信装置と、送信された暗号文を受信し、前記公開鍵に対応する秘密鍵を用いて復号し平文へ戻す受信装置とを備える公開鍵暗号システムにより実行される公開鍵暗号方法において、
前記送信装置では、前記公開鍵を用いてベルヌーイシフト写像を実行して平文を暗号文へ変換する暗号化ステップを備えており、
前記受信装置では、前記秘密鍵を用いてベルヌーイシフト写像を実行して暗号文を平文へ変換する復号ステップを備えていることを特徴とする公開鍵暗号方法。
A public key cryptosystem comprising: a transmitting device that encrypts a plaintext using a public key and sends the ciphertext; and a receiving device that receives the transmitted ciphertext, decrypts the encrypted text using a secret key corresponding to the public key, and returns the plaintext. In the public key encryption method performed by the system,
The transmitting device includes an encryption step of performing a Bernoulli shift mapping using the public key to convert a plaintext to a ciphertext,
A public key encryption method, comprising: a decryption step of performing a Bernoulli shift mapping using the secret key to convert a ciphertext into a plaintext.
前記送信装置には、ベルヌーイシフト写像の初期値を暗号化の度に変更する送信側初期値変更制御ステップが備えられており、
前記受信装置には、暗号文を復号する度にベルヌーイシフト写像の初期値を、前記送信側初期値変更制御手段によって変更された初期値と同じ値に変更する受信側初期値変更制御ステップと、前記受信側初期値変更制御ステップにより変更された初期値を用いて前記暗号文の逆元を算出する逆元算出ステップとが備えられていることを特徴とする請求項9に記載の公開鍵暗号方法。
The transmission device includes a transmission-side initial value change control step of changing the initial value of the Bernoulli shift mapping for each encryption,
The receiving device, the initial value of the Bernoulli shift mapping each time a ciphertext is decrypted, a receiving-side initial value change control step of changing to the same value as the initial value changed by the transmitting-side initial value change control unit, The public key cryptosystem according to claim 9, further comprising: an inverse element calculating step of calculating an inverse element of the cipher text using an initial value changed by the receiving side initial value change control step. Method.
前記初期値となる乱数種を生成する乱数種生成ステップを有し、
前記暗号化ステップでは、前記乱数種生成ステップにより生成された乱数種と前記公開鍵を用いてベルヌーイシフト写像を実行して平文を暗号文へ変換し、
前記受信装置には、前記暗号文を前記乱数種生成ステップにより生成された乱数種を用いて前記暗号文の逆元を算出する逆元算出ステップが備えられ、
前記復号ステップは、前記逆元算出ステップにより算出された逆元に対し、ベルヌーイシフト写像を実行して暗号文を平文へ変換することを特徴とする請求項10に記載の公開鍵暗号方法。
Having a random number seed generation step of generating a random number seed to be the initial value,
In the encrypting step, by using the random number seed generated in the random number seed generating step and the public key, performs a Bernoulli shift mapping to convert a plaintext into a ciphertext,
The receiving device includes an inverse element calculating step of calculating the inverse of the cipher text using the random number seed generated by the random number seed generating step for the cipher text,
The public key encryption method according to claim 10, wherein the decryption step performs a Bernoulli shift mapping on the inverse calculated by the inverse calculation step to convert a ciphertext into a plaintext.
前記乱数種生成ステップでは、暗号文の生成毎に新たな乱数種を生成し、前記送信側初期値変更制御ステップ及び前記受信側初期値変更制御ステップへ与えることを特徴とする請求項11に記載の公開鍵暗号方法。   The method according to claim 11, wherein in the random number seed generation step, a new random number seed is generated every time a ciphertext is generated, and is provided to the transmission-side initial value change control step and the reception-side initial value change control step. Public key cryptography. 前記乱数種生成ステップは前記送信装置に設けられ、この送信装置では生成した乱数種を前記公開鍵を用いて前記暗号化手段においてベルヌーイシフト写像を実行して暗号化し、暗号化した乱数種を前記受信装置へ送るステップを有し、
前記受信装置では、受信した暗号化された乱数種を前記復号ステップで復号して用いることを特徴とする請求項12に記載の公開鍵暗号方法。
The random number seed generating step is provided in the transmitting device, and the transmitting device encrypts the generated random number seed by executing Bernoulli shift mapping in the encryption unit using the public key, and encrypts the random number seed. Sending to a receiving device,
The public key encryption method according to claim 12, wherein the receiving device decrypts and uses the received encrypted random number seed in the decrypting step.
前記乱数種生成ステップは、暗号文の生成に際して乱数種の元となる元乱数種を1つ生成し、この元乱数種に基づき新たな乱数種を暗号文の生成毎に生成して前記送信側初期値変更制御ステップへ与える一方、前記受信装置へは前記元乱数種を与える処理を行い、
前記受信装置には、暗号文の復号毎に元乱数種に基づき前記乱数種生成ステップによって生成される前記新たな乱数種と同期した乱数種を生成する受信側乱数種生成ステップが備えられ、この受信側乱数種生成ステップにより生成された乱数種を前記逆元算出ステップへ与えて逆元算出を行うことを特徴とする請求項11に記載の公開鍵暗号方法。
The random number seed generation step includes generating one elemental random number seed that is a source of the random number seed when generating the ciphertext, generating a new random number seed based on the original random number seed for each generation of the ciphertext, and While giving to the initial value change control step, the receiving device performs a process of giving the original random seed,
The receiving apparatus includes a receiving-side random number seed generation step of generating a random number seed synchronized with the new random number seed generated by the random number seed generation step based on the original random number seed every time a ciphertext is decrypted. The public key encryption method according to claim 11, wherein the random number seed generated in the receiving-side random number seed generation step is given to the inverse element calculation step to calculate the inverse element.
前記公開鍵を生成する公開鍵生成ステップが、前記受信装置に設けられていることを特徴とする請求項9乃至14のいずれか1項に記載の公開鍵暗号方法。   The public key encryption method according to claim 9, wherein the public key generation step of generating the public key is provided in the receiving device. 前記秘密鍵を生成する秘密鍵生成ステップが、前記受信装置に設けられていることを特徴とする請求項9乃至15のいずれか1項に記載の公開鍵暗号方法。   The public key encryption method according to any one of claims 9 to 15, wherein a secret key generation step of generating the secret key is provided in the receiving device. 公開鍵暗号システムのコンピュータを請求項1乃至8の各手段として機能させることを特徴とする公開鍵暗号プログラム。   A public key encryption program for causing a computer of a public key encryption system to function as each of the means of claim 1.
JP2018180880A 2018-09-26 2018-09-26 Public key cryptosystem, public key cryptosystem, public key crypto program Active JP7023584B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018180880A JP7023584B2 (en) 2018-09-26 2018-09-26 Public key cryptosystem, public key cryptosystem, public key crypto program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018180880A JP7023584B2 (en) 2018-09-26 2018-09-26 Public key cryptosystem, public key cryptosystem, public key crypto program

Publications (2)

Publication Number Publication Date
JP2020052215A true JP2020052215A (en) 2020-04-02
JP7023584B2 JP7023584B2 (en) 2022-02-22

Family

ID=69996953

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018180880A Active JP7023584B2 (en) 2018-09-26 2018-09-26 Public key cryptosystem, public key cryptosystem, public key crypto program

Country Status (1)

Country Link
JP (1) JP7023584B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022056275A (en) * 2020-09-29 2022-04-08 東芝情報システム株式会社 Cryptographic decryption system, cryptographic decryption method, and cryptographic decryption program
CN116992204A (en) * 2023-09-26 2023-11-03 蓝象智联(杭州)科技有限公司 Data point multiplication operation method based on privacy protection

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4086661B2 (en) 2001-01-22 2008-05-14 株式会社進化システム総合研究所 Arithmetic compression encryption device and arithmetic compression encryption / decryption device
EP1467512B1 (en) 2003-04-07 2008-07-23 STMicroelectronics S.r.l. Encryption process employing chaotic maps and digital signature process

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
IPUSHIRON, 暗号技術のすべて, JPN6021012953, 3 August 2017 (2017-08-03), pages 278 - 283, ISSN: 0004588693 *
ジョー・セルコ, プログラマのためのSQLグラフ原論, JPN6021012962, 25 August 2016 (2016-08-25), pages 215 - 271, ISSN: 0004588696 *
ブルース・シュナイアー, 暗号技術大全, JPN6021012958, 6 June 2003 (2003-06-06), pages 273 - 276, ISSN: 0004588695 *
森田 光: "公開鍵系演算の高速化方式", NTT R&D, vol. 平成11年11月号, JPN6021012955, 10 November 1999 (1999-11-10), pages 785 - 5, ISSN: 0004588694 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022056275A (en) * 2020-09-29 2022-04-08 東芝情報システム株式会社 Cryptographic decryption system, cryptographic decryption method, and cryptographic decryption program
JP7406108B2 (en) 2020-09-29 2023-12-27 東芝情報システム株式会社 Encryption/decryption system, encryption/decryption method, and encryption/decryption program
CN116992204A (en) * 2023-09-26 2023-11-03 蓝象智联(杭州)科技有限公司 Data point multiplication operation method based on privacy protection
CN116992204B (en) * 2023-09-26 2023-12-29 蓝象智联(杭州)科技有限公司 Data point multiplication operation method based on privacy protection

Also Published As

Publication number Publication date
JP7023584B2 (en) 2022-02-22

Similar Documents

Publication Publication Date Title
JP6720424B1 (en) Key sharing device and method
EP2882132B1 (en) Encryption device, decryption device, encryption method, decryption method, and program
JP5297688B2 (en) Vector concealed inner product calculation system, vector concealed inner product calculation method, and encryption key sharing system
US10673631B2 (en) Elliptic curve isogeny-based cryptographic scheme
Keerthi et al. Elliptic curve cryptography for secured text encryption
EP1467512A1 (en) Encryption process employing chaotic maps and digital signature process
Reyad Text message encoding based on elliptic curve cryptography and a mapping methodology
JP2011164607A (en) Method and system for privacy-preserving computation of edit distance of symbol sequence
Agrawal et al. Elliptic curve cryptography with hill cipher generation for secure text cryptosystem
Mandal et al. Designing and performance analysis of a proposed symmetric cryptography algorithm
KR100989185B1 (en) A password authenticated key exchange method using the RSA
US6480606B1 (en) Elliptic curve encryption method and system
Amounas et al. ECC encryption and decryption with a data sequence
JP7023584B2 (en) Public key cryptosystem, public key cryptosystem, public key crypto program
Das et al. An efficient method for text encryption using elliptic curve cryptography
Pandey et al. An RNS implementation of the elliptic curve cryptography for IoT security
Li et al. Privacy-preserving large-scale systems of linear equations in outsourcing storage and computation
CN102246456A (en) System and method for countering side-channel attacks against encryption based on cyclic groups
Huang et al. Fast scalar multiplication for elliptic curve cryptography in sensor networks with hidden generator point
Manajaih Modular arithmetic in RSA cryptography
Akhter A novel Elliptic Curve Cryptography scheme using random sequence
Raharinirina Use of signed permutations in cryptography
Ganpati et al. A Survey of Different Public-Key Cryptosystems
Luma et al. Relationship between Fibonacci and Lucas sequences and their application in Symmetric Cryptosystems
JPH1152854A (en) Arithmetic unit device on finite field and group computing device on elliptic curve

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200713

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210413

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210614

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210907

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211104

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220208

R150 Certificate of patent or registration of utility model

Ref document number: 7023584

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150