Questions tagged [modular-arithmetic]
The modular-arithmetic tag has no usage guidance.
89
questions
1
vote
1
answer
442
views
Why modulo-2 arithmetic over n-bits doesn't produce single bit result?
I was studying CRC and came across modulo 2 arithmetic. When we add two 1 bit numbers like 1 + 1, 0 + 1, then the result is summation modulo 2 which is similar to XORing of the two bits. My doubt is ...
1
vote
0
answers
45
views
Montgomery multiplication -- algorithm question
I am a beginner, but I think I understand how to do Montgomery multiplication. Also, there are online calculators (for dummies like me)... But I have a paper in front of me, that is all about how to ...
1
vote
2
answers
388
views
What algorithm is prefered to do a x b mod P with big numbers (256 bits)
I'm trying to implement multiple precision arithmetic operations modulo P, with P < 2^256.
More specifically, ...
1
vote
1
answer
222
views
Which is (if any) the generic fastest method to perform modular exponentiation?
After a bit of surfing, I have found that Schönhage–Strassen (without taking in consideration recent optimizations) seems to be the base algorithm to perform the requested operation. Anyways, this ...
3
votes
1
answer
334
views
Is quadratic nonresiduosity in $\textbf{NP}$?
The paper "The Knowledge Complexity of Interactive Proof Systems" uses the language of quadratic nonresidues defined via the following excerpt from page 293 as an example of constructing an ...
3
votes
2
answers
193
views
Find a vector of non-negative integers $b$ that minimizes $\prod_{i = 1}^{D}\left(a_i + b_i\right)$ such that the product is a multiple of $c$
I'm trying to come up an efficient algorithm that, given a list of positive integers $a = \left(a_1, \ldots, a_D\right)$ and positive integer $c$, finds a list of non-negative integers $b = (b_1, \...
1
vote
1
answer
111
views
RSA Encryption for specitic messages x with x = ap mod pq for ap-bq=1
I want to make a following proof but I got some difficulties with it.
Would be super if you people have any tips / advises.
Introduction:
Let (N,e) be our public key and (N,s) our private key with $N=...
2
votes
3
answers
523
views
Shortest path in modular arithmetic
Suppose we have 7 vertices, each of which corresponds to a different integer modulo seven. The edge exists between two vertices x and y if x + 3 ≡ y mod 7. For example, there is an edge between 0 and ...
0
votes
1
answer
72
views
Algorithm to find slope of line with a modulus
Say I have some data which represents a single line, and I want to determine its approximate slope. This data has a known minimum and maximum on the y-axis. When the line crosses the maximum, it re-...
2
votes
0
answers
235
views
Understanding CRC Computation with PCLMULQDQ
I am currently reading this paper which shows how to calculate CRC using the instruction PCLMULQDQ. I don't quite understand the equations in it yet.
Starting with this one for the definition of ...
0
votes
1
answer
137
views
Finding The Inverse of The Modulo Operation
I created an algorithm to convert a hexadecimal digit into an alphanumeric string, but now I want to create the inverse of this algorithm. The algorithm, in short, is as follows:
hexadecimal digit %...
1
vote
3
answers
73
views
rolling around running numbers
I'm numbering generated files with two digits 00-99 and I want to retain the last 50.
The algorithm should tell me the number of the current file that I'm about to save and which of the previous files ...
2
votes
2
answers
445
views
How does Pollard's rho algorithm work?
I am trying to understand how does Pollard's rho algorithm actually work, but I just can not wrap my head around it. I already read its section in the CLRS book and ...
1
vote
0
answers
54
views
Optimization of modular exponentiation using fft [duplicate]
My math/cs professor said it is trivial to optimize a modular exponentiation ($a^b \bmod c$) problem using fft, yet I am not able to understand how to do this.
I found 3 papers on this ([1], [2], ...
1
vote
0
answers
268
views
Optimization of modular exponentiation using fft
My math prof said it is trivial to optimize a modular exponentiation (a^b mod c) problem for large values using fft, but I can't figure out how to do this. I looked it up and found a few papers on it (...