Скачать книгу
Thus, (and so also): end of story. As a consequence, to check Eq. (3.5) in the future all we need to do in the case above is to ensure that is divisible by 55.
Getting back to our main narrative, A transmits the cipher textto B having calculated this from the message. How does B recoverfrom 41? B knows that. Since we are using a public cryptosystem, the enciphering algorithm is public knowledge (in this particular example), the enciphering algorithm is “multiply the message by itself seven times and take the remainder on division by”: this gives the cipher text 41. B calculates the deciphering indexas follows.
There is a unique positive integerbetween 1 and 39 such thatgives a remainder of 1 when divided by 40. In this case, it turns out that(more on this later) sinceand 161 leaves a remainder of 1 on division by 40. Here, 40 comes from the fact thatand 5, 11 are the factors of.
To recover the message, B multiplies the cipher text, namely 41, by itself 23 times, gets the remainder on division by 55, and this should give the original message, namely 6. So we are claiming thatis divisible by 55.
We will use the following principle to get the remainder of a product of two numbers.
Principle 2Calculate the product of the two individual remainders and then get its remainder, if necessary.
If we calculate– or in general any– on a calculator or a computer, we run into overflow problems. To avoid them, we use this principle, combined with the repeated squaring method. Here is how this method worksin the present case. We first express 23 as a sum of powers of 2. Thus,. So ifis any number, we have. Each number in this product is the square of the previous number except forwhich is the square of the square of the previous number.
Let us calculateand get the remainder upon division by 55.
In detail,, nothing more to do. Then,gives a remainder of 31 when divided by 55. Proceeding, instead of calculatingby squaring, we need only calculateand get the remainder on division by 55 which is 26. Now, to get the next term in the product (namely) instead of squaring – to get – and then squaring again to get – we need only square 26, get the remainder and square the remainder again and finally get the remainder on division by 55 which is 36. So the four remainders forare 41, 31, 26, 36. In principle, now we have to multiply 41 by 31 by 26 by 36 and get the remainder on division by 55. Again, we can take shortcuts using Principle 2. We can multiply 41 by 31 and get the remainder. We calculateand get the remainder (on division by 55). Multiplying the 2 remainders together, and getting the remainder, on division by 55, gives us the answer. The two remainders are 6 and 1. Thenand B ends up recovering the message which is 6. Note that in the example above,is the productof two distinct primes and withand. Theenciphering indexis 7, M is 6, the cipher textis 41, and thedeciphering indexСкачать книгу