CN104660400A - RSA modular exponentiation calculation method and device - Google Patents

RSA modular exponentiation calculation method and device Download PDF

Info

Publication number
CN104660400A
CN104660400A CN201310608764.4A CN201310608764A CN104660400A CN 104660400 A CN104660400 A CN 104660400A CN 201310608764 A CN201310608764 A CN 201310608764A CN 104660400 A CN104660400 A CN 104660400A
Authority
CN
China
Prior art keywords
value
modular exponentiation
private key
rsa modular
rsa
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
CN201310608764.4A
Other languages
Chinese (zh)
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 Fudan Microelectronics Co Ltd
Shanghai Fudan Microelectronics Group Co Ltd
Original Assignee
Shanghai Fudan Microelectronics Group 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 Fudan Microelectronics Group Co Ltd filed Critical Shanghai Fudan Microelectronics Group Co Ltd
Priority to CN201310608764.4A priority Critical patent/CN104660400A/en
Publication of CN104660400A publication Critical patent/CN104660400A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a RSA modular exponentiation calculation method and device. The RSA modular exponentiation calculation method comprises the following steps: acquiring a random number r, a public key e and a private key d; calculating a first value, wherein the first value is a value that the product of the public key e and the private key d minus 1; calculating a second value, wherein the second value is the product of the random number r and the first value; calculating a third value, the third value is the sum of the second value and the private key d; performing RSA modular exponentiation calculation by taking the third value as an index of RSA modular exponentiation calculation. By adopting the method and the device, the data security can be improved.

Description

A kind of RSA modular exponentiation operation method and device
Technical field
The present invention relates to the technical field of data security, particularly a kind of RSA modular exponentiation operation method and device.
Background technology
In the prior art, assailant generally can by gather the hardware device such as cryptographic system, encryption chip being encrypted, decipher or signature operation time the reveal information such as the power consumption that produces, utilize cryptography, probability, Principle of Statistics, analysis and decoding key information.Such as, in the Montgomery Algorithm method of RSA public key encryption algorithm, when key d directly carries out computing as the index of Montgomery Algorithm, assailant just can directly obtain described key d by above-mentioned analysis, and decodes encrypted data by described key d.
Therefore, need to propose a kind of new RSA modular exponentiation operation method and device, to improve the fail safe of data.
Summary of the invention
The problem that the present invention solves proposes a kind of new RSA modular exponentiation operation method and device, to improve the fail safe of data.
The embodiment provides a kind of RSA modular exponentiation operation method, described method comprises: obtain random number r, PKI e and private key d; Calculate the first value, described first value is that the product of PKI e and private key d deducts the value after 1; Calculate the second value, described second value is the product of described random number r and described first value; Calculate the 3rd value, described 3rd value for described second value and private key d with; Described 3rd value is carried out described RSA modular exponentiation computing as the index of RSA modular exponentiation computing.
Embodiments of the invention additionally provide a kind of RSA modular exponentiation arithmetic unit, and described device comprises: acquiring unit, for obtaining random number r, PKI e and private key d; First arithmetic element, for calculating the first value, described first value is that the product of PKI e and private key d deducts the value after 1; Second arithmetic element, for calculating the second value, described second value is the product of described random number r and described first value; 3rd arithmetic element, for calculating the 3rd value, described 3rd value for described second value and private key d with; Montgomery Algorithm unit, for carrying out described RSA modular exponentiation computing using described 3rd value as the index of RSA modular exponentiation computing.
Compared with prior art, embodiments of the invention have the following advantages:
In technique scheme, private key d is the direct index as RSA modular exponentiation computing not, but by adding random number r, described private key d is hidden, thus the corresponding relation between the median eliminated in algorithm implementation and reveal information, that is assailant is difficult to directly obtain private key d, is therefore also just not easy to crack enciphered data, therefore can improves the fail safe of data.
Accompanying drawing explanation
Fig. 1 is the flow chart of RSA modular exponentiation operation method in the embodiment of the present invention;
Fig. 2 is the structural representation of RSA modular exponentiation arithmetic unit in the embodiment of the present invention.
Embodiment
By describing technology contents of the present invention, structural feature in detail, being realized object and effect, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.Set forth a lot of detail in the following description so that fully understand the present invention, but the present invention can also adopt other to be different from alternate manner described here to implement, therefore the present invention is not by the restriction of following public specific embodiment.
Fig. 1 is the flow chart of RSA modular exponentiation operation method in the embodiment of the present invention.As shown in Figure 1, described method comprises step S101 to S105.
Step S101, obtains random number r, PKI e and private key d.
In an embodiment of the present invention, described random number r is variable random number, and that is, in each RSA modular exponentiation calculating process, described random number r can change.The object adding described random number r is to make the follow-up index carrying out RSA modular exponentiation computing be a randomized result, which eliminate the corresponding relation between median (private key d) in algorithm implementation and reveal information (information of the correlation of indices after randomization), thus make assailant be difficult to directly obtain private key d, be therefore also just not easy to crack enciphered data.
The index of the RSA modular exponentiation computing after randomization will be obtained below by step S102 to S104.
Step S102, calculate the first value, described first value is that the product of PKI e and private key d deducts the value after 1.
By step S102, the first value of acquisition is ed-1.
Step S103, calculates the second value, and described second value is the product of described random number r and described first value.
By step S103, described second value is the product of described random number r and described first value ed-1, that is: described second value is r (ed-1).
Step S104, calculate the 3rd value, described 3rd value for described second value and private key d with.
By step S104, described 3rd value for described second value r (ed-1) and private key d and, that is: described 3rd value be d+r (ed-1).
Step S105, carries out described RSA modular exponentiation computing using described 3rd value as the index of RSA modular exponentiation computing.
In an embodiment of the present invention, by step S104, using the 3rd value d+r(ed-1) as the index of RSA modular exponentiation computing.So, the value that the RSA modular exponentiation computing being index with described 3rd value obtains is: S=m d+r(ed-1)mod N.
As previously mentioned, on the one hand, with described 3rd value for index, with random number r in described index, which eliminate the corresponding relation between median (private key d) in algorithm implementation and reveal information (information of the correlation of indices after randomization), thus make assailant be difficult to directly obtain private key d.
On the other hand, according to the intrinsic property of RSA enciphering and deciphering algorithm: m ed) mod N=m, can derive as follows:,
S=m d+r(ed-1)mod N=(m dm redm -r)mod N=(m dm rm -1)mod N=m dmod N,
Shifted onto from above-mentioned, the RSA modular exponentiation operation result after described exponential random and the RSA modular exponentiation operation result before randomization are still consistent.
Embodiments of the invention additionally provide a kind of RSA modular exponentiation arithmetic unit.Please refer to Fig. 2, described kind of RSA modular exponentiation arithmetic unit 200 comprises:
Acquiring unit 210, for obtaining random number r, PKI e and private key d;
First arithmetic element 220, for calculating the first value, described first value is that the product of PKI e and private key d deducts the value after 1;
Second arithmetic element 230, for calculating the second value, described second value is the product of described random number r and described first value;
3rd arithmetic element 240, for calculating the 3rd value, described 3rd value for described second value and private key d with;
Montgomery Algorithm unit 250, for carrying out described RSA modular exponentiation computing using described 3rd value as the index of RSA modular exponentiation computing.
In an embodiment of the present invention, described first arithmetic element 220 can comprise multiplier and subtracter, described second arithmetic element 230 can be multiplier, and described 3rd arithmetic element 240 can be adder, and described Montgomery Algorithm unit 250 can be Montgomery Algorithm device.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
Although the present invention discloses as above, the present invention is not defined in this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.

Claims (2)

1. a RSA modular exponentiation operation method, is characterized in that, comprising:
Obtain random number r, PKI e and private key d;
Calculate the first value, described first value is that the product of PKI e and private key d deducts the value after 1;
Calculate the second value, described second value is the product of described random number r and described first value;
Calculate the 3rd value, described 3rd value for described second value and private key d with;
Described 3rd value is carried out described RSA modular exponentiation computing as the index of RSA modular exponentiation computing.
2. a RSA modular exponentiation arithmetic unit, is characterized in that, comprising:
Acquiring unit, for obtaining random number r, PKI e and private key d;
First arithmetic element, for calculating the first value, described first value is that the product of PKI e and private key d subtracts
Go the value after 1;
Second arithmetic element, for calculating the second value, described second value is described random number r and described first
The product of value;
3rd arithmetic element, for calculating the 3rd value, described 3rd value for described second value and private key d with;
Montgomery Algorithm unit, for carrying out described RSA using described 3rd value as the index of RSA modular exponentiation computing
Montgomery Algorithm.
CN201310608764.4A 2013-11-25 2013-11-25 RSA modular exponentiation calculation method and device Pending CN104660400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310608764.4A CN104660400A (en) 2013-11-25 2013-11-25 RSA modular exponentiation calculation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310608764.4A CN104660400A (en) 2013-11-25 2013-11-25 RSA modular exponentiation calculation method and device

Publications (1)

Publication Number Publication Date
CN104660400A true CN104660400A (en) 2015-05-27

Family

ID=53251138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310608764.4A Pending CN104660400A (en) 2013-11-25 2013-11-25 RSA modular exponentiation calculation method and device

Country Status (1)

Country Link
CN (1) CN104660400A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106685661A (en) * 2015-11-07 2017-05-17 上海复旦微电子集团股份有限公司 Method and device for public key verification
CN106685643A (en) * 2015-11-07 2017-05-17 上海复旦微电子集团股份有限公司 Method and device for verifying public key in CRT mode
CN108599951A (en) * 2018-08-10 2018-09-28 北京奇虎科技有限公司 Encryption method and device
CN108933670A (en) * 2018-10-18 2018-12-04 北京云测信息技术有限公司 A kind of digital signature method, device, mobile device and storage medium
CN110492998A (en) * 2019-08-14 2019-11-22 郑州大学 The method of encryption and decryption data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6230269B1 (en) * 1998-03-04 2001-05-08 Microsoft Corporation Distributed authentication system and method
CN101133593A (en) * 2003-07-31 2008-02-27 格姆普拉斯公司 Method for the secure application of a cryptographic algorithm of the RSA type and corresponding component
CN102082665A (en) * 2009-11-30 2011-06-01 中国移动通信集团公司 Identity authentication method, system and equipment in EAP (Extensible Authentication Protocol) authentication
CN102739401A (en) * 2012-06-05 2012-10-17 北京工业大学 Private key safety management method based on identity public key cryptography system
CN103401681A (en) * 2013-07-02 2013-11-20 北京华大信安科技有限公司 Modulus taking method, modulus taking device and chip

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6230269B1 (en) * 1998-03-04 2001-05-08 Microsoft Corporation Distributed authentication system and method
CN101133593A (en) * 2003-07-31 2008-02-27 格姆普拉斯公司 Method for the secure application of a cryptographic algorithm of the RSA type and corresponding component
CN102082665A (en) * 2009-11-30 2011-06-01 中国移动通信集团公司 Identity authentication method, system and equipment in EAP (Extensible Authentication Protocol) authentication
CN102739401A (en) * 2012-06-05 2012-10-17 北京工业大学 Private key safety management method based on identity public key cryptography system
CN103401681A (en) * 2013-07-02 2013-11-20 北京华大信安科技有限公司 Modulus taking method, modulus taking device and chip

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106685661A (en) * 2015-11-07 2017-05-17 上海复旦微电子集团股份有限公司 Method and device for public key verification
CN106685643A (en) * 2015-11-07 2017-05-17 上海复旦微电子集团股份有限公司 Method and device for verifying public key in CRT mode
CN106685643B (en) * 2015-11-07 2019-07-19 上海复旦微电子集团股份有限公司 The method and device of public key verifications under CRT mode
CN106685661B (en) * 2015-11-07 2019-07-19 上海复旦微电子集团股份有限公司 The method and device of public key verifications
CN108599951A (en) * 2018-08-10 2018-09-28 北京奇虎科技有限公司 Encryption method and device
CN108599951B (en) * 2018-08-10 2021-10-01 北京奇虎科技有限公司 Encryption method, encryption device, computing equipment and computer storage medium
CN108933670A (en) * 2018-10-18 2018-12-04 北京云测信息技术有限公司 A kind of digital signature method, device, mobile device and storage medium
CN108933670B (en) * 2018-10-18 2021-02-26 北京云测信息技术有限公司 Digital signature method and device, mobile device and storage medium
CN110492998A (en) * 2019-08-14 2019-11-22 郑州大学 The method of encryption and decryption data
CN110492998B (en) * 2019-08-14 2022-10-25 郑州大学 Method for encrypting and decrypting data

Similar Documents

Publication Publication Date Title
CN102546181B (en) Cloud storage encrypting and deciphering method based on secret key pool
CN103279916B (en) Based on the image encryption method of Double random phase and principle of interference
CN104660400A (en) RSA modular exponentiation calculation method and device
US9152383B2 (en) Method for encrypting a message through the computation of mathematical functions comprising modular multiplications
CN102437912B (en) Digital rights management method based on N RSA (Rivest Shamir Adleman) encryption algorithms based on chaotic algorithm
CN107004084B (en) Multiplicative mask for cryptographic operations
JP2013531436A5 (en)
JP2014002365A5 (en)
US20130279692A1 (en) Protecting modular exponentiation in cryptographic operations
JP2012129993A (en) Cryptographic device protection method and protection system
RU2017124139A (en) OPEN KEY ENCRYPTION SYSTEM
WO2017052755A1 (en) Secure data re-encryption
CN103024006A (en) Security outsourcing method for bilinear pairings under cloud computing environment
WO2016088453A1 (en) Encryption apparatus, decryption apparatus, cryptography processing system, encryption method, decryption method, encryption program, and decryption program
JP2014085674A5 (en)
CN104660399B (en) A kind of RSA modular exponentiation operation method and device
CN113225371A (en) Electric power Internet of things terminal control instruction encryption and decryption system and method
CN104683102A (en) SM2 signature calculation method and device
JP5742960B2 (en) Cryptographic apparatus and method and program
CN103745427A (en) Image encryption method based on iterative amplitude-phase retrieval algorithm
TW201629829A (en) Exponent splitting for cryptographic operations
CN103580869A (en) CRT-RSA signature method and device
JP2007334016A (en) Data enciphering device and method
CN103401681A (en) Modulus taking method, modulus taking device and chip
KR101440680B1 (en) Homomorphic Encryption and Decryption Method using Chinese Remainder Theorem and apparatus using the same

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