CN104601322A - 用于密码芯片中三元扩域的蒙哥马利阶梯算法 - Google Patents

用于密码芯片中三元扩域的蒙哥马利阶梯算法 Download PDF

Info

Publication number
CN104601322A
CN104601322A CN201310533581.0A CN201310533581A CN104601322A CN 104601322 A CN104601322 A CN 104601322A CN 201310533581 A CN201310533581 A CN 201310533581A CN 104601322 A CN104601322 A CN 104601322A
Authority
CN
China
Prior art keywords
ternary
montgomery
coordinate
extension field
territory
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.)
Pending
Application number
CN201310533581.0A
Other languages
English (en)
Inventor
顾海华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huahong Integrated Circuit Co Ltd
Original Assignee
Shanghai Huahong Integrated Circuit Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Huahong Integrated Circuit Co Ltd filed Critical Shanghai Huahong Integrated Circuit Co Ltd
Priority to CN201310533581.0A priority Critical patent/CN104601322A/zh
Publication of CN104601322A publication Critical patent/CN104601322A/zh
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

本发明公开了一种用于密码芯片中三元扩域的蒙哥马利阶梯算法,包括如下步骤:步骤(1),计算kn-1,…,k0,满足k=kn-13n-1+…+k0,其中kn-1=1或2;步骤(2),R[0]=kn-1P,R[1]=(kn-1+1)P;步骤(3),i从n-2到0循环:其中,步骤(3.1),如果ki=0,那么R[2]=3R[0],R[1]=2R[0]+R[1];步骤(3.2),如果ki=1,那么R[2]=2R[0]+R[1],R[1]=R[0]+2R[1];步骤(3.3),如果ki=2,那么R[2]=R[0]+2R[1],R[1]=3R[1];步骤(3.4),R[0]=R[2];步骤(4),输出R[0]。本发明充分利用三元扩域的特点,即3次方能够迅速地计算;从而提高了椭圆曲线上点乘的计算效率。同时,本发明只需要x坐标参与运算,可以节省密码芯片的存储开销。

Description

用于密码芯片中三元扩域的蒙哥马利阶梯算法
技术领域
本发明涉及密码学领域,特别是涉及一种用于密码芯片中三元扩域的蒙哥马利阶梯算法。
背景技术
三元扩域GF(3m)上的椭圆曲线可以表示为y2=x3+ax2+b,其中a,b∈GF(3m),且b≠0。点(x,y)的逆元是(x,-y)。
对于椭圆曲线上任意点P,定义P+∞=P。
对于椭圆曲线上任意点P=(x1,y1)≠∞和Q=(x2,y2)≠∞,如果记P+Q=(x3,y3),则x3=λ2-a-x1-x2,y3=λ·(x1-x3)-y1,其中 λ = y 2 - y 1 x 2 - x 1 .
对于椭圆曲线上任意点P=(x1,y1)≠∞,如果记2P=(x2,y2),则x2=λ2-a+x1,y2=λ(x1-x2)-y1,其中
对于椭圆曲线上任意点P=(x1,y1)≠∞,如果记3P=(x3,y3),则
x 3 = ( ( x 1 3 + b ) 3 - a 3 bx 1 3 ) / ( a 2 ( x 1 3 + b ) 2 ) ,
y 3 = ( y 1 9 - a 3 y 1 3 ( x 1 3 + b ) 2 ) / ( a 3 ( x 1 3 + b ) 3 ) .
蒙哥马利阶梯(Montgomery ladder)算法最初是针对二元扩域提出,根据其推导方法,也可以得到针对三元扩域的蒙哥马利阶梯算法如下:
步骤(1),计算kn-1,…,k0,满足k=kn-12n-1+…+k0,其中kn-1=1;
步骤(2),R[0]=dn-1P,R[1]=(dn-1+1)P;
步骤(3),i从n-2到0循环,其中:
步骤(3.1),如果ki=0,那么R[2]=2R[0],R[1]=R[0]+R[1];
步骤(3.2),如果ki=1,那么R[2]=R[0]+R[1],R[1]=2R[1];
步骤(3.3),R[0]=R[2];
步骤(4),输出R[0]。
为了表述清晰,把P,R[0],R[1],R[0]+R[1]的x坐标分别记为x0,x1,x2,x3,于是
x 3 = b + x 1 · x 2 · ( a - x 1 - x 2 ) ( x 2 - x 1 ) 2 - x 0 .
以上方法的不足在于它没有充分利用三元扩域的特性,即三元扩域中x3可以迅速实现。从而导致三元扩域的蒙哥马利阶梯算法在密码芯片中运算效率低下,以至于许多密码芯片不得不选用其它方法。
发明内容
本发明要解决的技术问题是提供一种用于密码芯片中三元扩域的蒙哥马利阶梯算法,能够提高椭圆曲线上点乘的计算效率,且可以节省密码芯片的存储开销。
为解决上述技术问题,本发明的用于密码芯片中三元扩域的蒙哥马利阶梯算法,包括如下步骤:
步骤(1),计算kn-1,…,k0,满足k=kn-13n-1+…+k0,其中kn-1=1或2;
步骤(2),R[0]=kn-1P,R[1]=(kn-1+1)P;
步骤(3),i从n-2到0循环,其中:
步骤(3.1),如果ki=0,那么R[2]=3R[0],R[1]=2R[0]+R[1];
步骤(3.2),如果ki=1,那么R[2]=2R[0]+R[1],R[1]=R[0]+2R[1];
步骤(3.3),如果ki=2,那么R[2]=R[0]+2R[1],R[1]=3R[1];
步骤(3.4),R[0]=R[2];
步骤(4),输出R[0]。
其中2R[0]+R[1]=(R[0]+R[1])+R[0],即可以先计算R[0]+R[1],再加R[0]来得到2R[0]+R[1]。这样计算的优势在于可以只用x坐标。为了表述清晰,把P,R[0],R[1],R[0]+R[1],2R[0]+R[1]的x坐标分别记为x0,x1,x2,x3,x4,于是
x 3 = b + x 1 · x 2 · ( a - x 1 - x 2 ) ( x 2 - x 1 ) 2 - x 0
x 4 = b + x 1 · x 3 · ( a - x 1 - x 3 ) ( x 1 - x 3 ) 2 - x 2
对于2R[1]+R[0]也用相同的方法计算,只需要改变下标即可。又根据背景知识知,计算三倍点3P的x坐标只需要P点的x坐标,所以本发明的整个过程也只用x坐标就足够,不需要y坐标。
本发明充分利用三元扩域的特点,即3次方能够迅速地计算;从而提高了椭圆曲线上点乘的计算效率。同时,本发明只需要x坐标参与运算,可以节省密码芯片的存储开销。
附图说明
下面结合附图与具体实施方式对本发明作进一步详细的说明:
附图是在标量乘计算过程中使用本发明的流程图。
具体实施方式
为了使三元扩域的蒙哥马利阶梯算法适用于密码芯片,本发明基于三元扩域提出了一个新的蒙哥马利阶梯算法。这种算法适用于计算密码芯片中椭圆曲线的点乘。
下面结合附图,进一步说明本发明的具体实施细节。
取三元扩域GF(397),为了表述清晰,三元扩域中的元素用多项式系数表示。取椭圆曲线y2=x3+ax2+b的参数a和b分别为:
a=1002122120101011202210022222122102020222122012120021212000000211210002200121001,
b=0010212221001211012212102120011201010220011012101212120202212122122002211001221。
蒙哥马利阶梯方法的特点是只需要x坐标,于是随机选择一个点P,它的x坐标值为:
1010202201211002121002111111122012210112012022112120201011011210020121002002220。
令k=7,则k1=2,k0=1,这里n=2。
R[0]的x坐标值为:
1212220201012201100101010002101111112201112211221012002201221022222102201220222。
R[1]的x坐标值为:
0201110111101101121012210110211211200100002202102202212202221102102100111010212。
因为i←n-2=0,k0=1,所以计算R[2]←2R[0]+R[1],R[1]←R[0]+2R[1]得到R[2]的x坐标值为:
0102012012102222000001221100012221011011120111212101101120102122101210112111101。
R[1]的x坐标值为:
0202101200200120011120110121120201212202022012010002011210220220002220011200122。
R[0]←R[2]i←i-1=0,最后输出R[0]的x坐标值为:
0102012012102222000001221100012221011011120111212101101120102122101210112111101。
以上通过具体实施方式对本发明进行了详细的说明,但这些并非构成对本发明的限制。在不脱离本发明原理的情况下,本领域的技术人员还可做出许多变形和改进,这些也应视为本发明的保护范围。

Claims (3)

1.一种用于密码芯片中三元扩域的蒙哥马利阶梯算法,其特征在于,包括如下步骤:
步骤(1),计算kn-1,…,k0,满足k=kn-13n-1+…+k0,其中kn-1=1或2;
步骤(2),R[0]=kn-1P,R[1]=(kn-1+1)P;
步骤(3),i从n-2到0循环,其中:
步骤(3.1),如果ki=0,那么R[2]=3R[0],R[1]=2R[0]+R[1];
步骤(3.2),如果ki=1,那么R[2]=2R[0]+R[1],R[1]=R[0]+2R[1];
步骤(3.3),如果ki=2,那么R[2]=R[0]+2R[1],R[1]=3R[1];
步骤(3.4),R[0]=R[2];
步骤(4),输出R[0]。
2.如权利要求1所述的蒙哥马利阶梯法,其特征在于:整个所述算法只需要x坐标参与运算。
3.如权利要求1或2所述的蒙哥马利阶梯算法,其特征在于:步骤3.1和3.2中2R[0]+R[1]通过以下公式计算:
x 3 = b + x 1 · x 2 · ( a - x 1 - x 2 ) ( x 2 - x 1 ) 2 - x 0
x 4 = b + x 1 · x 3 · ( a - x 1 - x 3 ) ( x 1 - x 3 ) 2 - x 2
其中x0,x1,x2,x3,x4分别为P,R[0],R[1],R[0]+R[1],2R[0]+R[1]的x坐标。
CN201310533581.0A 2013-10-31 2013-10-31 用于密码芯片中三元扩域的蒙哥马利阶梯算法 Pending CN104601322A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310533581.0A CN104601322A (zh) 2013-10-31 2013-10-31 用于密码芯片中三元扩域的蒙哥马利阶梯算法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310533581.0A CN104601322A (zh) 2013-10-31 2013-10-31 用于密码芯片中三元扩域的蒙哥马利阶梯算法

Publications (1)

Publication Number Publication Date
CN104601322A true CN104601322A (zh) 2015-05-06

Family

ID=53126853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310533581.0A Pending CN104601322A (zh) 2013-10-31 2013-10-31 用于密码芯片中三元扩域的蒙哥马利阶梯算法

Country Status (1)

Country Link
CN (1) CN104601322A (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1280726A (zh) * 1997-12-05 2001-01-17 保密信息技术公司 优化椭圆曲线密码计算的变换方法
CN101968732A (zh) * 2010-10-09 2011-02-09 中国人民解放军信息工程大学 检错比特并行脉动阵列移位多项式基乘法器
US20120207298A1 (en) * 2011-02-11 2012-08-16 Infineon Technologies Ag Apparatus and method for calculating a result in a scalar multiplication
CN102761411A (zh) * 2011-04-27 2012-10-31 航天信息股份有限公司 p元域SM2椭圆曲线密钥协商系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1280726A (zh) * 1997-12-05 2001-01-17 保密信息技术公司 优化椭圆曲线密码计算的变换方法
CN101968732A (zh) * 2010-10-09 2011-02-09 中国人民解放军信息工程大学 检错比特并行脉动阵列移位多项式基乘法器
US20120207298A1 (en) * 2011-02-11 2012-08-16 Infineon Technologies Ag Apparatus and method for calculating a result in a scalar multiplication
CN102761411A (zh) * 2011-04-27 2012-10-31 航天信息股份有限公司 p元域SM2椭圆曲线密钥协商系统

Similar Documents

Publication Publication Date Title
Nogami et al. Integer variable χ–based ate pairing
CN101867474B (zh) 数字签名方法
CN101938349A (zh) 一种适用于硬件实现的s盒及其电路实现方法
CN105245343A (zh) 一种基于多变量密码技术的在线离线签名系统及方法
CN105245320A (zh) LTE上行参考信号的q阶ZC序列的生成方法及装置
CN103685110A (zh) 一种预失真处理的方法、系统及预失真系数运算器
Varahram et al. A low complexity partial transmit sequence for peak to average power ratio reduction in OFDM systems
CN104506316A (zh) 一种基于sm2基点的点乘运算方法
CN104601322A (zh) 用于密码芯片中三元扩域的蒙哥马利阶梯算法
WO2018145190A1 (en) Elliptic curve cryptography scheme with simple side-channel attack countermeasure
Fournaris et al. Designing and evaluating high speed elliptic curve point multipliers
Ajeena et al. The computational complexity of elliptic curve integer sub-decomposition (ISD) method
Longa et al. Novel precomputation schemes for elliptic curve cryptosystems
Liu et al. Convergence rate of Euler–Maruyama scheme for stochastic pantograph differential equations
Huang et al. Fuzzy controlling window for elliptic curve cryptography in wireless sensor networks
Costello et al. Avoiding full extension field arithmetic in pairing computations
Mao et al. A bounded derivative method for the maximum likelihood estimation on Weibull parameters
Abdurahmonov et al. A Proposed Implementation of Elliptic Curve Exponentiation over Prime Field () in the Global Smart Cards
Mahdavi et al. Efficient scalar multiplications for elliptic curve cryptosystems using mixed coordinates strategy and direct computations
CN102237096B (zh) 一种对音频数据进行反量化的方法及装置
Ikesaka et al. Improvement of Miller Loop for a Pairing on FK12 Curve and its Implementation
Somsuk A new modified integer factorization algorithm using integer modulo 20's technique
CN103501226B (zh) 一种改进的多变量公钥签名方案
CN107959565A (zh) 一种统一aes和sm4 s盒的实现方法
Haraty et al. Hardening the elgamal cryptosystem in the setting of the second group of units.

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150506