# Tagged Questions

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

59 views

### In what sense addition modulo $n$ ($n>2$) isn't linear in the field $\mathbb{F}_2$?

I've been reading the Reason why “XOR” is a linear operation, but ordinary “addition” isn’t? question, in which one of the answers states that addition modulo $n$ ($n>2$) is linear in $\mathbb{Z}_n$...
78 views

### Calculating $d$ in RSA?

I've looked in many places including here and can't get quite the answer... So I thought I'd post a question. I can't grasp how $d$ is calculated. Obviously the problem is that knowing $e$ and $n$ ...
113 views

### Why is RSA decryption the inverse of encryption?

In RSA, to encrypt a message, the following formula is used: $$c=m^e\bmod n$$ For decryption, $$m = c^d\bmod n$$ is used. However, when I try to substitute the value of $c$ from the first into the ...
99 views

### Do equivalent RSA keys exist?

If $m^{ed} \bmod n = m$ for message $m$, public key $e$ and private key $d$, then adding any integer multiple of $n$ to $m^{ed}$ still equals $m$ modulo $n$. Supposing it exists, how do I find an ...
64 views

### Given a prime exponent e and a prime number n, find b, where b^e = 1 mod n

Can anyone help me with the following problem. Given a prime exponent $e$ and a prime number $n$, find $b$, where $b^e \equiv 1 \bmod n \land b > 1$. For example, $b^5 \equiv 1 \bmod 11$ how to ...
71 views

### Compute Modulo exponentiation with prime powers

The problem is to find x such that $$x = M^d \mod p^2$$, where M and d are large numbers, and p is a large prime. Ideally we only want to compute $M^d\mod p$ and then use the result to further ...
38 views

### If A and B are co-primes, does Ax mod B (where x, any positive int) gives {0,1,2,…,B-1}?

If $A$ and $B$ are co-primes (i.e. $\gcd(A,B)=1$), does $A\cdot x \bmod B$ (where $x\in \mathbb N$) give as result an element of $\{0,1,2,....,B-1\}$ ?
129 views

### Why does choosing the first coprime e greater than half of φ(n) result in the same d (private exponent)

While reading on RSA's algorithm, I attempted a simplified implementation and noticed the following: When choosing the public exponent $e$, if the value chosen is the first coprime after $φ(n)/2$ ...
102 views

### How does this affine cipher work?

I have a question about how I need to solve the following: A sentence has been changed to ASCII and then encrypted with the formula $E(x) = ax + b \bmod 256256$. All I know is that the first 4 ...
71 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)$. ...
40 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 ...
85 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.
62 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 ...
62 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 ...
75 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: $$C = M^e\bmod n$$ But for decryption, result will ...
69 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 ...
46 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: \begin{align}17^{...
99 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 appreciated....
122 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 ...
41 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)$.
76 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 ...
134 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 ...
244 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 ...
76 views

270 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?
60 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 ...
150 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 ...
79 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 ...
54 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. ...
167 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$ ...
103 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?
94 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?
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$ (=$... 1answer 51 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 ... 1answer 45 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 ... 2answers 342 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? 2answers 111 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, ...
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 ...