Explore chapters and articles related to this topic
Efficient Implementation
Published in Alfred J. Menezes, Paul C. van Oorschot, Scott A. Vanstone, Handbook of Applied Cryptography, 2018
Alfred J. Menezes, Paul C. van Oorschot, Scott A. Vanstone
Let m = (mnmn-1 ··· m1m0)b be a positive integer in radix b representation. Let x = (xnxn-1 ··· x1x0)b and y =(ynyn-1 ··· y1y0)b be non-negative integers in base b representation such that x < m and y < m. Methods described in this section are for computing x + y mod m (modular addition), x – y mod m (modular subtraction), and x · y mod m (modular multiplication). Computing x-1 mod m (modular inversion) is addressed in §14.4.3.
*Advanced Topics in Public-Key Encryption
Published in Jonathan Katz, Yehuda Lindell, Introduction to Modern Cryptography, 2020
The Paillier encryption scheme is useful in a number of settings because it is homomorphic. Roughly, a homomorphic encryption scheme enables (certain) computations to be performed on encrypted data, yielding a ciphertext containing the encrypted result. In the case of Paillier encryption, the computation that can be performed is (modular) addition. Specifically, fix a public key pk = N. Then the Paillier scheme has the property that multiplying an encryption of m1 and an encryption of m2 (with multiplication done modulo N2) results in an encryption of [m1 + m2 mod N]; this is because ((1+N)m1⋅r1N)⋅((1+N)m2⋅r2N)=(1+N)[m1+m2modN]⋅(r1r2)NmodN2.
Teaching redundant residue number system for electronics and computer students
Published in International Journal of Mathematical Education in Science and Technology, 2022
Another important concern is the selection of an appropriate conversion algorithm. The numbers are to be converted from binary to RNS by Bin/RNS converter and from RNS to binary by RNS/Bin converter. Bin/RNS converter translates a weighted integer number into residues of the RNS moduli set. Bin/RNS conversion is a simple procedure and can be well implemented by employing multi-operand modular adders. As an example, Bin/RNS converter for the moduli set can be designed as follows. Consider a k-bit weighted number R, where k = 3n, which can be represented in binary as follows: So, R can be partitioned into three consecutive n-bit blocks. The residues corresponding to the moduli set are to be computed. The residue (the residue associated with modulo ) is obtained simply by considering the least significant n bits of R, and the rest of the bits will be ignored because they are multiples of . The residue of R in modulo can be calculated by modular addition of the consecutive n-bit blocks () in modulo . The residue in modulo is obtained by adding the n-bit blocks with even indices (i = 0, 2, 4, …) incremented by n-bit blocks with odd indices (i = 1, 3, 5, …) in modulo . The modular addition/subtraction operations can be realized with a multi-operand modular adder comprising a modular carry save adder (CSA) tree followed by a modular adder (Navi et al., 2011). So, the problem of forward conversion is equivalent to p modular addition/subtraction of n-bit operands, where . Then the delay order of Bin/RNS conversion is as follows: For RNS/Bin conversion, there are some essential algorithms: Chinese remainder theorem (CRT) (Ding et al., 1996; Parhami, 2009), mixed-radix conversion (MRC) (Parhami, 2009) and new Chinese remainder theorems (New CRT-I and New CRT-II) (Wang, 2000). New CRTs have more efficient hardware implementation than the two preceding algorithms. A converter based on the New CRT-II is composed of operand preparation units, carry-save adder (CSA) with end-around carry (EAC), carry propagation adder (CPA), and modulo adder (Molahosseini et al., 2010). So, the order of RNS/Bin conversion is as follows: