S
S
SailfishSnail2018-04-20 11:45:42
Mathematics
SailfishSnail, 2018-04-20 11:45:42

How to calculate the largest degree?

The online calculator of the Shanks expansion (discrete logarithm problem) gave similar results.
2^(1⋅24) ≡ 265(mod541)
2^(2⋅24) ≡ 436(mod541)
...
I can say in advance that he calculated correctly, but I did not understand the method of calculation at all.
What approaches are used to calculate:
a) a large degree
b) where did division with a remainder come from?
c) did not understand the essence of the "identically equals" sign (I read the wiki, but did not understand the difference from the usual equal sign)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grishin, 2018-04-20
@SailfishSnail

A large degree is not calculated on the forehead, especially since when performing operations in modular arithmetic, it does not need to be stored in its entirety, it is enough to store the remainder of the division by a known constant number. The "identical equality" sign is used as an equals sign in modular arithmetic if the modulus is specified separately, since the numbers themselves are naturally not equal.
Discrete logarithm - formally, a problem on the solution space, on which one can apply modular arithmetic over polynomials or numbers, with some prime number as the size of the set, modulo quotient and in general.
The modulo degree itself can be calculated in a fairly simple way: First, we decompose the indicator into binary components: 2*24 = 48 = 32+16 = 2^5+2^4. Then we use two identities: First x^(a+b)=x^a*x^b - the product of the powers of one number is equal to the power of the number in the sum of the indicators (I forgot the exact name). The second is (x*y) mod n = (x mod n)*(y mod n) - it doesn't matter when you take the remainder, at the beginning or at the end. As a result, raising the number 2 to a higher power modulo N is performed as follows: 1 is entered into the result, into argument 2, then in a cycle through the digits of the indicator, if the current binary digit of the indicator is 1, the result is multiplied by the argument and the remainder modulo N is taken, which is put into result, and the argument is then multiplied by itself and the remainder of the argument modulo N is put into the argument.
Total: the argument takes the values ​​2, 4, 16, 256, 65536 mod 541 = 75, 75*75 mod 541 = 215, and the result is 1, 1, 1, 1, 75, 75*215 mod 541 = 436.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question