I'm trying to create a ciphertext, and I need to solve this congruence: $$ C = 20^{23} \bmod 377. $$ How would I be able to simplify this so that I can do it without a calculator? Since there won't be any calculators allowed in the exam. Thanks!
2026-03-25 22:23:58.1774477438
How to solve RSA without calculator?
132 Views Asked by user610121 https://math.techqa.club/user/user610121/detail At
1
There are 1 best solutions below
Related Questions in CRYPTOGRAPHY
- What exactly is the definition of Carmichael numbers?
- What if Eve knows the value of $S$ in digital signiture?
- Relative prime message in RSA encryption.
- Encryption with $|K| = |P| = |C| = 1$ is perfectly secure?
- Cryptocurrency Math
- DLP Relationship of primitive roots $\pmod{p}$ with $p$ and $g$
- Hints to prove $2^{(p−1)/2}$ is congruent to 1 (mod p) or p-1 (mod p)
- Period of a binary sequence
- generating function / stream cipher
- RSA, cryptography
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
I'm not sure that you necessarily can (nor should you expect to be able to) do something like this without machinery, even in your relatively very small modulus. You could try standard tricks like Euler's theorem to speed up the work, but that doesn't really help here as far as I can see. (Euler would say that $20^{336} \equiv 1 \bmod 377$ but that doesn't help here.)
I really don't think this is realistic without a machine. If you're desperate, a better tactic would be the method of successive squares. Write the exponent as a sum of powers of $2$, as $$ 23 = 16 + 4 + 2 + 1 = 2^0 + 2^1 + 2^2 + 2^4. $$ At this point I like the commented hint from @TrostAft, which is to break it up as $10^{23} \cdot 2^{23} \bmod 377$. I'll show how to handle the $2^{23}$ term by successive squares: the $10^{23}$ bit is even easier.
First compute all terms $2^{2^k}$ for $k=0, 1, 2, 3, 4$. The trick is to note that the next term is simply the square of the previous, so this generates the list of successive squares quickly. This is clear since $$ \left(b^{2^k} \right)^2=b^{2^{k+1}} $$ for any base $b$. Doing this, we get \begin{array}{|c|c|c|c|c|c|}\hline k & 0 & 1 & 2 & 3 & 4\\\hline 2^{2^k} & 2 & 4 & 16 & 256 & 315\\\hline \end{array}
Here, only the last entry takes any work, and it's made easier by writing $256=-121$ and then squaring.
Finally, the result of $2^{23} \bmod 377$ is given by the product of the terms corresponding to $k=0, 1, 2, 4$, exactly the $k$s needed to express $23$: $$ 2^{23} = 2 \cdot 4 \cdot 16 \cdot 315 = 358. $$
You can do the same thing base $10$ and get $10^{23} = 69$. Hence the final verdict is $$ 20^{23} = 358 \cdot 69 = 197 \bmod 377. $$ You could make the last bit easier by instead doing $$ 20^{23} = 358 \cdot 69 = -19 \cdot 69 = 197 \bmod 377 $$ just to keep the numbers smaller.
But again, notice what a headache this is without a machine. For exponents below $16$, this isn't a horrible way to go. The more powers of $2$ involved in your exponent, the worse this gets (by hand). This is a very nice trick for programming a machine to compute large powers, though.