Questions tagged [montgomery-multiplication]
A modular multiplication algorithm invented by Montgomery that allows modular arithmetic to be performed efficiently when the modulus is large (typically several hundred bits).
37
questions
9
votes
1answer
5k views
Which one is fastest? Karatsuba or Montgomery multiplication?
Is there any complexity analysis between Karatsuba and Montgomery multiplication algorithms? It seems that Karatsuba is more general in the sense that is not modulo tuned while Montgomery it is. Does ...
7
votes
2answers
937 views
RSA Timing Attack on “Extra” Montgomery Reduction
In "A practical implementation of the timing attack", the authors take advantage of a timing difference that stems from "extra reductions" that occur when multiplying numbers in the Montgomery form. ...
5
votes
2answers
2k views
Advantages of Montgomery Ladder-based Scalar Multiplication
I do not quite understand what the greatest advantages are of using the Montgomery ladder algorithm for scalar multiplication?
Can someone help me out?
4
votes
1answer
134 views
How does Montgomery reduction work?
I want to reduce a multi-precision integer $x$ modulo a prime $p$, very fast. Performing the traditional Euclidean division for only calculating the modulo, is inefficient and modular reduction is at ...
4
votes
1answer
1k views
Efficient setup for a Montgomery multiplication
Montgomery described an efficient method to compute a modular multiplication. This works by using a special constant $R$ and assumes the inputs $a$ and $b$ have been made into a special representation ...
4
votes
1answer
541 views
What is a u-coordinate within Elliptic Curve Diffie-Hellman using the Montgomery ladder
I am trying to understand the below paragraph.
Elliptic curve Diffie-Hellman is often calculated using the Montgomery
ladder. This gives a simple and efficient calculation that is
naturally ...
4
votes
1answer
789 views
Blockwise Montgomery multiplication
I have to implement a 256*256 bit Montgomery multiplier for pairing computations. The straightforward approach is to use a bit-serial version, but I would like to utilize the built-in 64*64 bits ...
4
votes
2answers
210 views
Why should $a,b < N$ for Montgomery Reduction?
In Montgomery reduction, when calculating $a \times b \mod N$, it is required that $a \lt N$ and $b \lt N$.
I think $0 \le T \lt N \times R$ is enough for the Montgomery Reduction.
Rationale:
Let $a'...
4
votes
0answers
749 views
Fastest known Elliptic Curve Cryptography “solution” (coordinate systems (multiple?), algorithms, precomputed values etc)?
I am writing an Elliptic Curve Cryptography SDK in pure Swift, and currently I am only using Affine Point and simple Double-and-add. I am soon about to work on a faster solution.
I am asking for help ...
3
votes
1answer
261 views
What happens if no final subtraction is done in Montgomery multiplication?
I'm doing Montgomery arithmetic modulo $N = 2^{255}-19$ for the Curve25519, picking $R = 2^{256}$ for Montgomery.
After multiplying two numbers $0 \leq A,B < N$ in the Montgomery representation ...
3
votes
0answers
101 views
Attack on Weierstrass Elliptic Curve
I have a naive question(as non specialist in this field).
While reading Weierstrass Curve description,I found that it turns into 2 periodic tori on 2D complex plane.
Is is it possible to create ...
3
votes
0answers
84 views
How to use Montgomery arithmetic for elliptic curves (FIAT cryptography)
Let us consider the source code for curve P-256 from BoringSSL. This source code can be found here. This source code uses the FIAT generated implementation for field arithmetic. This implementation ...
3
votes
2answers
3k views
Montgomery Reduction
I'm taking a hardware cryptography class and working on a problem that focuses on Montgomery Reduction.
So by definition:
Computing $a * b \text{ mod } N$
Pick $R$, s.t. $R > N$, $gcd(R,N) = 1$
...
2
votes
1answer
545 views
Questions about the Curve25519-donna implementation
I'm trying to understand the implementation of the following function:
Please note questions in comments.
...
2
votes
1answer
114 views
Meaning of pseudocode “$(C, S):=$”
I've seen pseudocode of this form in the Montgomery multiplication related theses: $(C, S) := a[j]*b[0]+C$.
What's the meaning of "$(C, S):=$", or what is the real code that was converted from this ...
2
votes
1answer
149 views
Montgomery Multiplication with CRT
I am attempting to understand how to use Montgomery multiplication in an RSA private key operation: $X \equiv a^{e} \pmod{n}$ where $a$ is the message, $e$ is the exponent, $n$ is the modulus.
Using ...
2
votes
0answers
208 views
Montgomery modular multiplication ā confusion with subtraction of modulus
I'm reading the paper āCOMPARISON OF SCALABLE MONTGOMERY MODULAR MULTIPLICATION IMPLEMENTATIONS EMBEDDED IN RECONFIGURABLE HARDWAREā (PDF) on hardware algorithms for montgomery multiplication for ...
2
votes
0answers
89 views
Implementing modular reductions (n*n) [closed]
I'm implementing a public key cryptosystem in a proprietary System On Chip that only allows modular reductions by $n$.
However, that cryptosystem requires ($n^2$) modular reductions. Perhaps someone ...
1
vote
1answer
1k views
Montgomery Exponentiation - selecting input value R for a given BigInteger
I have Montgomery exponentiation working, but it's working quite slow. I suspect there are two reasons for this - I implemented it bit size instead of word size (I didn't realize at the time that ...
1
vote
2answers
491 views
Montgomery multiplication without final subtraction
I am looking for methods to avoid the final subtraction in Montgomery multiplication. I found this paper "A Cryptographic Library for the Motorola DSP56000 " (http://goo.gl/DHePEx) In this paper they ...
1
vote
2answers
610 views
Montgomery Algorithm
I'm trying to understand how it works and how to implement the algorithm described in
this paper. The paper shows a methods to compute a modular multiplication where it is used multiplier with a ...
1
vote
2answers
99 views
Understanding Montgomery's parameterization of elliptic curves
I'm having a bit of trouble understanding the translation of affine coordinates to projective coordinates in Montgomery curve ECM. Would be very thankful if someone could explain it by expanding the ...
1
vote
1answer
95 views
Montgomery Ladder with affin/projective Coordinates
So I'm trying to understand why the montgomery arithmetic is fast and what the montgomery ladder is.
With this Post i understood the basic affin arithmetic and Ladder.
So this is not really faster ...
1
vote
1answer
100 views
Question about using Montgomery form for elliptic curve operations on bls12-381
Since the prime for bls12-381 is not of a form to allow easy modular reduction , is the best approach to use the Montgomery multiplication + reduction algorithm?
...
1
vote
1answer
109 views
Montgomery Reduction - Conditions on R
In Montgomery Reduction, we need to compute $z = x y \text{ mod } N$ and the Montgomery Reduction of $x$ is $xR^{-1}$.
Why should the choice of $R$ be $2^l$ where $l$ is the length of $N$ to the ...
1
vote
1answer
159 views
What scalars produce the wrong values with X25519's montgomery ladder?
This question is a consequence of an older one about multiplying a twisted Etwards point in Montgomery space. Turns out that this is unsafe in some circumstances.
The following Montgomery ladder as ...
1
vote
0answers
34 views
Missing Final Step in Montgomery Reduction
I'm following well with using the shifting method to try out the Montgomery reduction (1st round).
However, the computed result is actually equal to:
$$XYR^{-1} \bmod N$$
while the final goal is to ...
1
vote
0answers
22 views
Size of messages in timing attack on RSA Montgomery
I'm codin' timing attack on RSA Montgomery which compares two sets ( the first one includes those which need a reduction in contrary to the second one ). But I got troubles with the Montgomery ...
1
vote
0answers
465 views
RSA timing attack
Given an RSA implementation that uses Montgomery multiplications and CIOS exp algo, but NOT CRT.
Given a decryption1 oracle that takes chosen cipher text and responds the plain text and the time it ...
0
votes
1answer
41 views
montgomery reduction multiplicative identity
How do you figure out the multiplicative and additive identity with respects to R?
I pick some R such that gcd(R, N) = 1 where N is the size of the group.
Given some field element x in the group, I ...
0
votes
0answers
104 views
Can we defends against RSA Timing attack when we use java.math.BigInteger.modPow?
I think that Montgomery and sliding window techniques are applied within java.math.BigInteger.modPow (and more specifically ...
0
votes
0answers
63 views
Can someone explain the timing attack on RSA with Montgomery multiplication?
I have read several articles on the temporal attack against Montgomery multiplication to speedup RSA computations. However, I do not quite get the principle.
I understood that there is a additional ...
0
votes
0answers
48 views
GCD in Montgomery arithmetic
Wikipedia article on Montgomery modular multiplication contains the following statement:
Many operations of interest modulo $N$ can be expressed equally well in Montgomery form. Addition, ...
0
votes
0answers
49 views
Speeding up quotient determination in high-radix montgomery modular multiplication
In this paper Simplifying Quotient Determination in High-Radix Modular Multiplication, the authors have proposed to replace the original modulus $M$ in Montgomery Multiplication $ABR^{-1} \bmod{M}$ to ...
0
votes
1answer
424 views
Confused about final subtraction of modulus in Montgomery Multiplication, during modular exponentiation
I'm confused about how one might supposedly bypass the final subtraction of the modulus in radix-2 montgomery modular multiplication, when used in a modular exponentiation algorithm. The following two ...
0
votes
0answers
305 views
Montgomery Multiplication in FPGA explanation
I'm trying to implement an RSA module in a FPGA. I choose to use Montgomery multiplication. I've found a document where the Montgomery Multiplication is pretty clear. I don't understand only a step.
...
-1
votes
1answer
268 views
Montgomery and Galois fields
I'm a little bit confused about the design of a RSA module in VHDL. My question isn't directly related to hardware design. I've read a lot of publications and I bought also a book. In one publications ...