Modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" upon reaching a certain value… the modulus.

learn more… | top users | synonyms

1
vote
1answer
58 views

Scalar Multiplication for Elliptic Curve

Let $\mathbb{E}$ be the elliptic curve $y^2 = x^3 + 6x \text{ mod } 11$ and consider the point $P = (2, 3)$ on it. How do I compute $3P$? I have been able to figure out what $2P$ is, $2P = (5,10)$. ...
1
vote
1answer
25 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 ...
0
votes
1answer
43 views

What is proper size of window Using RSA Window method?

I want to Use Window method for RSA modular Exponentiation. because of SCA. But I don`t know what is proper window size.
0
votes
0answers
55 views

How to calculate the exponent in modular exponentiation?

I have a problem when calculating power in modular, $a^b \bmod c = d$. where we can know values of $a$, $c$ and d, but we don't know values of $b$. example : $29^b \bmod 1024 = 365$. So, how can I ...
-3
votes
2answers
46 views

Is the one-time pad secure?

I have read about one-time pads (OTP) on Wikipedia. Is this secure? Can I actually use modular addition as ecryption like it said in Wikipedia? And the plaintext is as long as the OTP, so when I send ...
0
votes
1answer
58 views

How to decrypt an RSA ciphertext given an oracle providing the lower 8 bits of decryptions?

I have access to an oracle that can encrypt and partially decrypt a number with RSA-1024 algorithm. For encryption: \begin{equation} C = M^e\bmod n \end{equation} But for decryption, result will ...
2
votes
1answer
56 views

Multiplying integers modulo $2^{255}-19$ using the Curve25519 polynomial reduction algorithm

I'm reading the Curve25519 paper and I see that in page 11, under the title "Multiplying integers modulo $2^{255}-19$", it says: The coefficients of $x^{10}$; $x^{11}$; ...; $x^{18}$ in $uv$ are ...
-3
votes
1answer
43 views

Binary fast exponentiation method

Evaluate $17^{93} \mod 23$ \begin{align}e &= 93\\ &= 1 × 2^6 + 0 × 2^5 + 1 × 2^4+ 1 × 2^3 + 1 × 2^2 + 0 × 2^1 + 1 × 2^0\\ &= |\ 1011101\ |_2 \end{align} Then we have: ...
2
votes
1answer
92 views

RSA Encryption problem for Discrete Math

I am doing practice problems for my upcoming final exam, and am having trouble with this RSA encryption problem. If any one could check to see if i did these correctly, it would be greatly ...
-2
votes
1answer
84 views

Decrypting an RSA message given $a^2 \equiv 1 \pmod n$

I need help with a practice problem for an upcoming test. I've learned the answer to the problem is "well done", but don't know how to get there. Any help is greatly appreciated. Suppose that the ...
0
votes
1answer
39 views

How to find the time complexity of modular multiplication? [duplicate]

There are two number of length m bits. How do I prove that the complexity of modular multiplication of these two numbers is $O(m^2)$.
0
votes
1answer
73 views

Clifford Cocks Interview: “Raising numbers to a power with the product as modulus”

Disclaimer: I'm new to cryptography Background: Clifford Cocks, the former GCHQ mathemetician and crytologist, gave an interview where he said: "My thinking was that you need something that is ...
2
votes
3answers
129 views

How do I create a secure encryption scheme using addition?

You have a 4 number long PIN code with each number ranging from 0 to 9 which you wish to encrypt. You are then given a random 4 digit number ranging from 0 to 9999, which when added to the original ...
3
votes
2answers
204 views

How to use the Extended Euclidean algorithm to invert a finite field element?

I was doing some practice on cryptography (I'm new to this topic) and was wondering what the following question even means or what it is asking me to find. I do know how to do Extended Euclidean ...
2
votes
1answer
72 views

How is it possible that $g^q \equiv 1 \pmod p$ for a generator g?

The context of this question is coming up with the parameters for the ElGamal encryption scheme. One of the requirements for the parameters for ElGamal is that we have primes $p$ and $q$ such that $p ...
1
vote
2answers
71 views

Factoring large $N$ given oracle to find square roots modulo $N$

When $p$ and $q$ are distinct odd primes and $N = pq$, the points in $\mathbb Z_N^\ast$ have either zero or four square roots. A quarter of the points have four square roots; the rest have no ...
1
vote
1answer
62 views

multiplicative inverse in galois field $2^8$

I am trying to compute the multiplicative inverse in galois field $2^8$.The question is to find the multiplicative inverse of the polynomial $x^5+x^4+x^3$ in galois field $2^8$ with the irreducible ...
3
votes
1answer
64 views

Asmuth-Bloom's threshold secret sharing scheme

I was learning Asmuth-Bloom's threshold secret sharing scheme. I was working out an example as given in this Wikipedia article. As per the example, the secret,d is 2, the number of shares, n is 4 and ...
1
vote
0answers
54 views

Fast algorithm for reduction modulo a prime [closed]

If the prime is $p=2^a\cdot3^b+1$ , is there any fast reduction technique modulo this prime?
0
votes
3answers
133 views

Does RSA have two trapdoors?

I watched some videos from Khan Academy explaining the algorithm for RSA encryption/decryption. They explained that there are two trapdoors, modular exponentiation being one and prime factorization ...
3
votes
2answers
225 views

Constant time multiplicative inverse within a word

I was playing with an algorithm which at one step, calculated $f(x) = x^{-1} \mod p$ for $0 < x < p = 2^{64}-59$ (note $p$ is a prime). I used Knuth's Vol 2 Algorithm X algorithm for calculating ...
5
votes
0answers
69 views

What is the fastest modular reduction algorithm available?

I have been browsing for the fastest and most efficient modular reduction algorithms and came across quite a few. But the one in A Fast Modular Reduction Method (2014) by Zhengjun Cao, Ruizhong Wei ...
6
votes
2answers
635 views

Public key crypto without modular arithmetic?

This comment from Reddit math, in response to a statement about how people can communicate secrets to each other with a third party listening, has a very small, simple example of public key ...
0
votes
0answers
61 views

RSA : Double-Encryption and order of Encryption

I'm studying cryptography and we're looking at RSA. We're required to do a double encryption from Alice to Bob and then Bob back to Alice. We've been told the order of encryption is important and it ...
2
votes
0answers
42 views

Recover secret $x$ when $c\equiv m^x \pmod p$ with public $p$ (modified)

Given an encryption system where $c\equiv m^x \pmod p$, $p$ is a known prime, 1. Is it possible to recover $x$ with a known plaintext attack? Given $(p,\text{factorization of }\varphi(p),m,c)$ 2. Is ...
1
vote
0answers
68 views

What can I do to improve my encyption method [closed]

I'm new to cryptography and I want to learn more. For me, the best way to learn about something that I have no experience with is to experiment and I've coded a very basic approach to a simple ...
-1
votes
1answer
82 views

NIST PRIMES - cryptography

I have a problem, If I have $p = \text{P-192} = 2^{192} - 2^{64} - 1$ with the base $2^{64}$ so, $2^{192} \equiv 2^{64} + 1 \pmod p$ the same that $(p=\text{P-192})$ or $2^{256} \equiv 2^{128} + ...
4
votes
1answer
236 views

Modular exponentiation on calculator for textbook RSA

How do you encrypt $51$ with public key $(n,e) = (91,23)$ I understand that $c = 51^{23} \bmod 91$. How can I calculate the result on a calculator?
1
vote
2answers
55 views

Clarification regarding multiple modular exponentiation

If the base is same and exponents are different, for example: $R_1=b^x\bmod{p}$; $R_2=b^y\bmod{p}$; $R_3=b^z\bmod{p}$; ($p$ is large prime (2048 bit); $x$, $y$ and $z$ - 160 bit integers)) To ...
3
votes
3answers
145 views

Is there any alternative for extended euclidean algorithm to perform modulo division?

I'm implementing point addition and point doubling operations for elliptic curve cryptography. I have implemented extended euclidean algorithm to perform modulo division. It appears the that ...
2
votes
1answer
75 views

How to perfrom modular division while numerator is lesser than the denominator?

I'm implementing point addition and point doubling of elliptic curve cryptography. The formula that I'm using for slope is Point addition: $S = \frac{(P_y-Q_y)}{(P_x-Q_x)}$ where $P$ and $Q$ are the ...
0
votes
0answers
52 views

what is the fastest and efficient method to perform modular multiplication?

I'm working on a code that needs to perform modular multiplication of big numbers several times. Since the operation takes place several times, using division to find the remainder is very expensive. ...
1
vote
1answer
162 views

Modular Arithmetic in RSA

Consider the following the following RSA public key $pk = (N, e) = (1457, 1307)$. (a) Knowing that $187^2 \equiv 1 \pmod {1457}$ find the factorization of $N$. (b) Given the factorization of $N$ ...
1
vote
1answer
98 views

RSA: must $d$ be an integer?

I am only taking baby steps in RSA. If $p=11$, $q=7$ and $e=3$, $$\phi(n) = 10*6 = 60$$ Then: $$d = (2 (\phi(n)) + 1 ) / 3 = 121/3$$ Should $d$ be kept as a non-integer or is such a $d$ invalid? ...
1
vote
0answers
89 views

Does the RSA algorithm use repeated squaring?

Simple question: in order to reduce such huge exponents in modular arithmetic, is repeated squaring used in RSA or is there a better way to implement it?
0
votes
2answers
54 views

Why do $\alpha$ and the private key value in diffie-hellman should be from $2$ to $p-2$

I just started learning Diffie-Hellman Key Exchange. I couldn't get the reason of making $\alpha$ and private key for Alice and Bob constrained between $2$ and the prime number generated minus $2$ ...
1
vote
1answer
49 views

Is it possible to get my x,y coordinates from my “secret exponent”?

...or is that possible? I am very new to cryptography! But, I think it's very interesting!! I have autism and numbers "are my thing" :) I already understand a couple of things. For example I know ...
-1
votes
1answer
40 views

Modular arithmetics in diffie-hellman

Studying the basics of Diffie-Hellman key exchange, I'm stuck at a basic operation used in the end of the key exchange (where you show that both computations actually are the same). Can someone ...
4
votes
2answers
272 views

Why does the modulus of Diffie–Hellman need to be a prime?

I read a lot about Diffie-Hellman, but there is one thing I dont understand: why does the modulus p need to be a prime? What if it would not be a prime?
2
votes
2answers
106 views

Is it possible to recover an RSA modulus from its signatures?

Let's say that you have some small number of RSA signatures of known data: you know some pairs $(m_k, c_k)$ such that ${c_k}^e \equiv m_k \pmod n$. If you know $e$, because probably it's one of $\{3, ...
2
votes
2answers
46 views

What is the correct way to notate elliptic curve properties

When looking through elliptic curve and modulus posts i can see many examples of people referencing $p$ and $n$, in upper and lower case, and sometimes $Q$ is written instead of $p$ or $P$, and I ...
2
votes
0answers
63 views

Discrete logarithms: large prime modulus vs. large semi prime modulus

I have a cryptography homework question, in the question it says a cryptographic hash function in the form of $f(x) = g^x \bmod n$ , where $n$ is a very large prime (1024bits and more), $g$ is a ...
0
votes
2answers
53 views

How hard to solve the given mod problem

Let c = a.b mod p where p is n bit prime number (e.g. 128 or 160 bit prime number); a - random number between 1 and (p-1); b - random number between 1 and (p-1); Given c, a and p, how hard to ...
5
votes
2answers
237 views

lcm versus phi in RSA

In textbook RSA, the Euler $\varphi$ function $$\varphi(pq) := (p-1)(q-1)$$ is used to define the private exponent $d$. On the other hand, real-world cryptographic specifications require the ...
3
votes
1answer
92 views

How to understand RSA Proofs of correctness at Wikipedia

From Wikipedia(https://en.wikipedia.org/wiki/RSA_%28cryptosystem%29#Proofs_of_correctness): $m^{ed}$ ≡ $m$ $\pmod{q}$ $m^{ed}$ ≡ $m$ $\pmod{p}$ then $m^{ed}$ ≡ $m$ $\pmod{pq}$ Question: if $m^{ed}$ ...
6
votes
3answers
197 views

Is there an upper bound to the private exponent in RSA?

In the RSA algorithm, we choose $p$ and $q$ as prime numbers and we select a value $e$ which is coprime to $\varphi(pq)=(p-1)(q-1)$. Then we calculate $d:=e^{-1}\bmod\varphi(pq)$. My question is: ...
5
votes
1answer
273 views

Using same modulus for RSA

I know that there exist some attack when using same modulus. Can two different pairs of RSA key have the same modulus? RSA cracking: The same message is sent to two different people problem But ...
2
votes
1answer
79 views

In $\mathbb Z/p\mathbb Z$, is $(a+b\cdot r)$ a random value for fixed $a,b$ and random $r$?

Let $p$ be a prime number. Consider two fixed values $a,b\in\mathbb Z/p\mathbb Z$, where $b\neq0$, and a uniformly random value $r\leftarrow \mathbb Z/p\mathbb Z$. Is $v=a+b\cdot r$ a uniformly ...
1
vote
1answer
139 views

Modular reduction for NIST prime P256— understanding the data

I am working on a project where I need to implement elliptic curve cryptography, I am struggling from a long time in order to understand the working and the process. Modular finite field arithmetic, ...
4
votes
3answers
140 views

Calculating $\mathbb F_{p^2}$-rational points of an elliptic curve defined over $\mathbb F_p$

How can I calculate points on an elliptic curve defined over $\mathbb F_p$, for example $y^2 \equiv x^3 + 1 \pmod p$, with coordinates in $\mathbb F_{p^2}$? (points might have complex number format in ...