Cryptography, Information Theory, and Error-Correction. Aiden A. Bruen. Читать онлайн. Newlib. NEWLIB.NET

Автор: Aiden A. Bruen
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Зарубежная компьютерная литература
Год издания: 0
isbn: 9781119582403
Скачать книгу
Key Cryptography and RSA on a Calculator

      We now turn to some examples of asymmetric or public key cryptography. First, let us explain RSA, the main public key algorithm. As before, A wants to send a secret message upper M to B. For convenience, let us think of upper M as being the number 6, say, as in our previous example. We make the encryption more complicated. So instead of saying “add 7,” we say “multiply 6 by itself 7 times” i.e. calculate left-parenthesis 6 right-parenthesis left-parenthesis 6 right-parenthesis left-parenthesis 6 right-parenthesis left-parenthesis 6 right-parenthesis left-parenthesis 6 right-parenthesis left-parenthesis 6 right-parenthesis left-parenthesis 6 right-parenthesis equals 6 Superscript 7 Baseline equals 279 936. As an extra complication, let us take some number upper N and declare the encryption algorithm to be “multiply 6 by itself 7 times and take the remainder of this number when divided by upper N to be the cipher text upper C.” As a small working example, let upper N equals 55. So our cipher text is the remainder of 6 Superscript 7 upon division by 55. This remainder is easily calculated, using any calculator, as follows:

      We want to find the (unique) remainder z that is left over when we divide 279 936 by 55. So we have

      (3.6)StartFraction 279 936 Over 55 EndFraction equals y plus StartFraction z Over 55 EndFraction

      Pushing the divide button on the calculator, we get

      (3.7)StartFraction 279 936 Over 55 EndFraction equals 5089.745 455

      This indicates that y is 5089 comma StartFraction z Over 55 EndFraction equals 0.745 455 so z equals 55 left-parenthesis 0.745 455 right-parenthesis equals 41.000 025. This is not what we were hoping for: z is supposed to be a whole number, namely the remainder when 279936 is divided by 55! However, the calculator has made rounding errors, and we suspect that z is 41 (and y is 5089). This is easily checked. We can verify that Eq. (3.5) checks out with y equals 5089, z equals 41 since 279 936 equals left-parenthesis 55 right-parenthesis left-parenthesis 5089 right-parenthesis plus 41.

      Principle 1 To calculate the remainder of 279936 when divided by 55, perform the division on a calculator and multiply the decimal part by 55. Verify your answer by checking that Eq. (3.5) is satisfied. This also works to get the remainder whenever we divide a positive integer (= positive whole number) u by another positive integer v.

      Question

      How do we know that z is unique? Maybe there are two possible values?

      Go back to Eq. (3.5), and suppose we have two solutions with y 1 comma y 2 being positive and z 1 and z 2 both lying between 0 and 54. So we have

      (3.8)279 936 equals 55 y 1 plus z 1

      (3.9)279 936 equals 55 y 2 plus z 2

      Then 55 y 1 plus z 1 equals 55 y 2 plus z 2. Now, if y 1 equals y 2 it follows that z 1 equals z 2. So assume that y 1 not-equals y 2. Call the larger one y 1, so y 1 greater-than y 2.

      We now have 55 left-parenthesis y 1 minus y 2 right-parenthesis equals z 2 minus z 1. Since y 1 is at least 1 bigger than y 2, we get that the left side is at least 55. Since z 1 and z 2 are between 0 and 54, we see that the right side is at most 54. Since 55 greater-than 54, we conclude that the assumption y 1 not-equals y 2 leads