Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Unsigned processing method of modular inversion algorithm and modular inversion accelerator

A processing method, unsigned technology, applied in the field of public key cryptography, can solve problems such as widening, cumbersome integrated circuits, resource consumption, etc., and achieve the effect of reducing occupation, improving operation speed, and exempting the processing of symbols and carry

Inactive Publication Date: 2016-05-11
杭州朔天科技有限公司
View PDF3 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0015] 1) In public-key cryptographic algorithms such as RSA and ECC, almost all operations including modular inversion are based on the finite prime number field, that is, the input and output are all positive integers in the finite prime number field [1, P]. That is to say, all basic operations are operations of unsigned numbers. However, the subtraction operation in the iterative process of the above algorithm may produce negative results, and this negative number will be used as input data to participate in addition operations or shifts, which means The whole iterative process is actually a signed addition, subtraction, and shift operation, which requires an additional circuit to deal with the sign problem, making the integrated circuit cumbersome;
[0016] 2) The addition operations in the above algorithm are: X1=X1+u; Y1=Y1+u; these addition operations will generate carry; the subtraction operations in the above algorithm are: Y2=Y2-v; X2=X2-v; X1=X1 -Y1; X2=X2-Y2; X3=X3-Y3; Y1=Y1-X1; Y2=Y2-X2; Y3=Y3-X3; Borrow will be generated in these subtraction operations; Borrow of the result of each round of iteration Or the carry may be canceled or superimposed in the next iteration process. In the continuous repetition, this superposition is unpredictable; when implementing the algorithm in an integrated circuit, in order to ensure the correctness of the calculation, often have to To deal with this problem, widen the bit width of borrow and carry and add additional circuits;
[0017] 3) The above algorithm, for two input data v and u, can get the multiplicative inverse element v of v for u -1 modu, you can also get the multiplicative inverse u of u for v -1 modv, however, the modular inverse operation in RSA, ECC and other public key cryptographic algorithms only needs to obtain the multiplicative inverse element a of the number a in the finite prime number field Fp -1 Modp is enough, so the above-mentioned Euclidean extended modulo inversion algorithm has some unnecessary calculations for the public key cryptographic algorithm. In integrated circuit applications, these redundant calculations make the algorithm as a whole time-consuming and resource-consuming.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Unsigned processing method of modular inversion algorithm and modular inversion accelerator
  • Unsigned processing method of modular inversion algorithm and modular inversion accelerator
  • Unsigned processing method of modular inversion algorithm and modular inversion accelerator

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] Such as figure 1 As shown, the unsigned processing method of the modular inverse algorithm is based on the extended Euclidean algorithm in the public key cryptography algorithm, and the modular subtraction operation is used to replace the subtraction operation in step 3 and condition 3 of the extended Euclidean algorithm, eliminating Step 3 of the extended Euclidean algorithm, the relevant operations on the temporary variables X2 and Y2 in condition 1 and condition 2, the modified algorithm is as follows:

[0042] Input: prime number p, a ∈ [1, p-1];

[0043] output: a -1 modp;

[0044] Step 1, initializing intermediate variables X1, X3, Y1, Y3, making it respectively: X1=1; X3=a; Y1=0; Y3=p;

[0045] Step 2. Determine the value of Y3: if Y3 is not 0, go to step 3; otherwise, go to step 4;

[0046] Step 3: Determine the following conditions in turn and perform related operations:

[0047] Condition 1: If X3 is an even number, complete the following operations: 1. C...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an unsigned processing method of a modular inversion algorithm and a modular inversion accelerator. Based on the extended Euclidean algorithm in a public key cryptography algorithm, the subtraction operation in the condition 3 in the step 3 of the expanded Euclidean algorithm is replaced by the modular reduction operation. Related operation about temporary variables X2 andY2 in the condition 1 and the condition 2 in the step 3 of the expanded Euclidean algorithm is eliminated. The modular inversion accelerator comprises a bus port, an operation control layer, a data path and a memory port, which are successively connected. The operation control layer is formed by a modular inversion operation control module and a sub-operation module, which are mutually communicated. The data path is formed by an N-bit register and an N-bit summator, which are communicated to each other. In this way, a hardware circuit of the modular inversion algorithm is easy to achieve; theexpanded Euclidean algorithm is simplified; processing of symbols and carry bits in the process is eliminated; the two variables are eliminated; unnecessary operation and occupancy of a storage unit are reduced; and 1 / 3 of operation speed is increased.

Description

technical field [0001] The invention relates to the technical field of public key cryptographic algorithms, in particular to an unsigned processing method of a modular inverse algorithm and a modular inverse accelerator. Background technique [0002] In public key cryptographic algorithms such as RSA and ECC, the extended Euclidean algorithm is generally used to realize the modular inverse operation. The extended Euclidean algorithm is as follows: [0003] input: v, u [0004] output: v -1 modu; u -1 modv. [0005] Step 1, initializing intermediate variables X1, X2, X3, Y1, Y2, Y3, making it respectively: X1=1; X2=0; X3=v; Y1=0; Y2=1; Y3=u; [0006] Step 2. Determine the values ​​of X3 and Y3: if both X3 and Y3 are not 1, go to step 3; otherwise, go to step 4; [0007] Step 3: Determine the following conditions in turn and perform related operations: [0008] Condition 1. If X3 is an even number: if X1 and X2 are also even numbers, then calculate: X1=X1 / 2, X2=X2 / 2, X3=...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): H04L9/30
CPCH04L9/3006
Inventor 唐从学修思文陈华锋
Owner 杭州朔天科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products