{VERSION 5 0 "SUN SPARC SOLARIS" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 271 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 272 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 276 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 278 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 279 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 280 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 260 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE " " 0 261 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 262 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 263 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 264 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 265 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 266 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 256 "" 0 "" {TEXT -1 0 "" }{TEXT 256 0 "" }{TEXT 257 17 "ACCESS 2005 - RSA" }}{PARA 257 "" 0 "" {TEXT -1 0 "" }{TEXT 258 0 "" }{TEXT 259 16 "Thursday June 15" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 260 15 "Our Plan Today:" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 599 "To help clarify the RSA public-key encryption method that was \+ barely introduced yesterday, we will do the example worked out in the \+ Tom Davis \"Cryptography\" notes, page 13-14. These are great notes - you can think of them as the Cliff Notes for \"The Code Book.\" Davis ' example uses small numbers and a one-letter message, and Maple will \+ do all of our computations. I believe this will make the algorithm mo re clear to you. The explanation of the Algorithm on page 6-7 of the \+ Rivest-Shamir-Adleman paper is also a very concise outline which will \+ make more and more sense as you play with examples." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 611 "After we digest Davis' example we will try somewhat larger prime numbers, to help prepare y ou for the part of your group project in which you send yourselves (an d me) encoded messages . In your actual project, which will be poste d by later today, you will impliment a medium-sized version of an RSA \+ cipher system (big enough to send short messages, but not really big e nough to be secure). You will also incorporate the \"secure signature \" feature, which we will discuss today. You can also read about the \+ RSA algorithm in ssection IV of the Rivest-Shamir-Adleman paper, or in appendix J of \"The Code Book.\"" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 308 "We will stop our lab work by 10:10 toda y so that we have plenty of time to make our way over to AEB 360 (?!) \+ for the lecture by Professor Jon Seger at 10:30. We will back here al l of tomorrow morning at 8:30 a.m. to tie up loose ends we don't finis h today, and to get a good start on your week 1 projects. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 624 "The number theor y we've talked about, and the relation to RSA cryptography, is usuall y taught in our number theory course, Math 4400. This is a senior lev el course, so I would expect that some of what we've talked about has \+ been challenging. Still, some students take Math 4400 fairly early in their undergraduate careers since it does not have very many prerequi sites beyond algebra and the ability to reason mathematically. As far as ACCESS goes, we hope that you're enjoying the magic hidden in mo dular arithmetic, and that you are pleasantly surprised that this \"ab stract\" mathematics turns out to be so practical." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 238 "I will make you do a lot of your own typing in Part I below, so that you can begin learning MA PLE and common errors which users make. Therefore, in the file you do wnload, many of the Maple commands which you see in the hardcopy are g one." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 267 7 "P art I " }}{PARA 258 "" 0 "" {TEXT -1 18 "The Davis Example:" }}{PARA 0 "" 0 "" {TEXT -1 196 "In this example Bob is going to send a message to Alice. I will follow Davis' numbering of the steps on pages 13-1 4. We are also going to use his table on page 9 to convert letters to numbers.\n" }}{PARA 0 "" 0 "" {TEXT -1 5 "1) " }{TEXT 261 5 "Alice " }{TEXT -1 173 " must create her public key, for Bob to use when he e ncripts his message to her. So she picks two prime numbers, see page \+ 13: (p=23 and q=41). Define p and q using Maple." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 4 "2) " }{TEXT 268 5 "Alice " }{TEXT -1 100 " defines her modulus to be the product of p and q. T his will be the first piece of her public key. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 5 "3a) " }{TEXT 269 5 "Alice " }{TEXT -1 1 " " }{TEXT 271 9 "privately" }{TEXT -1 459 " computes th e auxillary modulus N2:=(p-1)*(q-1), which is related to Euler's theor em, with which Alice will pick her encoding and decoding powers. No o ne else will ever see or use this number. First she finds a number e which is relatively prime to N2; this will be the public encoding pow er and she will tell it to the world. A good e must be relatively pri me to (p-1)*(q-1), so that Alice will be able to find a decoding power d. So we check the gcd: " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 5 "7 ) " }{TEXT 270 5 "Alice" }{TEXT -1 1 " " } {TEXT 280 10 "privately " }{TEXT -1 766 "finds her \"secret\" decoding power. Since she does this step sooner than Davis says, we will too. Since e is relatively prime to N2=(p-1)*(q-1) it has a multiplicativ e inverse d, mod (p-1)*(q-1). (We talked about how to find the multip licative inverse using the Euclidean algorithm. Luckily for us, Maple has a subroutine which does this step for us.) By the Euler-FermatTh eorem, which was the page of our notes we didn't quite get to go throu gh carefully yesterday, :(, this d will be the decoding power. I woul dn't be surprised if you're still amazed and confused by this fact, bu t like I tell my students in every class, confusion is the first step \+ to understanding. I'll be happy to talk with anyone who wants to unde rstand this part of the math better...." }}{PARA 0 "" 0 "" {TEXT -1 148 " The first command is having Maple do the Euclidean algorithm \+ method of finding multiplicative inverses, so you won't have to do thi s by hand!!!!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 9 "3b) Now " }{TEXT 272 5 "Alice" }{TEXT -1 171 " is ready t o receive messages. She yells from the rooftops: My modulus is N=943 . My encryption power is e=7. If you want to send me a message use t he encrypt function:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "encr ypt:=x->x^e mod N;" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT 262 5 "Note:" }{TEXT -1 97 " In class and in the picture note s I made for you we use the letter E for the encrypt function. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "4) The m essage which " }{TEXT 273 3 "Bob" }{TEXT -1 117 " wishes to send Alice is the letter Y. He consults Davis' table on page 9. The number tha t corresponds to Y is 35. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 3 "5) " }{TEXT 274 3 "Bob" }{TEXT -1 48 " encrypts th e message using Alice's public key: " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 2 "6)" }{TEXT 276 5 " Bob" }{TEXT -1 31 " \+ sends the number 545 to Alice." }}{PARA 0 "" 0 "" {TEXT -1 4 "8) " } {TEXT 275 5 "Alice" }{TEXT -1 88 " decodes the message using her decod ing power d, which she found in step 7, a while ago." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 263 6 "Alice " }{TEXT 277 97 " consults the table, sees that 35 corresponds to Y, and understands wha t Bob has sent. WE DID IT!" }{TEXT 278 2 " " }{TEXT 279 146 "Except \+ with Alice's puny primes our message pieces can only be one letter lon g, so what we've got is really no better than a substitution cipher. \+ " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 259 "" 0 "" {TEXT -1 9 "Part II: " }}{PARA 260 "" 0 "" {TEXT -1 22 "A more practical size." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 359 " In \+ your project everyone will pick primes bigger than 10^50, so that your moduli will be bigger than 10^(100). This is still not big enough to be secure, but you will be able to send messages with up to 50 charac ters per packet. (And so that decoding doesn't get too tedious for al l groups, you will be limited to a total message at most 2 packets.) \+ " }}{PARA 0 "" 0 "" {TEXT -1 239 " For now we will pick primes bi gger than 10^6, and use message packets of 6 characters. This means o ur message packets will have up to 12 digits per packet, which will be less than our modulus N, since N will be greater than 10^12. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 271 "restart: #this will clear all old definitions.\n #It' s a good idea to restart when you begin\n #new work - of cou rse you might need to \n #go back and re-enter some old comm ands that\n #you need again. (Repetition is good pedagogy.) " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 395 "randomize();#this will tell the \"random\" number generator \n #where to start. th e \"seed\" it generates is based\n #on the system clock, so \+ if you all enter this command at\n #the same time you might \+ get the same \"random\" numbers.\n #That would be bad. See \+ help windows to see how to\n #make your random numbers unlik e your classmates'.\n " }{TEXT -1 0 "" }}{PARA 11 "" 1 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "rand(); \+ #random number generator,\n #default range is between 0 an d 12 digits " }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "bigger:=rand(1..10^51): #much bigger\nbigger(); " }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 8 "For \+ now," }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "good:=rand(1..10^7): \ngood();" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 213 "for i from 1 to 100 do\n x1:=good():\n if (x1>1 0^6 #check number is big enough\n and\n isprime(x1)=tr ue) #and check if number is prime\n then print(x1); #if it is, let's see it\n fi;\nod: \n " }}}{PARA 0 "" 0 "" {TEXT -1 272 "It's unlikely your numbers agree with mine. (Well, in truth if you all st art the generator at the same place, you'll all get the same so-called random numbers.) You may chose your p and q using your list! We are repeating the process we worked out in the tiny example.)" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 240 "p:= 2678909 ; #I got these with \+ my mouse, by \n #highlighting with left mouse,\n \+ #clicking cursor, and pasting with\n #middle mouse (at \+ least on our system) \nq:= 8885573 ;\nN:= p*q ; #our modulu s" }}}{PARA 0 "" 0 "" {TEXT -1 227 "To see that a system of this size \+ is not secure, try the following command. This is the command that wo uld fail if we had chosen primes of length 200 instead of 12, and that 's the reason RSA is secure when you use huge primes." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "ifactor(N);" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 28 "3) Find an encoding power e" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "N2:=(p-1)*(q-1);" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 153 "#find encryption power which has a multiplicative inverse\n#mod N2:\nfor i from 1 to 10 do\n x2:=good( );\n if gcd(x2,N2)=1\n then print(x2);\n fi\nod:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "e:= ;\ngcd(e,N2); #check rela tive prime" }}}{PARA 0 "" 0 "" {TEXT -1 21 "7) Get decoding power" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "isolve(e*z + y*N2 =1);\n # find decryption power, which is \"z\" above" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "d:= mod N2;\n \+ #use the mouse to copy and paste big numbers" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT 264 16 "Technical Point:" } {TEXT -1 422 " When we get to step 6, or certainly step 8 Maple will \+ complain when we try to compute large powers of large numbers, so we h ave to lead it through this modular computation in smaller steps. The \+ procedure below does the trick. It's analagous to method Davis outline s in his notes, except using powers of 10 rather than powers of 2. We 've been using similar trickery in class. Here's the idea: Suppose we want to compute" }}{PARA 264 "" 0 "" {XPPEDIT 18 0 "[783]^565;" "6#*$ 7#\"$$y\"$l&" }{TEXT -1 7 " mod N" }}{PARA 0 "" 0 "" {TEXT -1 25 "in \+ small steps. We write" }}{PARA 265 "" 0 "" {XPPEDIT 18 0 "[783]^565 = [[783]^500]*[[783]^60]*[[783]^5];" "6#/*$7#\"$$y\"$l&*(7#*$7#F&\"$+& \"\"\"7#*$7#F&\"#gF-7#*$7#F&\"\"&F-" }{TEXT -1 7 " mod N" }}{PARA 266 "" 0 "" {XPPEDIT 18 0 "` ` = [[783]^100]^5*[[783]^10]^6*[[783]]^5; " "6#/%\"~G*(7#*$7#\"$$y\"$+\"\"\"&7#*$7#F)\"#5\"\"'7#7#F)F+" }{TEXT -1 8 " mod N." }}{PARA 0 "" 0 "" {TEXT -1 112 "By successive multipli cation and reduction to the residue value, we then make a table of the residue values of " }{XPPEDIT 18 0 "783;" "6#\"$$y" }{TEXT -1 2 ", \+ " }{XPPEDIT 18 0 "[783]^10;" "6#*$7#\"$$y\"#5" }{TEXT -1 3 " , " } {XPPEDIT 18 0 "[783]^100;" "6#*$7#\"$$y\"$+\"" }{TEXT -1 3 " , " } {XPPEDIT 18 0 "[783]^1000;" "6#*$7#\"$$y\"%+5" }{TEXT -1 268 ", etc., \+ i.e of residue values for the powers of 783, where the power is itself a power of 10. We then multiply these table residue values and reduce mod N, the appropriate number of times, as indicated in the decomposi tion above. Thus we recover the residue value of " }{XPPEDIT 18 0 "[7 83]^565" "6#*$7#\"$$y\"$l&" }{TEXT -1 69 " without every having to de al with integers which are greater than " }{XPPEDIT 18 0 "N^2;" "6#*$ %\"NG\"\"#" }{TEXT -1 77 ". (Actually I was sloppy, and my intermedia te numbers could get as large as " }{XPPEDIT 18 0 "N^10;" "6#*$%\"NG\" #5" }{TEXT -1 48 ", but for our N-values this won't be a problem.)" }} {PARA 0 "" 0 "" {TEXT -1 85 " Here is the procedure, which uses a s ubprocedure to pick off digits from numbers:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "digit:=(x,n)->trunc(x/10^n)-10*trunc(x/10^(n+1)); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&digitGf*6$%\"xG%\"nG6\"6$%)oper atorG%&arrowGF),&-%&truncG6#*&9$\"\"\")\"#59%!\"\"F3*&F5F3-F/6#*&F2F3) F5,&F3F3F6F3F7F3F7F)F)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 126 "digit(123.56,-1);\ndigit(123.56,2);\ndigit(123.56,0);\n #check \+ how digit picks off the digits corresponding\n #to powers of 10" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 611 "encrypt:= proc(M1,E,N3) #message, enciphe r power,modulus\n #we assume all M1's, E's have at most 105 digits\n local i,j, #indices\n L1, #list of succes ive 10th powers of M1\n ans; #answer\n #this do loop makes \+ the list of powers of M1 described above:\n L1[1]:=M1 mod N3;\n for i from 2 to 105 do\n L1[i]:=L1[i-1]^10 mod N3;\n od: \n #now mu ltiply table entries to get the residue value of the\n #encryption po wer function:\n ans:=1: #initialize answer\n for j from 1 to 105 \+ do\n ans:=ans*(L1[j]^digit(E,j-1)) mod N3;\n od:\n\nRETURN(ans); \nend:\n \n " }}}{PARA 0 "" 0 "" {TEXT -1 14 "Let's c heck!!!" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "M:=12345678910;" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "secret:=encrypt(M,e,N);" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "encrypt(secret,d,N);\n #dec ryption is just encryption with a different power" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 6 "YES!!!" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 261 "" 0 "" {TEXT -1 26 "Part III\nAn Actual Message" }}{PARA 263 "" 0 "" {TEXT -1 0 "" }}{PARA 262 "" 0 "" {TEXT -1 0 "" }{TEXT 265 44 "We Use Davis' Table on page 9 to encrypt \" " }{TEXT -1 9 "I'm Dizzy" }{TEXT 266 27 "\". We will need two chunks" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "M1:=196749101445;\nM2:=62626163;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#M1G\"-X95\\n>" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#M2G\")jhi i" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "C1:=encrypt(M1,e,N);\n C2:=encrypt(M2,e,N);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 101 "en crypt(C1,d,N); #decryption is encryption with a\n #dif ferent power.\nencrypt(C2,d,N);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "86 0 0" 84 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }