JP4550232B2 - Arithmetic apparatus, arithmetic method, and computer-readable recording medium recording program - Google Patents
Arithmetic apparatus, arithmetic method, and computer-readable recording medium recording program Download PDFInfo
- Publication number
- JP4550232B2 JP4550232B2 JP2000205635A JP2000205635A JP4550232B2 JP 4550232 B2 JP4550232 B2 JP 4550232B2 JP 2000205635 A JP2000205635 A JP 2000205635A JP 2000205635 A JP2000205635 A JP 2000205635A JP 4550232 B2 JP4550232 B2 JP 4550232B2
- Authority
- JP
- Japan
- Prior art keywords
- coordinate
- array element
- numerical value
- read
- prime number
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、楕円曲線上の点の演算方法およびそれを用いた暗号化方法に関する。
【0002】
【従来の技術】
従来の楕円曲線上の点の演算方法について説明する。従来の楕円曲線上の点の演算方法は、Koblitz著、“A Course in Number Theory and Cryptography”、springer、(1994)に記載されている。また、楕円曲線を用いた暗号化方法については、岡本龍明、山本博資著、“現代暗号”、産業図書(1997)に記載されている。
【0003】
まず本発明の技術的背景である公開鍵暗号、離散対数問題および楕円曲線について簡単に説明する。公開鍵暗号通信においては、利用者ごとに秘密鍵xと公開鍵yの組が用意され、秘密鍵xは、各利用者が秘密に保持しておく。公開鍵yは利用者自身以外の一般に公開する。利用者Bが利用者Aに秘密にデータを送りたい時は、利用者Bは利用者Aに対応する公開鍵yを用いてデータを暗号化する。
この暗号文は、秘密鍵xを知る利用者Aにしか復号できない。
離散対数問題とは群G(加法が定義されているものとする)の2つの要素g1,g2に対して、g1=mg2を満たすようなmを求める問題である。群Gの要素の数が大きい場合、離散対数問題を解くことは、計算量的に非常に困難になることが知られている。この事実を利用して公開鍵暗号を設計することができる。
素体Fp上の楕円曲線Eとは、y2=x3+ax+b mod pと表される方程式である。楕円曲線上の有理点集合E(Fp)には加法が定義され、群となる。
【0004】
図5、図6は、従来の楕円曲線の演算方法を示すフローチャートである。図5は、素体上定義された楕円曲線において、アファイン座標系で2倍点を計算する方法、図6は、素体上定義された楕円曲線において、重み付き射影座標系で2倍点を計算する方法を示すフローチャートである。図5において、まず楕円曲線(のパラメータ)と曲線上の点P1が入力される。S501はλを計算するステップ、S502はx2を計算するステップ、S503はy2を計算するステップであり、P1の2倍点P2が出力される。図6において、まず楕円曲線(のパラメータ)と曲線上の点P1が入力される。S601はMを計算するステップ、S602はZ2を計算するステップ、S603はSを計算するステップ、S604はX2を計算するステップ、S605はTを計算するステップ、S606はY2を計算するステップであり、P1の2倍点P2が出力される。
【0005】
次に動作を説明する。まずアファイン座標系における2倍点の計算方法を図5に基づいて説明する。素体Fp上の楕円曲線E:y2=x3+ax+b mod pとE上の点P1=(x1,y1)がまず入力される。各ステップにおける演算は全て定義体Fp上の演算となる。この方法の演算量は、自乗算2回、乗算2回、逆元算1回である。
次に重み付き射影座標系における2倍点の計算方法を図6に基づいて説明する。素体Fp上の楕円曲線E:y2=x3+ax+b mod pとE上の点P1=(X1,Y1,Z1)がまず入力される。各ステップにおける演算は全て定義体Fp上の演算となる。この方法の演算量は、自乗算6回、乗算4回である。
【0006】
【発明が解決しようとする課題】
従来の素体Fp上の楕円曲線の2倍点の計算方法は、以上のように構成されており、4倍点や8倍点、一般に2k倍点を直接計算する方法が与えられていない。従って、例えば4倍点を計算するためには、2倍算を2回繰り返さなければならず、演算量が多いという課題があった。特に、アファイン座標系における演算では、2倍算1回に対して定義体上の逆元算が1回必要である。一般に逆元算は乗算と比較して計算量が多い。
【0007】
本発明の目的は、係る課題を解決するためになされたもので、2k倍点計算する時に、2倍算をk回繰り返すことなく直接計算し、高速な演算方法を得ることにある。
【0008】
【課題を解決するための手段】
この発明に係る演算装置は、以下の式で表わされ、素体Fp上定義された楕円曲線E上の点P1=(x1,y1)を、アファイン座標系において2k倍(kは2以上の整数)した点P2 k=(x2 k,y2 k)を求める演算装置であって、以下の要素を有することを特徴とする。
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標x1及び座標y1と、整数kとを入力する入力手段、
(2)入力された素数pと、元aと、元bと、座標x1と、座標y1と、整数kとを記憶する記憶手段、
(3)座標x1と、素数pとを読み出し、以下の式により、配列要素A1を求めるA1演算手段、
A1=x1 mod p
(4)求めた配列要素A1を記憶するA1記憶手段、
(5)座標x1と、元aと、素数pとを読み出し、以下の式により、配列要素B1を求めるB1演算手段、
B1=3x1 2+a mod p
(6)求めた配列要素B1を記憶するB1記憶手段、
(7)座標y1と、素数pとを読み出し、以下の式により、配列要素C1を求めるC1演算手段、
C1=−y1 mod p
(8)求めた配列要素C1を記憶するC1記憶手段、
(9)変数iを記憶するi記憶手段、
(10)i記憶手段に、変数iの初期値2を設定するi初期値設定手段、
(11)整数kと、変数iとを読み出し、変数iが整数kに達するまで変数iに順次1を加えて、i記憶手段に設定するiインクリメント手段、
(12)i記憶手段に変数iが設定される度に、変数iと、素数pとを読み出し、更に、読み出した変数iにより特定される配列要素Ai-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Aiを求めるAi演算手段、
Ai=Bi-1 2−8Ai-1Ci-1 2 mod p
(13)求めた配列要素Aiを記憶するAi記憶手段、
(14)i記憶手段に変数iが設定される度に、変数iと、元aと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素Aiと、配列要素C1からCi-1を読み出し、以下の式により、配列要素Biを求めるBi演算手段、
【数10】
(15)求めた配列要素Biを記憶するBi記憶手段、
(16)i記憶手段に変数iが設定される度に、変数iと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素AiとAi-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Ciを求めるCi演算手段、
Ci=−8Ci-1 4−Bi-1(Ai−4Ai-1Ci-1 2) mod p
(17)求めた配列要素Ciを記憶するCi記憶手段、
(18)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素Ckとを読み出し、以下の式により、数値Dkを求めるDk演算手段、
Dk=12AkCk 2−Bk 2 mod p
(19)求めた数値Dkを記憶するDk記憶手段、
(20)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素C1からCkとを読み出し、以下の式により、座標x2 kを求めるx2 k演算手段、
【数11】
(21)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Bkと、配列要素C1からCkと、配列要素Dkとを読み出し、以下の式により、座標y2 kを求めるy2 k演算手段、
【数12】
(22)求めた座標x2 kと、座標y2 kとを出力する出力手段。
【0009】
この発明に係る演算装置は、以下の式で表わされ、素体Fp上定義された楕円曲線E上の点P1=(X1,Y1,Z1)を、重み付き射影座標系において4倍した点P4=(X4,Y4,Z4)を求める演算装置であって、以下の要素を有することを特徴とする。
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標X1、座標Y1及び座標Z1とを入力する入力手段、
(2)入力された素数pと、元aと、元bと、座標X1と、座標Y1と、座標Z1とを記憶する記憶手段、
(3)元aと、座標X1と、座標Z1と、素数pとを読み出し、以下の式により、数値Aを求めるA演算手段、
A= 3X1 2+aZ1 4 mod p
(4)求めた数値Aを記憶するA記憶手段、
(5)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Bを求めるB演算手段、
B=A2−8X1Y1 2 mod p
(6)求めた数値Bを記憶するB記憶手段、
(7)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Cを求めるC演算手段、
C=−8Y1 4+A(12X1Y1 2−A2) mod p
(8)求めた数値Cを記憶するC記憶手段、
(9)元aと、数値Bと、座標Y1と、座標Z1と、素数pとを読み出し、以下の式により、数値Dを求めるD演算手段、
D=16aY1 4Z1 4+3B2 mod p
(10)求めた数値Dを記憶するD記憶手段、
(11)数値B、数値C、数値Dと、素数pとを読み出し、以下の式により、座標X4を求めるX4演算手段、
X4=−8BC2+D2 mod p
(12)数値B、数値C、数値Dと、素数pを読み出し、以下の式により、座標Y4を求めるY4演算手段、
Y4=−8C4+D(12BC2−D2) mod p
(13)座標Y1と、座標Z1と、数値Cと、素数pとを読み出し、以下の式により、座標Z4を求めるZ4演算手段、
Z4=4Y1Z1C mod p
(14)求めた座標X4と、座標Y4と、座標Z4を出力する出力手段。
【0010】
この発明に係る演算方法は、以下の式で表わされ、素体Fp上定義された楕円曲線E上の点P1=(x1,y1)を、アファイン座標系において2k倍(kは2以上の整数)した点P2 k=(x2 k,y2 k)を求める演算方法であって、以下の要素を有することを特徴とする。
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標x1及び座標y1と、整数kとを入力する入力工程、
(2)入力された素数pと、元aと、元bと、座標x1と、座標y1と、整数kとを記憶する記憶工程、
(3)座標x1と、素数pとを読み出し、以下の式により、配列要素A1を求めるA1演算工程、
A1=x1 mod p
(4)求めた配列要素A1を記憶するA1記憶工程、
(5)座標x1と、元aと、素数pとを読み出し、以下の式により、配列要素B1を求めるB1演算工程、
B1=3x1 2+a mod p
(6)求めた配列要素B1を記憶するB1記憶工程、
(7)座標y1と、素数pとを読み出し、以下の式により、配列要素C1を求めるC1演算工程、
C1=−y1 mod p
(8)求めた配列要素C1を記憶するC1記憶工程、
(9)変数iの初期値2を設定するi初期値設定工程、
(10)整数kと、変数iとを読み出し、変数iが整数kに達するまで変数iに順次1を加えて、設定するiインクリメント工程、
(11)変数iが設定される度に、変数iと、素数pとを読み出し、更に、読み出した変数iにより特定される配列要素Ai-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Aiを求めるAi演算工程、
Ai=Bi-1 2−8Ai-1Ci-1 2 mod p
(12)求めた配列要素Aiを記憶するAi記憶工程、
(13)変数iが設定される度に、変数iと、元aと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素Aiと、配列要素C1からCi-1を読み出し、以下の式により、配列要素Biを求めるBi演算工程、
【数13】
(14)求めた配列要素Biを記憶するBi記憶工程、
(15)変数iが設定される度に、変数iと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素AiとAi-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Ciを求めるCi演算工程、
Ci=−8Ci-1 4−Bi-1(Ai−4Ai-1Ci-1 2) mod p
(16)求めた配列要素Ciを記憶するCi記憶工程、
(17)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素Ckとを読み出し、以下の式により、数値Dkを求めるDk演算工程、
Dk=12AkCk 2−Bk 2 mod p
(18)求めた数値Dkを記憶するDk記憶工程、
(19)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素C1からCkとを読み出し、以下の式により、座標x2 kを求めるx2 k演算工程、
【数14】
(20)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Bkと、配列要素C1からCkと、配列要素Dkとを読み出し、以下の式により、座標y2 kを求めるy2 k演算工程、
【数15】
(21)求めた座標x2 kと、座標y2 kとを出力する出力工程。
【0011】
この発明に係る演算方法は、以下の式で表わされ、素体Fp上定義された楕円曲線E上の点P1=(X1,Y1,Z1)を、重み付き射影座標系において4倍した点P4=(X4,Y4,Z4)を求める演算方法であって、以下の要素を有することを特徴とする。
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標X1、座標Y1及び座標Z1とを入力する入力工程、
(2)入力された素数pと、元aと、元bと、座標X1と、座標Y1と、座標Z1とを記憶する記憶工程、
(3)元aと、座標X1と、座標Z1と、素数pとを読み出し、以下の式により、数値Aを求めるA演算工程、
A= 3X1 2+aZ1 4 mod p
(4)求めた数値Aを記憶するA記憶工程、
(5)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Bを求めるB演算工程、
B=A2−8X1Y1 2 mod p
(6)求めた数値Bを記憶するB記憶工程、
(7)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Cを求めるC演算工程、
C=−8Y1 4+A(12X1Y1 2−A2) mod p
(8)求めた数値Cを記憶するC記憶工程、
(9)元aと、数値Bと、座標Y1と、座標Z1と、素数pとを読み出し、以下の式により、数値Dを求めるD演算工程、
D=16aY1 4Z1 4+3B2 mod p
(10)求めた数値Dを記憶するD記憶工程、
(11)数値B、数値C、数値Dと、素数pとを読み出し、以下の式により、座標X4を求めるX4演算工程、
X4=−8BC2+D2 mod p
(12)数値B、数値C、数値Dと、素数pを読み出し、以下の式により、座標Y4を求めるY4演算工程、
Y4=−8C4+D(12BC2−D2) mod p
(13)座標Y1と、座標Z1と、数値Cと、素数pとを読み出し、以下の式により、座標Z4を求めるZ4演算工程、
Z4=4Y1Z1C mod p
(14)求めた座標X4と、座標Y4と、座標Z4を出力する出力工程。
【0012】
この発明に係るプログラムを記録したコンピュータ読み取り可能な記録媒体は、以下の式で表わされ、素体Fp上定義された楕円曲線E上の点P1=(x1,y1)を、アファイン座標系において2k倍(kは2以上の整数)した点P2 k=(x2 k,y2 k)を求める演算装置となるコンピュータに、以下の処理を実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体であることを特徴とする。
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標x1及び座標y1と、整数kとを入力する入力処理、
(2)入力された素数pと、元aと、元bと、座標x1と、座標y1と、整数kとを記憶する記憶処理、
(3)座標x1と、素数pとを読み出し、以下の式により、配列要素A1を求めるA1演算処理、
A1=x1 mod p
(4)求めた配列要素A1を記憶するA1記憶処理、
(5)座標x1と、元aと、素数pとを読み出し、以下の式により、配列要素B1を求めるB1演算処理、
B1=3x1 2+a mod p
(6)求めた配列要素B1を記憶するB1記憶処理、
(7)座標y1と、素数pとを読み出し、以下の式により、配列要素C1を求めるC1演算処理、
C1=−y1 mod p
(8)求めた配列要素C1を記憶するC1記憶処理、
(9)変数iの初期値2を設定するi初期値設定処理、
(10)整数kと、変数iとを読み出し、変数iが整数kに達するまで変数iに順次1を加えて、設定するiインクリメント処理、
(11)変数iが設定される度に、変数iと、素数pとを読み出し、更に、読み出した変数iにより特定される配列要素Ai-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Aiを求めるAi演算処理、
Ai=Bi-1 2−8Ai-1Ci-1 2 mod p
(12)求めた配列要素Aiを記憶するAi記憶処理、
(13)変数iが設定される度に、変数iと、元aと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素Aiと、配列要素C1からCi-1を読み出し、以下の式により、配列要素Biを求めるBi演算処理、
【数16】
(14)求めた配列要素Biを記憶するBi記憶処理、
(15)変数iが設定される度に、変数iと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素AiとAi-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Ciを求めるCi演算処理、
Ci=−8Ci-1 4−Bi-1(Ai−4Ai-1Ci-1 2) mod p
(16)求めた配列要素Ciを記憶するCi記憶処理、
(17)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素Ckとを読み出し、以下の式により、数値Dkを求めるDk演算処理、
Dk=12AkCk 2−Bk 2 mod p
(18)求めた数値Dkを記憶するDk記憶処理、
(19)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素C1からCkとを読み出し、以下の式により、座標x2 kを求めるx2 k演算処理、
【数17】
(20)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Bkと、配列要素C1からCkと、配列要素Dkとを読み出し、以下の式により、座標y2 kを求めるy2 k演算処理、
【数18】
(21)求めた座標x2 kと、座標y2 kとを出力する出力処理。
【0013】
この発明に係るプログラムを記録したコンピュータ読み取り可能な記録媒体は、以下の式で表わされ、素体Fp上定義された楕円曲線E上の点P1=(X1,Y1,Z1)を、重み付き射影座標系において4倍した点P4=(X4,Y4,Z4)を求める演算装置となるコンピュータに、以下の処理を実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体であることを特徴とする。
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標X1、座標Y1及び座標Z1とを入力する入力処理、
(2)入力された素数pと、元aと、元bと、座標X1と、座標Y1と、座標Z1とを記憶する記憶処理、
(3)元aと、座標X1と、座標Z1と、素数pとを読み出し、以下の式により、数値Aを求めるA演算処理、
A= 3X1 2+aZ1 4 mod p
(4)求めた数値Aを記憶するA記憶処理、
(5)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Bを求めるB演算処理、
B=A2−8X1Y1 2 mod p
(6)求めた数値Bを記憶するB記憶処理、
(7)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Cを求めるC演算処理、
C=−8Y1 4+A(12X1Y1 2−A2) mod p
(8)求めた数値Cを記憶するC記憶処理、
(9)元aと、数値Bと、座標Y1と、座標Z1と、素数pとを読み出し、以下の式により、数値Dを求めるD演算処理、
D=16aY1 4Z1 4+3B2 mod p
(10)求めた数値Dを記憶するD記憶処理、
(11)数値B、数値C、数値Dと、素数pとを読み出し、以下の式により、座標X4を求めるX4演算処理、
X4=−8BC2+D2 mod p
(12)数値B、数値C、数値Dと、素数pを読み出し、以下の式により、座標Y4を求めるY4演算処理、
Y4=−8C4+D(12BC2−D2) mod p
(13)座標Y1と、座標Z1と、数値Cと、素数pとを読み出し、以下の式により、座標Z4を求めるZ4演算処理、
Z4=4Y1Z1C mod p
(14)求めた座標X4と、座標Y4と、座標Z4を出力する出力処理。
【0014】
【発明の実施の形態】
実施の形態1.
図1は、実施の形態1における素体上定義された楕円曲線の、アファイン座標系における2k倍点の演算方法を示したフローチャートである。図において、まず楕円曲線(のパラメータ)と曲線上の点P1が入力される。S101はA1、B1、C1を演算するステップ、S102は2≦i≦kに対してAi、Bi、Ciを演算するステップ、S103はDkを演算するステップ、S104はx2 k、y2 kを演算するステップであり、P1のk倍点P2 kが出力される。
【0015】
次に動作を説明する。まず、160ビット程度の大きな素数pと、有限体Fp上の2つの元a、bを選択する。その際、楕円曲線の有理点群E(Fp)の位数#E(Fp)が大きな素数で割り切れるようにp、a、bを選択する。以上により楕円曲線E:y2=x3+ax+b mod pが選択されたことになる。この楕円曲線Eと、E上の点P1=(x1,y1)を入力し、P1の2k倍点P2 k=(x2 k,y2 k)を演算する。図の各ステップにおける演算は全て定義体Fp上の演算となる。この方法の演算量は、自乗算4k+1回、乗算4k+2回、逆元算1回である。
【0016】
以上のように演算すれば、定義体上の逆元演算を1回行うだけで、2k倍点を計算することができ、高速に計算できる。尚、従来の演算方法では、2倍算をk回繰り返していたために、逆元演算がk回必要であった。
【0017】
本演算方法を、楕円曲線を用いた暗号化やディジタル署名に使用することもできる。
【0018】
実施の形態2.
図2は、実施の形態2における素体上定義された楕円曲線の重み付き射影座標系における4倍点の演算方法を示したフローチャートである。図において、まず楕円曲線(のパラメータ)と曲線上の点P1が入力される。S201はA、B、C、Dを演算するステップ、S202はX4、Y4、Z4を演算するステップであり、P1の4倍点P4が出力される。
【0019】
次に動作を説明する。まず、160ビット程度の大きな素数pと、有限体Fp上の2つの元a,bを選択する。その際、楕円曲線の有理点群E(Fp)の位数#E(Fp)が大きな素数で割り切れるようにp、a、bを選択する。以上により楕円曲線E:y2=x3+ax+b mod pが選択されたことになる。この楕円曲線Eと、E上の点P1=(X1,Y1,Z1)を入力し、P1の4倍点P4=(x4,y4)を演算する。図の各ステップにおける演算は全て定義体Fp上の演算となる。この方法の演算量は、自乗算10回、乗算9回である。
【0020】
従来の演算方法では、4倍点を計算するために2倍算を2回繰り返していたため、自乗算12回、乗算8回の演算が必要であった。したがって、本発明の演算方法の方が高速に演算できる。
【0021】
本演算方法を、楕円曲線を用いた暗号化やディジタル署名に使用することもできる。
【0022】
実施の形態3.
図3は、実施の形態3による素体上定義された楕円曲線のアファイン座標系における2k倍点の演算装置を示した図である。本実施の形態における演算装置は、実施の形態1における演算方法を用いた装置である。図において、301は入力手段、302は記憶手段、303は法pでの乗算手段、304は法pでの自乗算手段、305は法pでの加算手段、306は法pでの減算手段、307は法pでの単精度整数との乗算手段、308は法pでの逆元算手段、309と310と311と312は演算手段、313は出力手段、314は装置全体を制御する制御手段である。302はメモリ、303〜312及び314はCPUである。
【0023】
次に動作を説明する。まず、楕円曲線Eのパラメータ(160ビット程度の大きな素数pと、有限体Fp上の2つの元a、b)と、E上の点P1=(x1,y1)と、正整数kが入力手段301に入力される。その際、楕円曲線の有理点群E(Fp)の位数#E(Fp)が大きな素数で割り切れるようにp、a、bはあらかじめ選択されている。この装置では、点P1=(x1,y1)の2k倍点P2 k=(x2 k,y2 k)が演算される。
【0024】
まず、演算手段309において、A1、B1、C1が演算される。各演算において、自乗算は法p自乗算手段304、加算は法p加算手段305、減算は法p減算手段306、整数3との乗算は法p単精度乗算手段307を用いて演算される。演算されたA1、B1、C1は、記憶手段302に記憶される。
【0025】
次に、演算手段310において、Ai、Bi、Ciが、i=2からkの順に演算される。Aj、Bj、Cjを演算する際、Aj-1、Bj-1、Cj-1を適宜記憶手段302から読み出して演算する。また、演算されたAj、Bj、Cjは、記憶手段302に記憶される。また、各演算において、法p乗算手段303、法p自乗算手段304、法p加算手段305、法p減算手段306、法p単精度演算手段307が使用される。演算手段310において最終的に演算されたAk、Bk、Ckは、記憶手段302に記憶される。
【0026】
次に、演算手段311において、Dkが演算される。Ak、Bk、Ckは記憶手段302から読み出され、整数“12”との乗算は法p単精度乗算手段307が使用され、乗算は法p乗算手段303が使用され、自乗算は法p自乗算手段304が使用され、減算は法p減算手段306が使用される。演算されたDkは記憶手段302に記憶される。
【0027】
次に、演算手段312において、x2 k、y2 kが演算される。これまでと同様、各演算では、303〜307が使用される。なお、kΠk i=1Ciの法pでの逆元は、法p逆元算手段308を用いて演算される。本装置において法p逆元算手段308が使用されるのは、この1回だけである。
【0028】
最後に、演算されたx2 k、y2 kは出力手段313から出力される。
【0029】
以上のようにx2 k、y2 kを演算すれば、定義体上Fpの逆元演算を1回行うだけで、2k倍点を演算することができ、高速に計算できる。尚、従来の演算方法では、2倍算をk回繰り返していたために、逆元演算がk回必要であった。
【0030】
本演算装置を、楕円曲線を用いた暗号化やディジタル署名に使用することもできる。
【0031】
実施の形態4.
図4は、実施の形態4による素体上定義された楕円曲線の重み付き射影座標系における4倍点の演算装置を示した図である。本実施の形態における演算装置は、実施の形態2における演算方法を用いた装置である。図において、401は入力手段、402は記憶手段、403は法pでの乗算手段、404は法pでの自乗算手段、405は法pでの加算手段、406は法pでの減算手段、407は法pでの単精度整数との乗算手段、408と409は演算手段、410は出力手段、411は装置全体を制御する制御手段である。402はメモリ、403〜409及び411はCPUである。
【0032】
次に動作を説明する。まず、楕円曲線Eのパラメータ(160ビット程度の大きな素数pと、有限体Fp上の2つの元a、b)と、E上の点P1=(X1,Y1,Z1)が入力手段401に入力される。その際、楕円曲線の有理点群E(Fp)の位数#E(Fp)が大きな素数で割り切れるようにp、a、bはあらかじめ選択されている。この装置では、点P1=(X1,Y1,Z1)の4倍点P4=(X4,Y4,Z4)が演算される。
【0033】
まず、演算手段408において、A、B、C、Dが演算される。各演算において、乗算は法p乗算手段403、自乗算は法p自乗算手段404、加算は法p加算手段405、減算は法p減算手段406、単精度整数との乗算は法p単精度乗算手段407を用いて演算される。演算されたA、B、C、Dは、記憶手段402に記憶される。
【0034】
次に、演算手段409において、X4、Y4、Z4が演算される。演算する際、A、B、C、Dを適宜記憶手段402から読み出して演算する。また、各演算において、乗算は法p乗算手段403、自乗算は法p自乗算手段404、加算は法p加算手段405、減算は法p減算手段406、単精度整数との乗算は法p単精度乗算手段407を用いて演算される。
【0035】
最後に、演算されたX4、Y4、Z4は出力手段410から出力される。
【0036】
以上のように演算すれば、法pによる自乗算10回、乗算9回で4倍点が計算できる。尚、従来の演算方法では、4倍点を計算するために2倍算を2回繰り返していたため、自乗算12回、乗算8回の演算が必要であった。したがって、本発明の演算方法の方が高速に計算できる。
【0037】
本演算装置を、楕円曲線を用いた暗号化やディジタル署名に使用することもできる。
【0038】
各実施の形態に関し、入力処理、記憶処理、読み出し処理、演算処理、初期値設定処理、出力処理等の処理を、コンピュータ読み取り可能なプログラムとして記録媒体に記録し、演算装置となるコンピュータがそのプログラムを読み取り、プログラムを記憶するメモリにロードし、プログラムに含まれる処理を順次読み出し実行することにより実現することが可能である。
また、入力手段、及び出力手段は、モジュールのインターフェースとして用いられる記憶手段であっても構わない。
【0039】
【発明の効果】
以上のように、本発明による演算方法は、楕円曲線演算を高速に行うことができる。
また、本発明による演算方法を利用することにより、楕円曲線を用いた暗号化やディジタル署名を高速に行うことができる。
【0040】
以上のようにx2 k、y2 kを演算すれば、定義体上Fpの逆元演算を1回行うだけで、2k倍点を演算することができ、高速に計算できる。尚、従来の演算方法では、2倍算をk回繰り返していたために、逆元演算がk回必要であった。
【0041】
以上のように演算すれば、法pによる自乗算10回、乗算9回で4倍点が計算できる。尚、従来の演算方法では、4倍点を計算するために2倍算を2回繰り返していたため、自乗算12回、乗算8回の演算が必要であった。したがって、本発明の演算方法の方が高速に計算できる。
【図面の簡単な説明】
【図1】 本発明の演算方法を説明するフローチャートである。
【図2】 本発明の演算方法を説明するフローチャートである。
【図3】 本発明の演算装置を説明する図である。
【図4】 本発明の演算装置を説明する図である。
【図5】 従来の演算方法を説明するフローチャートである。
【図6】 従来の演算方法を説明するフローチャートである。
【符号の説明】
301,401 入力手段、302,402 記憶手段、303,403 法p乗算手段、304,404 法p自乗算手段、305,405 法p加算手段、306,406 法p減算手段、307,407 法p単精度乗算手段、308 法p逆元算手段、309,310,311,312,408,409 演算手段、313,410 出力手段、314,411 制御手段。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method for calculating points on an elliptic curve and an encryption method using the same.
[0002]
[Prior art]
A conventional method for calculating points on an elliptic curve will be described. A conventional method for calculating points on an elliptic curve is described by Koblitz, “A Course in Number Theory and Cryptography”, Springer, (1994). The encryption method using an elliptic curve is described in Tatsuaki Okamoto and Hiroshi Yamamoto, “Modern Crypto”, Sangyo Tosho (1997).
[0003]
First, public key cryptography, discrete logarithm problem and elliptic curve, which are the technical background of the present invention, will be briefly described. In public key encryption communication, a set of a secret key x and a public key y is prepared for each user, and the secret key x is kept secret by each user. The public key y is disclosed to the public other than the user himself. When user B wants to secretly send data to user A, user B encrypts the data using public key y corresponding to user A.
This ciphertext can only be decrypted by the user A who knows the secret key x.
For discrete two elements g 1 of the logarithmic group problematic G (additive is assumed to be defined), g 2, a problem of finding the m that satisfies g 1 = mg 2. It is known that when the number of elements of the group G is large, solving the discrete logarithm problem becomes very difficult in terms of computational complexity. Public key cryptography can be designed using this fact.
The elliptic curve E on the element body F p is an equation expressed as y 2 = x 3 + ax + b mod p. An addition is defined for the rational point set E (F p ) on the elliptic curve to form a group.
[0004]
5 and 6 are flowcharts showing a conventional elliptic curve calculation method. FIG. 5 shows a method for calculating a double point in an affine coordinate system in an elliptic curve defined on a prime field, and FIG. 6 shows a double point in a weighted projective coordinate system in an elliptic curve defined on a prime field. It is a flowchart which shows the method to calculate. In FIG. 5, first, an elliptic curve (parameter thereof) and a point P 1 on the curve are input. S501 is a step of calculating a lambda, S502 step of calculating x 2, S503 is a step of calculating y 2, 2-fold point P 2 of P 1 is output. In FIG. 6, first, an elliptic curve (parameter thereof) and a point P 1 on the curve are input. S601 is a step of calculating M, the step of calculating the Z 2 S602, step of calculating step, the step of calculating X 2 S604, the step of calculating the T S605, S606 and the Y 2 to calculate the S S603 And a double point P 2 of P 1 is output.
[0005]
Next, the operation will be described. First, a method of calculating the double point in the affine coordinate system will be described with reference to FIG. Elliptic curve E on element F p : y 2 = x 3 + ax + b mod p and point P 1 = (x 1 , y 1 ) on E are first input. All operations in each step are operations on the definition field F p . The calculation amount of this method is two times self-multiplication, two multiplications, and one inverse element calculation.
Next, a method for calculating the double point in the weighted projection coordinate system will be described with reference to FIG. Elliptic curve over a prime field F p E: y 2 = x 3 + ax + b mod p and P 1 = a point on E (X 1, Y 1, Z 1) is first entered. All operations in each step are operations on the definition field F p . The amount of calculation in this method is 6 times self multiplication and 4 times multiplication.
[0006]
[Problems to be solved by the invention]
Calculation of double points of an elliptic curve over a conventional prime field F p is configured as described above, 4-multiplied point and 8-fold point, we have generally given way to calculate the 2 k times point directly Absent. Therefore, for example, in order to calculate a quadruple point, the doubling must be repeated twice, and there is a problem that the amount of calculation is large. In particular, in the calculation in the affine coordinate system, one inverse operation on the definition field is required for one doubling. In general, the inverse element calculation is more computationally intensive than the multiplication.
[0007]
An object of the present invention is to solve such a problem, and is to obtain a high-speed calculation method by directly calculating a doubling without repeating k times when calculating 2 k times.
[0008]
[Means for Solving the Problems]
The arithmetic unit according to the present invention is expressed by the following equation, and a point P 1 = (x 1 , y 1 ) on the elliptic curve E defined on the prime field F p is multiplied by 2 k ( k is an arithmetic unit for obtaining a point P 2 k = (x 2 k , y 2 k ), which is an integer of 2 or more, and has the following elements.
E: y 2 = x 3 + ax + b mod p
(1) Input means for inputting prime number p, element a and element b on prime field F p , coordinate x 1 and coordinate y 1 of point P 1 , and integer k
(2) storage means for storing the input prime number p, element a, element b, coordinate x 1 , coordinate y 1 , and integer k;
(3) A 1 calculation means for reading out the coordinate x 1 and the prime number p and obtaining the array element A 1 by the following equation:
A 1 = x 1 mod p
(4) A 1 storage means for storing the obtained array element A 1 ;
(5) B 1 calculation means for reading the coordinate x 1 , the element a, and the prime number p, and obtaining the array element B 1 by the following equation:
B 1 = 3x 1 2 + a mod p
(6) B 1 storage means for storing the obtained array element B 1 ;
(7) C 1 calculation means for reading the coordinate y 1 and the prime number p and obtaining the array element C 1 by the following equation:
C 1 = −y 1 mod p
(8) C 1 storage means for storing the obtained array element C 1 ;
(9) i storage means for storing variable i,
(10) i initial value setting means for setting the
(11) i increment means for reading integer k and variable i, sequentially adding 1 to variable i until variable i reaches integer k, and setting in i storage means;
(12) Each time the variable i is set in the i storage means, the variable i and the prime number p are read, and the array element A i-1 specified by the read variable i and the array element B i-1 When reads out the array element C i-1, by the following equation, a i arithmetic means for obtaining the array element a i,
A i = B i-1 2 -8A i-1 C i-1 2 mod p
(13) A i storage means for storing the obtained array element A i ;
(14) Each time the variable i is set in the i storage means, the variable i, the element a, and the prime number P are read, and the array element A i specified by the read variable i and the array element C 1 B i computing means for reading C i-1 and obtaining the array element B i by the following equation:
[Expression 10]
(15) B i storing means for storing the array elements B i determined,
(16) Each time the variable i is set in the i storage means, the variable i and the prime number P are read, and the array elements A i and A i-1 and the array element B i specified by the read variable i are read. -1 and array element C i-1 , C i computing means for obtaining array element C i by the following equation:
C i = −8 C i -1 4 -B i-1 (A i -4A i-1 C i-1 2 ) mod p
(17) C i storage means for storing the obtained array element C i ;
(18) Read integer k and prime number P, read array element A k , array element B k , and array element C k specified by the read integer k , and calculate numerical value D k by the following equation: D k computing means for obtaining
D k = 12A k C k 2 −B k 2 mod p
(19) Dk storage means for storing the obtained numerical value Dk,
(20) Read the integer k and the prime number P, and further read the array element A k , the array element B k, and the array elements C 1 to C k specified by the read integer k. X 2 k computing means for obtaining coordinates x 2 k ;
[Expression 11]
(21) Read integer k and prime number P, read array element B k specified by read integer k, array elements C 1 to C k , and array element D k, and Y 2 k computing means for obtaining coordinates y 2 k ;
[Expression 12]
(22) Output means for outputting the obtained coordinates x 2 k and coordinates y 2 k .
[0009]
The arithmetic unit according to the present invention is expressed by the following formula, and a point P 1 = (X 1 , Y 1 , Z 1 ) on the elliptic curve E defined on the prime field F p is represented by a weighted projective coordinate system. Is a computing device for obtaining a point P 4 = (X 4 , Y 4 , Z 4 ) multiplied by 4 and has the following elements.
E: y 2 = x 3 + ax + b mod p
(1) Input means for inputting the prime number p, the elements a and b on the prime field F p , the coordinates X 1 , the coordinates Y 1 and the coordinates Z 1 of the point P 1 ;
(2) storage means for storing the input prime number p, element a, element b, coordinate X 1 , coordinate Y 1 , and coordinate Z 1 ;
(3) A calculation means for reading the element a, the coordinate X 1 , the coordinate Z 1, and the prime number p, and obtaining the numerical value A by the following equation:
A = 3X 1 2 + aZ 1 4 mod p
(4) A storage means for storing the obtained numerical value A,
(5) B calculation means for reading the numerical value A, the coordinate X 1 , the coordinate Y 1, and the prime number p, and obtaining the numerical value B by the following equation:
B = A 2 -8X 1 Y 1 2 mod p
(6) B storage means for storing the obtained numerical value B,
(7) C calculating means for reading the numerical value A, the coordinate X 1 , the coordinate Y 1 and the prime number p, and obtaining the numerical value C by the following equation:
C = −8Y 1 4 + A (12X 1 Y 1 2 −A 2 ) mod p
(8) C storage means for storing the obtained numerical value C;
(9) D calculation means for reading the element a, the numerical value B, the coordinate Y 1 , the coordinate Z 1, and the prime number p, and obtaining the numerical value D by the following equation:
D = 16aY 1 4 Z 1 4 + 3B 2 mod p
(10) D storage means for storing the obtained numerical value D,
(11) X 4 calculation means for reading the numerical value B, the numerical value C, the numerical value D, and the prime number p, and obtaining the coordinate X 4 by the following equation:
X 4 = −8BC 2 + D 2 mod p
(12) Y 4 calculation means for reading the numerical value B, the numerical value C, the numerical value D, and the prime number p, and obtaining the coordinate Y 4 by the following equation:
Y 4 = −8C 4 + D (12BC 2 −D 2 ) mod p
(13) Z 4 computing means for reading the coordinate Y 1 , the coordinate Z 1 , the numerical value C, and the prime number p, and obtaining the coordinate Z 4 by the following equation:
Z 4 = 4Y 1 Z 1 C mod p
(14) An output means for outputting the obtained coordinates X 4 , coordinates Y 4 , and coordinates Z 4 .
[0010]
Calculation method according to the present invention is represented by the following formula, the element point F on the p on an elliptic curve defined E P 1 = (x 1, y 1), 2 k times in affine coordinates ( k is an arithmetic method for obtaining a point P 2 k = (x 2 k , y 2 k ), which is an integer of 2 or more, and has the following elements.
E: y 2 = x 3 + ax + b mod p
(1) an input step of inputting a prime number p, elements a and b on the prime field F p , coordinates x 1 and coordinates y 1 of the point P 1 , and an integer k;
(2) a storage step of storing the input prime number p, element a, element b, coordinate x 1 , coordinate y 1 , and integer k;
(3) A 1 calculation step of reading the coordinate x 1 and the prime number p and obtaining the array element A 1 by the following formula:
A 1 = x 1 mod p
(4) A 1 storage step for storing the obtained array element A 1 ;
(5) B 1 calculation step of reading the coordinate x 1 , the element a, and the prime number p, and obtaining the array element B 1 by the following equation:
B 1 = 3x 1 2 + a mod p
(6) B 1 storage step for storing the obtained array element B 1 ;
(7) C 1 calculation step of reading out the coordinate y 1 and the prime number p and obtaining the array element C 1 by the following equation:
C 1 = −y 1 mod p
(8) a C 1 storage step for storing the obtained array element C 1 ;
(9) i initial value setting step for setting
(10) i increment step for reading integer k and variable i, sequentially adding 1 to variable i until variable i reaches integer k, and setting
(11) Each time the variable i is set, the variable i and the prime number p are read, and the array element A i-1 , the array element B i-1, and the array element specified by the read variable i are read. C i-1 is read, and an A i calculation step for obtaining an array element A i by the following equation:
A i = B i-1 2 -8A i-1 C i-1 2 mod p
(12) A i storing step of storing the obtained array element A i ;
(13) Each time the variable i is set, the variable i, the element a, and the prime number P are read, and the array element A i specified by the read variable i and the array elements C 1 to C i-1 B i calculation step for obtaining the array element B i by the following equation:
[Formula 13]
(14) B i storage step of storing the obtained array element B i ,
(15) Each time the variable i is set, the variable i and the prime number P are read, and the array elements A i and A i-1 specified by the read variable i, the array element B i-1 , C i calculation step for reading array element C i-1 and obtaining array element C i by the following equation:
C i = −8 C i -1 4 -B i-1 (A i -4A i-1 C i-1 2 ) mod p
(16) C i storage step for storing the obtained array element C i ,
(17) Read integer k and prime number P, read array element A k , array element B k , and array element C k specified by the read integer k , and calculate numerical value D k by the following equation D k calculation step for obtaining
D k = 12A k C k 2 −B k 2 mod p
(18) A Dk storage step for storing the obtained numerical value Dk,
(19) Read integer k and prime number P, and further read array element A k , array element B k , and array elements C 1 to C k specified by the read integer k. X 2 k calculation step for obtaining coordinates x 2 k ;
[Expression 14]
(20) Read the integer k and the prime number P, and further read the array element B k specified by the read integer k, the array elements C 1 to C k, and the array element D k . Y 2 k calculation step for obtaining coordinates y 2 k ,
[Expression 15]
(21) An output step of outputting the obtained coordinates x 2 k and coordinates y 2 k .
[0011]
The calculation method according to the present invention is expressed by the following equation, and a point P 1 = (X 1 , Y 1 , Z 1 ) on the elliptic curve E defined on the prime field F p is represented by a weighted projective coordinate system. Is a calculation method for obtaining the point P 4 = (X 4 , Y 4 , Z 4 ) multiplied by 4 in which the following elements are included.
E: y 2 = x 3 + ax + b mod p
(1) An input step of inputting the prime number p, the elements a and b on the prime field F p , the coordinates X 1 , the coordinates Y 1 and the coordinates Z 1 of the point P 1 .
(2) A storage step of storing the input prime number p, element a, element b, coordinate X 1 , coordinate Y 1 , and coordinate Z 1 ;
(3) An A operation step of reading the element a, the coordinate X 1 , the coordinate Z 1, and the prime number p, and obtaining a numerical value A by the following equation:
A = 3X 1 2 + aZ 1 4 mod p
(4) A storage step for storing the obtained numerical value A,
(5) A numerical value A, a coordinate X 1 , a coordinate Y 1, and a prime number p are read, and a B operation step for obtaining the numerical value B by the following equation:
B = A 2 -8X 1 Y 1 2 mod p
(6) B storage step for storing the obtained numerical value B,
(7) A numerical value A, a coordinate X 1 , a coordinate Y 1, and a prime number p are read out, and a C operation step for obtaining the numerical value C by the following equation:
C = −8Y 1 4 + A (12X 1 Y 1 2 −A 2 ) mod p
(8) C storing step for storing the obtained numerical value C,
(9) A D operation step of reading the element a, the numerical value B, the coordinate Y 1 , the coordinate Z 1, and the prime number p, and obtaining the numerical value D by the following equation:
D = 16aY 1 4 Z 1 4 + 3B 2 mod p
(10) D storage step for storing the obtained numerical value D,
(11) A numerical value B, a numerical value C, a numerical value D, and a prime number p are read, and an X 4 calculation step for obtaining a coordinate X 4 by the following equation:
X 4 = −8BC 2 + D 2 mod p
(12) Y 4 calculation step of reading the numerical value B, the numerical value C, the numerical value D, and the prime number p, and obtaining the coordinate Y 4 by the following equation:
Y 4 = −8C 4 + D (12BC 2 −D 2 ) mod p
(13) A Z 4 calculation step of reading the coordinate Y 1 , the coordinate Z 1 , the numerical value C, and the prime number p, and obtaining the coordinate Z 4 by the following equation:
Z 4 = 4Y 1 Z 1 C mod p
(14) An output step of outputting the obtained coordinates X 4 , coordinates Y 4 , and coordinates Z 4 .
[0012]
A computer-readable recording medium on which the program according to the present invention is recorded is represented by the following formula, and a point P 1 = (x 1 , y 1 ) on the elliptic curve E defined on the elementary field F p is expressed as follows: A program for executing the following processing is recorded in a computer that is a computing device for obtaining a point P 2 k = (x 2 k , y 2 k ) multiplied by 2 k (k is an integer of 2 or more) in the affine coordinate system It is a computer-readable recording medium.
E: y 2 = x 3 + ax + b mod p
(1) Input processing for inputting prime number p, element a and element b on prime field F p , coordinate x 1 and coordinate y 1 of point P 1 , and integer k
(2) a prime number p that is input, the original a, the original b, or coordinates x 1, a coordinate y 1, the storage process of storing the integer k,
(3) the coordinates x 1, reads the prime p, the following equation, A 1 arithmetic processing for obtaining the array element A 1,
A 1 = x 1 mod p
(4) A 1 storage process for storing the obtained array element A 1 ;
(5) Read out the coordinate x 1 , the element a, and the prime number p, and perform B 1 calculation processing to obtain the array element B 1 by the following equation:
B 1 = 3x 1 2 + a mod p
(6) B 1 storage processing for storing the obtained array element B 1 ;
(7) C 1 arithmetic processing for reading the coordinate y 1 and the prime number p and obtaining the array element C 1 by the following equation:
C 1 = −y 1 mod p
(8) C 1 storage processing for storing the obtained array element C 1 ;
(9) i initial value setting processing for setting
(10) i-increment processing for reading out the integer k and the variable i and sequentially adding 1 to the variable i until the variable i reaches the integer k.
(11) Each time the variable i is set, the variable i and the prime number p are read, and the array element A i-1 , the array element B i-1, and the array element specified by the read variable i are read. C i-1 is read out, and A i calculation processing for obtaining the array element A i by the following equation:
A i = B i-1 2 -8A i-1 C i-1 2 mod p
(12) A i storage process for storing the obtained array element A i ;
(13) Each time the variable i is set, the variable i, the element a, and the prime number P are read, and the array element A i specified by the read variable i and the array elements C 1 to C i-1 B i calculation processing for obtaining the array element B i by the following equation:
[Expression 16]
(14) B i storage processing for storing the obtained array element B i ,
(15) Each time the variable i is set, the variable i and the prime number P are read, and the array elements A i and A i-1 specified by the read variable i, the array element B i-1 , C i arithmetic processing for reading the array element C i-1 and obtaining the array element C i by the following equation:
C i = −8 C i -1 4 -B i-1 (A i -4A i-1 C i-1 2 ) mod p
(16) C i storage processing for storing the obtained array element C i ;
(17) Read integer k and prime number P, read array element A k , array element B k , and array element C k specified by the read integer k , and calculate numerical value D k by the following equation D k calculation processing for obtaining
D k = 12A k C k 2 −B k 2 mod p
(18) Dk storage processing for storing the obtained numerical value Dk,
(19) Read integer k and prime number P, and further read array element A k , array element B k , and array elements C 1 to C k specified by the read integer k. X 2 k calculation processing for obtaining coordinates x 2 k ,
[Expression 17]
(20) Read the integer k and the prime number P, and further read the array element B k specified by the read integer k, the array elements C 1 to C k, and the array element D k . Y 2 k calculation processing for obtaining coordinates y 2 k ,
[Formula 18]
(21) Output processing for outputting the obtained coordinates x 2 k and coordinates y 2 k .
[0013]
A computer-readable recording medium storing a program according to the present invention is represented by the following formula, P 1 = (X 1 point on the defined elliptic curve E that the body F p, Y 1, Z 1 ) Is multiplied by four in the weighted projective coordinate system, and the computer is a computer readable recording a program for executing the following processing on the computer that obtains the point P 4 = (X 4 , Y 4 , Z 4 ) It is a characteristic recording medium.
E: y 2 = x 3 + ax + b mod p
(1) Input processing for inputting the prime number p, the elements a and b on the prime field F p , the coordinates X 1 , the coordinates Y 1 and the coordinates Z 1 of the point P 1 .
(2) Storage processing for storing the input prime number p, element a, element b, coordinate X 1 , coordinate Y 1 , and coordinate Z 1 .
(3) A calculation process for reading the element a, the coordinate X 1 , the coordinate Z 1, and the prime number p, and obtaining the numerical value A by the following equation:
A = 3X 1 2 + aZ 1 4 mod p
(4) A storage process for storing the obtained numerical value A,
(5) B calculation processing for reading the numerical value A, the coordinate X 1 , the coordinate Y 1, and the prime number p and obtaining the numerical value B by the following equation:
B = A 2 -8X 1 Y 1 2 mod p
(6) B storage processing for storing the obtained numerical value B,
(7) C arithmetic processing for reading the numerical value A, the coordinate X 1 , the coordinate Y 1, and the prime number p, and obtaining the numerical value C by the following equation:
C = −8Y 1 4 + A (12X 1 Y 1 2 −A 2 ) mod p
(8) C storage processing for storing the obtained numerical value C,
(9) Read out the element a, the numerical value B, the coordinate Y 1 , the coordinate Z 1 and the prime number p, and calculate the numerical value D by the following formula:
D = 16aY 1 4 Z 1 4 + 3B 2 mod p
(10) D storage process for storing the obtained numerical value D;
(11) X 4 arithmetic processing for reading the numerical value B, the numerical value C, the numerical value D, and the prime number p, and obtaining the coordinate X 4 by the following equation:
X 4 = −8BC 2 + D 2 mod p
(12) A numerical value B, a numerical value C, a numerical value D, and a prime number p are read, and a Y 4 calculation process for obtaining a coordinate Y 4 by the following equation:
Y 4 = −8C 4 + D (12BC 2 −D 2 ) mod p
(13) Z 4 arithmetic processing for reading the coordinate Y 1 , the coordinate Z 1 , the numerical value C, and the prime number p, and obtaining the coordinate Z 4 by the following equation:
Z 4 = 4Y 1 Z 1 C mod p
(14) Output processing for outputting the obtained coordinate X 4 , coordinate Y 4 , and coordinate Z 4 .
[0014]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a flowchart showing a method of calculating a 2 k- fold point in an affine coordinate system for an elliptic curve defined on a prime field in the first embodiment. In the figure, first, an elliptic curve (parameter thereof) and a point P 1 on the curve are input. S101 is a step of calculating A 1 , B 1 , and C 1 , S102 is a step of calculating A i , B i , and C i for 2 ≦ i ≦ k, S103 is a step of calculating D k , and S104 is x This is a step of calculating 2 k and y 2 k , and a k-fold point P 2 k of P 1 is output.
[0015]
Next, the operation will be described. First, a large prime number p of about 160 bits and two elements a and b on the finite field F p are selected. At this time, p, a, and b are selected so that the order #E (F p ) of the rational point group E (F p ) of the elliptic curve is divisible by a large prime number. Thus, the elliptic curve E: y 2 = x 3 + ax + b mod p is selected. And the elliptic curve E, and enter a point on E P 1 = (x 1, y 1), 2 k times point P 2 k = (x 2 k , y 2 k) of P 1 calculates the. All operations in each step in the figure are operations on the definition field F p . The calculation amount of this method is self-multiplication 4k + 1 times, multiplication 4k + 2 times, and
[0016]
If the calculation is performed as described above, the 2 k- fold point can be calculated by performing the inverse element calculation on the definition body once, and the calculation can be performed at high speed. In the conventional calculation method, since the doubling operation is repeated k times, the inverse element calculation is required k times.
[0017]
This calculation method can also be used for encryption using an elliptic curve and digital signature.
[0018]
FIG. 2 is a flowchart showing a quadruple point calculation method in the weighted projection coordinate system of the elliptic curve defined on the prime field in the second embodiment. In the figure, first, an elliptic curve (parameter thereof) and a point P 1 on the curve are input. S201 is A, B, C, step of computing D, S202 is a step of computing the X 4, Y 4, Z 4 , 4 times points P 1 P 4 is output.
[0019]
Next, the operation will be described. First, a large prime number p of about 160 bits and two elements a and b on the finite field F p are selected. At this time, p, a, and b are selected so that the order #E (F p ) of the rational point group E (F p ) of the elliptic curve is divisible by a large prime number. Thus, the elliptic curve E: y 2 = x 3 + ax + b mod p is selected. The elliptic curve E and a point P 1 = (X 1 , Y 1 , Z 1 ) on E are input, and a quadruple point P 4 = (x 4 , y 4 ) of P 1 is calculated. All operations in each step in the figure are operations on the definition field F p . The amount of calculation in this method is 10 times self multiplication and 9 times multiplication.
[0020]
In the conventional calculation method, the doubling operation is repeated twice in order to calculate the quadruple point, so that it is necessary to perform the self-multiplication 12 times and the multiplication 8 times. Therefore, the calculation method of the present invention can calculate at higher speed.
[0021]
This calculation method can also be used for encryption using an elliptic curve and digital signature.
[0022]
Embodiment 3 FIG.
FIG. 3 is a diagram showing an arithmetic unit for 2 k- fold points in an affine coordinate system of an elliptic curve defined on a prime field according to the third embodiment. The arithmetic device in the present embodiment is a device using the arithmetic method in the first embodiment. In the figure, 301 is input means, 302 is storage means, 303 is multiplication means in modulus p, 304 is self-multiplication means in modulus p, 305 is addition means in modulus p, 306 is subtraction means in modulus p, 307 is a multiplication means with a single precision integer in modulus p, 308 is an inverse element calculation means in modulus p, 309, 310, 311 and 312 are calculation means, 313 is an output means, 314 is a control means for controlling the entire apparatus It is.
[0023]
Next, the operation will be described. First, parameters of the elliptic curve E (a large prime number p of about 160 bits, two elements a and b on the finite field F p ), a point P 1 = (x 1 , y 1 ) on E, and a positive integer k is input to the input means 301. At that time, p, a, and b are selected in advance so that the order #E (F p ) of the rational point group E (F p ) of the elliptic curve is divisible by a large prime number. In this apparatus, a point P 2 k = (x 2 k , y 2 k ) that is 2 k times the point P 1 = (x 1 , y 1 ) is calculated.
[0024]
First, the arithmetic unit 309, A 1, B 1, C 1 is calculated. In each calculation, the self-multiplication is calculated using the modulus p self-multiplication means 304, the addition is calculated using the modulus p addition means 305, the subtraction is calculated using the modulus p subtraction means 306, and the multiplication with the integer 3 is calculated using the modulus p single-precision multiplication means 307. The calculated A 1 , B 1 , C 1 are stored in the
[0025]
Then, the
[0026]
Next, D k is calculated in the calculation means 311. A k , B k , and C k are read from the
[0027]
Next, the calculation means 312 calculates x 2 k and y 2 k . As before, 303 to 307 are used in each calculation. Note that the inverse element in the modulus p of kΠ k i = 1 C i is calculated using the modulus p inverse element calculation means 308. In this apparatus, the modulus p inverse element calculation means 308 is used only once.
[0028]
Finally, the calculated x 2 k and y 2 k are output from the output means 313.
[0029]
If x 2 k and y 2 k are calculated as described above, the 2 k times point can be calculated by performing the inverse element calculation of F p on the definition body once, and can be calculated at high speed. In the conventional calculation method, since the doubling operation is repeated k times, the inverse element calculation is required k times.
[0030]
This computing device can also be used for encryption using an elliptic curve and for digital signatures.
[0031]
Embodiment 4 FIG.
FIG. 4 is a diagram showing an arithmetic unit for quadruple points in the weighted projection coordinate system of the elliptic curve defined on the prime field according to the fourth embodiment. The arithmetic device in the present embodiment is a device using the arithmetic method in the second embodiment. In the figure, 401 is input means, 402 is storage means, 403 is multiplication means in modulus p, 404 is self-multiplication means in modulus p, 405 is addition means in modulus p, 406 is subtraction means in modulus p, Reference numeral 407 denotes multiplication means for single precision integers in the modulus p, 408 and 409 denote arithmetic means, 410 denotes output means, and 411 denotes control means for controlling the entire apparatus.
[0032]
Next, the operation will be described. First, parameters of the elliptic curve E (a large prime number p of about 160 bits and two elements a and b on the finite field F p ) and a point P 1 = (X 1 , Y 1 , Z 1 ) on E are Input to the input means 401. At that time, p, a, and b are selected in advance so that the order #E (F p ) of the rational point group E (F p ) of the elliptic curve is divisible by a large prime number. In this apparatus, a point P 4 = (X 4 , Y 4 , Z 4 ) that is a quadruple point P 1 = (X 1 , Y 1 , Z 1 ) is calculated.
[0033]
First, A, B, C, and D are calculated in the calculation means 408. In each operation, multiplication is a modulo p multiplication means 403, self multiplication is a modulo p self multiplication means 404, addition is a modulo p addition means 405, subtraction is a modulo p subtraction means 406, and multiplication with a single precision integer is modulo p single precision multiplication. Calculation is performed using
[0034]
Next, the calculation means 409 calculates X 4 , Y 4 , and Z 4 . When calculating, A, B, C, and D are read from the
[0035]
Finally, X 4, Y 4, Z 4 which computed is output from the output unit 410.
[0036]
By calculating as described above, a quadruple point can be calculated by self-multiplication 10 times and 9 multiplications by the modulus p. In the conventional calculation method, the doubling operation is repeated twice in order to calculate the quadruple point, so that it is necessary to calculate the self multiplication 12 times and the multiplication 8 times. Therefore, the calculation method of the present invention can be calculated faster.
[0037]
This computing device can also be used for encryption using an elliptic curve and for digital signatures.
[0038]
Regarding each embodiment, processing such as input processing, storage processing, reading processing, arithmetic processing, initial value setting processing, and output processing is recorded on a recording medium as a computer-readable program, and a computer serving as an arithmetic device performs the program. Can be realized by sequentially reading and executing the processes included in the program.
Further, the input means and the output means may be storage means used as a module interface.
[0039]
【The invention's effect】
As described above, the calculation method according to the present invention can perform elliptic curve calculation at high speed.
Also, by using the calculation method according to the present invention, encryption using an elliptic curve and digital signature can be performed at high speed.
[0040]
If x 2 k and y 2 k are calculated as described above, the 2 k times point can be calculated by performing the inverse element calculation of F p on the definition body once, and can be calculated at high speed. In the conventional calculation method, since the doubling operation is repeated k times, the inverse element calculation is required k times.
[0041]
By calculating as described above, a quadruple point can be calculated by self-multiplication 10 times and 9 multiplications by the modulus p. In the conventional calculation method, the doubling operation is repeated twice in order to calculate the quadruple point, so that it is necessary to calculate the self multiplication 12 times and the multiplication 8 times. Therefore, the calculation method of the present invention can be calculated faster.
[Brief description of the drawings]
FIG. 1 is a flowchart illustrating a calculation method according to the present invention.
FIG. 2 is a flowchart illustrating a calculation method according to the present invention.
FIG. 3 is a diagram illustrating an arithmetic device according to the present invention.
FIG. 4 is a diagram illustrating an arithmetic device according to the present invention.
FIG. 5 is a flowchart illustrating a conventional calculation method.
FIG. 6 is a flowchart illustrating a conventional calculation method.
[Explanation of symbols]
301, 401 input means, 302, 402 storage means, 303, 403 method p multiplication means, 304, 404 method p self multiplication means, 305, 405 method p addition means, 306, 406 method p subtraction means, 307, 407 method p Single precision multiplication means, 308 method p inverse element calculation means, 309, 310, 311, 312, 312, 408, 409 calculation means, 313, 410 output means, 314, 411 control means.
Claims (6)
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標x1及び座標y1と、整数kとを入力する入力手段、
(2)入力された素数pと、元aと、元bと、座標x1と、座標y1と、整数kとを記憶する記憶手段、
(3)座標x1と、素数pとを読み出し、以下の式により、配列要素A1を求めるA1演算手段、
A1=x1 mod p
(4)求めた配列要素A1を記憶するA1記憶手段、
(5)座標x1と、元aと、素数pとを読み出し、以下の式により、配列要素B1を求めるB1演算手段、
B1=3x1 2+a mod p
(6)求めた配列要素B1を記憶するB1記憶手段、
(7)座標y1と、素数pとを読み出し、以下の式により、配列要素C1を求めるC1演算手段、
C1=−y1 mod p
(8)求めた配列要素C1を記憶するC1記憶手段、
(9)変数iを記憶するi記憶手段、
(10)i記憶手段に、変数iの初期値2を設定するi初期値設定手段、
(11)整数kと、変数iとを読み出し、変数iが整数kに達するまで変数iに順次1を加えて、i記憶手段に設定するiインクリメント手段、
(12)i記憶手段に変数iが設定される度に、変数iと、素数pとを読み出し、更に、読み出した変数iにより特定される配列要素Ai-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Aiを求めるAi演算手段、
Ai=Bi-1 2−8Ai-1Ci-1 2 mod p
(13)求めた配列要素Aiを記憶するAi記憶手段、
(14)i記憶手段に変数iが設定される度に、変数iと、元aと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素Aiと、配列要素C1からCi-1を読み出し、以下の式により、配列要素Biを求めるBi演算手段、
(16)i記憶手段に変数iが設定される度に、変数iと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素AiとAi-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Ciを求めるCi演算手段、
Ci=−8Ci-1 4−Bi-1(Ai−4Ai-1Ci-1 2) mod p
(17)求めた配列要素Ciを記憶するCi記憶手段、
(18)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素Ckとを読み出し、以下の式により、数値Dkを求めるDk演算手段、
Dk=12AkCk 2−Bk 2 mod p
(19)求めた数値Dkを記憶するDk記憶手段、
(20)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素C1からCkとを読み出し、以下の式により、座標x2 kを求めるx2 k演算手段、
(1) Input means for inputting prime number p, element a and element b on prime field F p , coordinate x 1 and coordinate y 1 of point P 1 , and integer k
(2) storage means for storing the input prime number p, element a, element b, coordinate x 1 , coordinate y 1 , and integer k;
(3) A 1 calculation means for reading out the coordinate x 1 and the prime number p and obtaining the array element A 1 by the following equation:
A 1 = x 1 mod p
(4) A 1 storage means for storing the obtained array element A 1 ;
(5) B 1 calculation means for reading the coordinate x 1 , the element a, and the prime number p, and obtaining the array element B 1 by the following equation:
B 1 = 3x 1 2 + a mod p
(6) B 1 storage means for storing the obtained array element B 1 ;
(7) C 1 calculation means for reading the coordinate y 1 and the prime number p and obtaining the array element C 1 by the following equation:
C 1 = −y 1 mod p
(8) C 1 storage means for storing the obtained array element C 1 ;
(9) i storage means for storing variable i,
(10) i initial value setting means for setting the initial value 2 of the variable i in the i storage means;
(11) i increment means for reading integer k and variable i, sequentially adding 1 to variable i until variable i reaches integer k, and setting in i storage means;
(12) Each time the variable i is set in the i storage means, the variable i and the prime number p are read, and the array element A i-1 specified by the read variable i and the array element B i-1 When reads out the array element C i-1, by the following equation, a i arithmetic means for obtaining the array element a i,
A i = B i-1 2 -8A i-1 C i-1 2 mod p
(13) A i storage means for storing the obtained array element A i ;
(14) Each time the variable i is set in the i storage means, the variable i, the element a, and the prime number P are read, and the array element A i specified by the read variable i and the array element C 1 B i computing means for reading C i-1 and obtaining the array element B i by the following equation:
(16) Each time the variable i is set in the i storage means, the variable i and the prime number P are read, and the array elements A i and A i-1 and the array element B i specified by the read variable i are read. -1 and array element C i-1 , C i computing means for obtaining array element C i by the following equation:
C i = −8 C i -1 4 -B i-1 (A i -4A i-1 C i-1 2 ) mod p
(17) C i storage means for storing the obtained array element C i ;
(18) Read integer k and prime number P, read array element A k , array element B k , and array element C k specified by the read integer k , and calculate numerical value D k by the following equation: D k computing means for obtaining
D k = 12A k C k 2 −B k 2 mod p
(19) Dk storage means for storing the obtained numerical value Dk,
(20) Read the integer k and the prime number P, and further read the array element A k , the array element B k, and the array elements C 1 to C k specified by the read integer k. X 2 k computing means for obtaining coordinates x 2 k ;
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標X1、座標Y1及び座標Z1とを入力する入力手段、
(2)入力された素数pと、元aと、元bと、座標X1と、座標Y1と、座標Z1とを記憶する記憶手段、
(3)元aと、座標X1と、座標Z1と、素数pとを読み出し、以下の式により、数値Aを求めるA演算手段、
A= 3X1 2+aZ1 4 mod p
(4)求めた数値Aを記憶するA記憶手段、
(5)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Bを求めるB演算手段、
B=A2−8X1Y1 2 mod p
(6)求めた数値Bを記憶するB記憶手段、
(7)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Cを求めるC演算手段、
C=−8Y1 4+A(12X1Y1 2−A2) mod p
(8)求めた数値Cを記憶するC記憶手段、
(9)元aと、数値Bと、座標Y1と、座標Z1と、素数pとを読み出し、以下の式により、数値Dを求めるD演算手段、
D=16aY1 4Z1 4+3B2 mod p
(10)求めた数値Dを記憶するD記憶手段、
(11)数値B、数値C、数値Dと、素数pとを読み出し、以下の式により、座標X4を求めるX4演算手段、
X4=−8BC2+D2 mod p
(12)数値B、数値C、数値Dと、素数pを読み出し、以下の式により、座標Y4を求めるY4演算手段、
Y4=−8C4+D(12BC2−D2) mod p
(13)座標Y1と、座標Z1と、数値Cと、素数pとを読み出し、以下の式により、座標Z4を求めるZ4演算手段、
Z4=4Y1Z1C mod p
(14)求めた座標X4と、座標Y4と、座標Z4を出力する出力手段。Represented by the following formula, element point F on the p on an elliptic curve defined E P 1 = (X 1, Y 1, Z 1) , and points were four times in weighted projective coordinates P 4 = Arithmetic device for obtaining (X 4 , Y 4 , Z 4 ) and having the following elements: E 2 = x 3 + ax + b mod p
(1) Input means for inputting the prime number p, the elements a and b on the prime field F p , the coordinates X 1 , the coordinates Y 1 and the coordinates Z 1 of the point P 1 ;
(2) storage means for storing the input prime number p, element a, element b, coordinate X 1 , coordinate Y 1 , and coordinate Z 1 ;
(3) A calculation means for reading the element a, the coordinate X 1 , the coordinate Z 1, and the prime number p, and obtaining the numerical value A by the following equation:
A = 3X 1 2 + aZ 1 4 mod p
(4) A storage means for storing the obtained numerical value A,
(5) B calculation means for reading the numerical value A, the coordinate X 1 , the coordinate Y 1, and the prime number p, and obtaining the numerical value B by the following equation:
B = A 2 -8X 1 Y 1 2 mod p
(6) B storage means for storing the obtained numerical value B,
(7) C calculating means for reading the numerical value A, the coordinate X 1 , the coordinate Y 1 and the prime number p, and obtaining the numerical value C by the following equation:
C = −8Y 1 4 + A (12X 1 Y 1 2 −A 2 ) mod p
(8) C storage means for storing the obtained numerical value C;
(9) D calculation means for reading the element a, the numerical value B, the coordinate Y 1 , the coordinate Z 1, and the prime number p, and obtaining the numerical value D by the following equation:
D = 16aY 1 4 Z 1 4 + 3B 2 mod p
(10) D storage means for storing the obtained numerical value D,
(11) X 4 calculation means for reading the numerical value B, the numerical value C, the numerical value D, and the prime number p, and obtaining the coordinate X 4 by the following equation:
X 4 = −8BC 2 + D 2 mod p
(12) Y 4 calculation means for reading the numerical value B, the numerical value C, the numerical value D, and the prime number p, and obtaining the coordinate Y 4 by the following equation:
Y 4 = −8C 4 + D (12BC 2 −D 2 ) mod p
(13) Z 4 computing means for reading the coordinate Y 1 , the coordinate Z 1 , the numerical value C, and the prime number p, and obtaining the coordinate Z 4 by the following equation:
Z 4 = 4Y 1 Z 1 C mod p
(14) An output means for outputting the obtained coordinates X 4 , coordinates Y 4 , and coordinates Z 4 .
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標x1及び座標y1と、整数kとを入力する入力工程、
(2)入力された素数pと、元aと、元bと、座標x1と、座標y1と、整数kとを記憶する記憶工程、
(3)座標x1と、素数pとを読み出し、以下の式により、配列要素A1を求めるA1演算工程、
A1=x1 mod p
(4)求めた配列要素A1を記憶するA1記憶工程、
(5)座標x1と、元aと、素数pとを読み出し、以下の式により、配列要素B1を求めるB1演算工程、
B1=3x1 2+a mod p
(6)求めた配列要素B1を記憶するB1記憶工程、
(7)座標y1と、素数pとを読み出し、以下の式により、配列要素C1を求めるC1演算工程、
C1=−y1 mod p
(8)求めた配列要素C1を記憶するC1記憶工程、
(9)変数iの初期値2を設定するi初期値設定工程、
(10)整数kと、変数iとを読み出し、変数iが整数kに達するまで変数iに順次1を加えて、設定するiインクリメント工程、
(11)変数iが設定される度に、変数iと、素数pとを読み出し、更に、読み出した変数iにより特定される配列要素Ai-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Aiを求めるAi演算工程、
Ai=Bi-1 2−8Ai-1Ci-1 2 mod p
(12)求めた配列要素Aiを記憶するAi記憶工程、
(13)変数iが設定される度に、変数iと、元aと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素Aiと、配列要素C1からCi-1を読み出し、以下の式により、配列要素Biを求めるBi演算工程、
(15)変数iが設定される度に、変数iと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素AiとAi-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Ciを求めるCi演算工程、
Ci=−8Ci-1 4−Bi-1(Ai−4Ai-1Ci-1 2) mod p
(16)求めた配列要素Ciを記憶するCi記憶工程、
(17)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素Ckとを読み出し、以下の式により、数値Dkを求めるDk演算工程、
Dk=12AkCk 2−Bk 2 mod p
(18)求めた数値Dkを記憶するDk記憶工程、
(19)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素C1からCkとを読み出し、以下の式により、座標x2 kを求めるx2 k演算工程、
(1) an input step of inputting a prime number p, elements a and b on the prime field F p , coordinates x 1 and coordinates y 1 of the point P 1 , and an integer k;
(2) a storage step of storing the input prime number p, element a, element b, coordinate x 1 , coordinate y 1 , and integer k;
(3) A 1 calculation step of reading the coordinate x 1 and the prime number p and obtaining the array element A 1 by the following formula:
A 1 = x 1 mod p
(4) A 1 storage step for storing the obtained array element A 1 ;
(5) B 1 calculation step of reading the coordinate x 1 , the element a, and the prime number p, and obtaining the array element B 1 by the following equation:
B 1 = 3x 1 2 + a mod p
(6) B 1 storage step for storing the obtained array element B 1 ;
(7) C 1 calculation step of reading out the coordinate y 1 and the prime number p and obtaining the array element C 1 by the following equation:
C 1 = −y 1 mod p
(8) a C 1 storage step for storing the obtained array element C 1 ;
(9) i initial value setting step for setting initial value 2 of variable i;
(10) i increment step for reading integer k and variable i, sequentially adding 1 to variable i until variable i reaches integer k, and setting
(11) Each time the variable i is set, the variable i and the prime number p are read, and the array element A i-1 , the array element B i-1, and the array element specified by the read variable i are read. C i-1 is read, and an A i calculation step for obtaining an array element A i by the following equation:
A i = B i-1 2 -8A i-1 C i-1 2 mod p
(12) A i storing step of storing the obtained array element A i ;
(13) Each time the variable i is set, the variable i, the element a, and the prime number P are read, and the array element A i specified by the read variable i and the array elements C 1 to C i-1 B i calculation step for obtaining the array element B i by the following equation:
(15) Each time the variable i is set, the variable i and the prime number P are read, and the array elements A i and A i-1 specified by the read variable i, the array element B i-1 , C i calculation step for reading array element C i-1 and obtaining array element C i by the following equation:
C i = −8 C i -1 4 -B i-1 (A i -4A i-1 C i-1 2 ) mod p
(16) C i storage step for storing the obtained array element C i ,
(17) Read integer k and prime number P, read array element A k , array element B k , and array element C k specified by the read integer k , and calculate numerical value D k by the following equation D k calculation step for obtaining
D k = 12A k C k 2 −B k 2 mod p
(18) A Dk storage step for storing the obtained numerical value Dk,
(19) Read integer k and prime number P, and further read array element A k , array element B k , and array elements C 1 to C k specified by the read integer k. X 2 k calculation step for obtaining coordinates x 2 k ;
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標X1、座標Y1及び座標Z1とを入力する入力工程、
(2)入力された素数pと、元aと、元bと、座標X1と、座標Y1と、座標Z1とを記憶する記憶工程、
(3)元aと、座標X1と、座標Z1と、素数pとを読み出し、以下の式により、数値Aを求めるA演算工程、
A= 3X1 2+aZ1 4 mod p
(4)求めた数値Aを記憶するA記憶工程、
(5)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Bを求めるB演算工程、
B=A2−8X1Y1 2 mod p
(6)求めた数値Bを記憶するB記憶工程、
(7)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Cを求めるC演算工程、
C=−8Y1 4+A(12X1Y1 2−A2) mod p
(8)求めた数値Cを記憶するC記憶工程、
(9)元aと、数値Bと、座標Y1と、座標Z1と、素数pとを読み出し、以下の式により、数値Dを求めるD演算工程、
D=16aY1 4Z1 4+3B2 mod p
(10)求めた数値Dを記憶するD記憶工程、
(11)数値B、数値C、数値Dと、素数pとを読み出し、以下の式により、座標X4を求めるX4演算工程、
X4=−8BC2+D2 mod p
(12)数値B、数値C、数値Dと、素数pを読み出し、以下の式により、座標Y4を求めるY4演算工程、
Y4=−8C4+D(12BC2−D2) mod p
(13)座標Y1と、座標Z1と、数値Cと、素数pとを読み出し、以下の式により、座標Z4を求めるZ4演算工程、
Z4=4Y1Z1C mod p
(14)求めた座標X4と、座標Y4と、座標Z4を出力する出力工程。Represented by the following formula, element point F on the p on an elliptic curve defined E P 1 = (X 1, Y 1, Z 1) , and points were four times in weighted projective coordinates P 4 = A calculation method for obtaining (X 4 , Y 4 , Z 4 ), which has the following elements: E 2 = x 3 + ax + b mod p
(1) An input step of inputting the prime number p, the elements a and b on the prime field F p , the coordinates X 1 , the coordinates Y 1 and the coordinates Z 1 of the point P 1 .
(2) A storage step of storing the input prime number p, element a, element b, coordinate X 1 , coordinate Y 1 , and coordinate Z 1 ;
(3) An A operation step of reading the element a, the coordinate X 1 , the coordinate Z 1, and the prime number p, and obtaining a numerical value A by the following equation:
A = 3X 1 2 + aZ 1 4 mod p
(4) A storage step for storing the obtained numerical value A,
(5) A numerical value A, a coordinate X 1 , a coordinate Y 1, and a prime number p are read, and a B operation step for obtaining the numerical value B by the following equation:
B = A 2 -8X 1 Y 1 2 mod p
(6) B storage step for storing the obtained numerical value B,
(7) A numerical value A, a coordinate X 1 , a coordinate Y 1, and a prime number p are read out, and a C operation step for obtaining the numerical value C by the following equation:
C = −8Y 1 4 + A (12X 1 Y 1 2 −A 2 ) mod p
(8) C storing step for storing the obtained numerical value C,
(9) A D operation step of reading the element a, the numerical value B, the coordinate Y 1 , the coordinate Z 1, and the prime number p, and obtaining the numerical value D by the following equation:
D = 16aY 1 4 Z 1 4 + 3B 2 mod p
(10) D storage step for storing the obtained numerical value D,
(11) A numerical value B, a numerical value C, a numerical value D, and a prime number p are read, and an X 4 calculation step for obtaining a coordinate X 4 by the following equation:
X 4 = −8BC 2 + D 2 mod p
(12) Y 4 calculation step of reading the numerical value B, the numerical value C, the numerical value D, and the prime number p, and obtaining the coordinate Y 4 by the following equation:
Y 4 = −8C 4 + D (12BC 2 −D 2 ) mod p
(13) A Z 4 calculation step of reading the coordinate Y 1 , the coordinate Z 1 , the numerical value C, and the prime number p, and obtaining the coordinate Z 4 by the following equation:
Z 4 = 4Y 1 Z 1 C mod p
(14) An output step of outputting the obtained coordinates X 4 , coordinates Y 4 , and coordinates Z 4 .
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標x1及び座標y1と、整数kとを入力する入力処理、
(2)入力された素数pと、元aと、元bと、座標x1と、座標y1と、整数kとを記憶する記憶処理、
(3)座標x1と、素数pとを読み出し、以下の式により、配列要素A1を求めるA1演算処理、
A1=x1 mod p
(4)求めた配列要素A1を記憶するA1記憶処理、
(5)座標x1と、元aと、素数pとを読み出し、以下の式により、配列要素B1を求めるB1演算処理、
B1=3x1 2+a mod p
(6)求めた配列要素B1を記憶するB1記憶処理、
(7)座標y1と、素数pとを読み出し、以下の式により、配列要素C1を求めるC1演算処理、
C1=−y1 mod p
(8)求めた配列要素C1を記憶するC1記憶処理、
(9)変数iの初期値2を設定するi初期値設定処理、
(10)整数kと、変数iとを読み出し、変数iが整数kに達するまで変数iに順次1を加えて、設定するiインクリメント処理、
(11)変数iが設定される度に、変数iと、素数pとを読み出し、更に、読み出した変数iにより特定される配列要素Ai-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Aiを求めるAi演算処理、
Ai=Bi-1 2−8Ai-1Ci-1 2 mod p
(12)求めた配列要素Aiを記憶するAi記憶処理、
(13)変数iが設定される度に、変数iと、元aと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素Aiと、配列要素C1からCi-1を読み出し、以下の式により、配列要素Biを求めるBi演算処理、
(15)変数iが設定される度に、変数iと、素数Pとを読み出し、更に読み出した変数iにより特定される配列要素AiとAi-1と、配列要素Bi-1と、配列要素Ci-1とを読み出し、以下の式により、配列要素Ciを求めるCi演算処理、
Ci=−8Ci-1 4−Bi-1(Ai−4Ai-1Ci-1 2) mod p
(16)求めた配列要素Ciを記憶するCi記憶処理、
(17)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素Ckとを読み出し、以下の式により、数値Dkを求めるDk演算処理、
Dk=12AkCk 2−Bk 2 mod p
(18)求めた数値Dkを記憶するDk記憶処理、
(19)整数kと、素数Pとを読み出し、更に読み出した整数kにより特定される配列要素Akと、配列要素Bkと、配列要素C1からCkとを読み出し、以下の式により、座標x2 kを求めるx2 k演算処理、
(1) Input processing for inputting prime number p, element a and element b on prime field F p , coordinate x 1 and coordinate y 1 of point P 1 , and integer k
(2) a prime number p that is input, the original a, the original b, or coordinates x 1, a coordinate y 1, the storage process of storing the integer k,
(3) the coordinates x 1, reads the prime p, the following equation, A 1 arithmetic processing for obtaining the array element A 1,
A 1 = x 1 mod p
(4) A 1 storage process for storing the obtained array element A 1 ;
(5) Read out the coordinate x 1 , the element a, and the prime number p, and perform B 1 calculation processing to obtain the array element B 1 by the following equation:
B 1 = 3x 1 2 + a mod p
(6) B 1 storage processing for storing the obtained array element B 1 ;
(7) C 1 arithmetic processing for reading the coordinate y 1 and the prime number p and obtaining the array element C 1 by the following equation:
C 1 = −y 1 mod p
(8) C 1 storage processing for storing the obtained array element C 1 ;
(9) i initial value setting processing for setting initial value 2 of variable i;
(10) i-increment processing for reading out the integer k and the variable i and sequentially adding 1 to the variable i until the variable i reaches the integer k.
(11) Each time the variable i is set, the variable i and the prime number p are read, and the array element A i-1 , the array element B i-1, and the array element specified by the read variable i are read. C i-1 is read out, and A i calculation processing for obtaining the array element A i by the following equation:
A i = B i-1 2 -8A i-1 C i-1 2 mod p
(12) A i storage process for storing the obtained array element A i ;
(13) Each time the variable i is set, the variable i, the element a, and the prime number P are read, and the array element A i specified by the read variable i and the array elements C 1 to C i-1 B i calculation processing for obtaining the array element B i by the following equation:
(15) Each time the variable i is set, the variable i and the prime number P are read, and the array elements A i and A i-1 specified by the read variable i, the array element B i-1 , C i arithmetic processing for reading the array element C i-1 and obtaining the array element C i by the following equation:
C i = −8 C i -1 4 -B i-1 (A i -4A i-1 C i-1 2 ) mod p
(16) C i storage processing for storing the obtained array element C i ;
(17) Read integer k and prime number P, read array element A k , array element B k , and array element C k specified by the read integer k , and calculate numerical value D k by the following equation D k calculation processing for obtaining
D k = 12A k C k 2 −B k 2 mod p
(18) Dk storage processing for storing the obtained numerical value Dk,
(19) Read integer k and prime number P, and further read array element A k , array element B k , and array elements C 1 to C k specified by the read integer k. X 2 k calculation processing for obtaining coordinates x 2 k ,
E:y2=x3+ax+b mod p
(1)素数pと、素体Fp上の元a及び元bと、点P1の座標X1、座標Y1及び座標Z1とを入力する入力処理、
(2)入力された素数pと、元aと、元bと、座標X1と、座標Y1と、座標Z1とを記憶する記憶処理、
(3)元aと、座標X1と、座標Z1と、素数pとを読み出し、以下の式により、数値Aを求めるA演算処理、
A= 3X1 2+aZ1 4 mod p
(4)求めた数値Aを記憶するA記憶処理、
(5)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Bを求めるB演算処理、
B=A2−8X1Y1 2 mod p
(6)求めた数値Bを記憶するB記憶処理、
(7)数値Aと、座標X1と、座標Y1と、素数pとを読み出し、以下の式により、数値Cを求めるC演算処理、
C=−8Y1 4+A(12X1Y1 2−A2) mod p
(8)求めた数値Cを記憶するC記憶処理、
(9)元aと、数値Bと、座標Y1と、座標Z1と、素数pとを読み出し、以下の式により、数値Dを求めるD演算処理、
D=16aY1 4Z1 4+3B2 mod p
(10)求めた数値Dを記憶するD記憶処理、
(11)数値B、数値C、数値Dと、素数pとを読み出し、以下の式により、座標X4を求めるX4演算処理、
X4=−8BC2+D2 mod p
(12)数値B、数値C、数値Dと、素数pを読み出し、以下の式により、座標Y4を求めるY4演算処理、
Y4=−8C4+D(12BC2−D2) mod p
(13)座標Y1と、座標Z1と、数値Cと、素数pとを読み出し、以下の式により、座標Z4を求めるZ4演算処理、
Z4=4Y1Z1C mod p
(14)求めた座標X4と、座標Y4と、座標Z4を出力する出力処理。Represented by the following formula, element point F on the p on an elliptic curve defined E P 1 = (X 1, Y 1, Z 1) , and points were four times in weighted projective coordinates P 4 = A computer-readable recording medium E that records a program for causing a computer, which is an arithmetic unit to obtain (X 4 , Y 4 , Z 4 ) to execute the following processing: y 2 = x 3 + ax + b mod p
(1) Input processing for inputting the prime number p, the elements a and b on the prime field F p , the coordinates X 1 , the coordinates Y 1 and the coordinates Z 1 of the point P 1 .
(2) Storage processing for storing the input prime number p, element a, element b, coordinate X 1 , coordinate Y 1 , and coordinate Z 1 .
(3) A calculation process for reading the element a, the coordinate X 1 , the coordinate Z 1, and the prime number p, and obtaining the numerical value A by the following equation:
A = 3X 1 2 + aZ 1 4 mod p
(4) A storage process for storing the obtained numerical value A,
(5) B calculation processing for reading the numerical value A, the coordinate X 1 , the coordinate Y 1, and the prime number p and obtaining the numerical value B by the following equation:
B = A 2 -8X 1 Y 1 2 mod p
(6) B storage processing for storing the obtained numerical value B,
(7) C arithmetic processing for reading the numerical value A, the coordinate X 1 , the coordinate Y 1, and the prime number p, and obtaining the numerical value C by the following equation:
C = −8Y 1 4 + A (12X 1 Y 1 2 −A 2 ) mod p
(8) C storage processing for storing the obtained numerical value C,
(9) Read out the element a, the numerical value B, the coordinate Y 1 , the coordinate Z 1 and the prime number p, and calculate the numerical value D by the following formula:
D = 16aY 1 4 Z 1 4 + 3B 2 mod p
(10) D storage process for storing the obtained numerical value D;
(11) X 4 arithmetic processing for reading the numerical value B, the numerical value C, the numerical value D, and the prime number p, and obtaining the coordinate X 4 by the following equation:
X 4 = −8BC 2 + D 2 mod p
(12) A numerical value B, a numerical value C, a numerical value D, and a prime number p are read, and a Y 4 calculation process for obtaining a coordinate Y 4 by the following equation:
Y 4 = −8C 4 + D (12BC 2 −D 2 ) mod p
(13) Z 4 arithmetic processing for reading the coordinate Y 1 , the coordinate Z 1 , the numerical value C, and the prime number p, and obtaining the coordinate Z 4 by the following equation:
Z 4 = 4Y 1 Z 1 C mod p
(14) Output processing for outputting the obtained coordinate X 4 , coordinate Y 4 , and coordinate Z 4 .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000205635A JP4550232B2 (en) | 2000-07-06 | 2000-07-06 | Arithmetic apparatus, arithmetic method, and computer-readable recording medium recording program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000205635A JP4550232B2 (en) | 2000-07-06 | 2000-07-06 | Arithmetic apparatus, arithmetic method, and computer-readable recording medium recording program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002023630A JP2002023630A (en) | 2002-01-23 |
| JP4550232B2 true JP4550232B2 (en) | 2010-09-22 |
Family
ID=18702688
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000205635A Expired - Lifetime JP4550232B2 (en) | 2000-07-06 | 2000-07-06 | Arithmetic apparatus, arithmetic method, and computer-readable recording medium recording program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4550232B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9117591B2 (en) | 2011-01-21 | 2015-08-25 | Corning Incorporated | Electrolyte synthesis for ultracapacitors |
| US8663492B2 (en) | 2011-01-21 | 2014-03-04 | Corning Incorporated | Electrolyte synthesis for ultracapacitors |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001318598A (en) * | 2000-05-10 | 2001-11-16 | Nippon Telegr & Teleph Corp <Ntt> | Calculation method and device on elliptic curve, and recording medium storing calculation program |
-
2000
- 2000-07-06 JP JP2000205635A patent/JP4550232B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2002023630A (en) | 2002-01-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Costello et al. | Montgomery curves and their arithmetic: The case of large characteristic fields | |
| Ciet et al. | Elliptic curve cryptosystems in the presence of permanent and transient faults | |
| JP4582912B2 (en) | Power signature attack cryptography | |
| US8504602B2 (en) | Modular multiplication processing apparatus | |
| Renes et al. | qDSA: small and secure digital signatures with curve-based Diffie–Hellman key pairs | |
| JP2000187438A (en) | Elliptic curve cryptography execution method and apparatus, and recording medium | |
| US8862651B2 (en) | Method and apparatus for modulus reduction | |
| JP3794266B2 (en) | Elliptic curve scalar multiplication method and apparatus, and storage medium | |
| JP4354609B2 (en) | Simultaneous equation solving apparatus and inverse element computing apparatus on finite field | |
| CN112202562A (en) | RSA key generation method, computer device and medium | |
| JP4550232B2 (en) | Arithmetic apparatus, arithmetic method, and computer-readable recording medium recording program | |
| JP4479135B2 (en) | Arithmetic apparatus, arithmetic method and arithmetic program | |
| CN117014208B (en) | Data encryption method, device, system, electronic device and storage medium | |
| Bos et al. | Efficient modular multiplication | |
| TW202508247A (en) | Side channel attack resistant cryptographic accelerator | |
| JP4599859B2 (en) | Cryptographic processing operation method, cryptographic processing apparatus, and computer program | |
| KR101223498B1 (en) | Method for generating public key in elliptic curve cryptography and system for executing the method | |
| JP4058152B2 (en) | Elliptic curve calculation device | |
| US7480380B2 (en) | Method for efficient generation of modulo inverse for public key cryptosystems | |
| KR20020086005A (en) | Inverse operator for elliptic curve cryptosystems | |
| JPH076025A (en) | Power calculation method and apparatus | |
| JP3966714B2 (en) | Cryptographic processing method, program thereof, and recording medium thereof | |
| JP2001265218A (en) | Calculation method and device on elliptic curve, and recording medium storing calculation program | |
| JP2003263110A (en) | Element generating apparatus for partial group of rational point group on elliptic curve, program therefor, and recording medium | |
| Reijnders | The Tate Profile |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20040517 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20041018 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070410 |
|
| 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: 20100706 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100708 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4550232 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130716 Year of fee payment: 3 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| EXPY | Cancellation because of completion of term |