Академический Документы
Профессиональный Документы
Культура Документы
b) 840=2*323+194
323=1*194+129
194=1*129+65
129=1*65+64
65=1*64+1 so gcd(840,323)=1
1=65*1+64*(-1)
1=65*1+(129-65)*(-1)
1=129*(-1)+65*2
1=129*(-1)+(194-129)*2
1=194*2+129*(-3)
1=194*2+(323-194)*(-3)
1=323*(-3)+194*5
1=323*(-3)+(840-323*2)*5
1=840*5+323*(-13) so d=13
3.Now we need to solve a=125^323 mod 899 using the Successive Squaring Method.We write
323 in binary form and we have 101000011 so the alghoritm will have 9 steps.
Now we have in the first column the step,then a,a^2 and a^2 mod p
Take a look at our binary term with values of 1 in red, this signifies which terms we use for our
expansion: 94 x 745 x 342 x 125 = 2993782500 mod 899 =125 so a=125
4)Now we need to compute 125^13 mod 899.We see that 13 in binary form is 1101
The length of this binary term is 4, so this is how many steps we will take for our algorithm
below.
Now we have in the first column the step,then a,a^2 and a^2 mod p
Take a look at our binary term with values of 1 in red, this signifies which terms we use for our
expansion:745 x 94 x 125 = 8753750 mod 899 =187
5))Now we need to compute 111^13 mod 899.We see that 13 in binary form is 1101
The length of this binary term is 4, so this is how many steps we will take for our algorithm
below.
Now we have in the first column the step,then a,a^2 and a^2 mod p
Take a look at our binary term with values of 1 in red, this signifies which terms we use for our
expansion:720 x 103 x 111 = 8231760 mod 899 =516
6)Now we need to compute 516^323 mod 899.We see that 323 in binary form is 101000011
The length of this binary term is 9, so this is how many steps we will take for our algorithm
below.
Now we have in the first column the step,then a,a^2 and a^2 mod p
Take a look at our binary term with values of 1 in red, this signifies which terms we use for our
expansion:20 x 226 x 152 x 516 = 354512640 mod 899 =81
There is a problem with the date from the context because we don't get the same results when
crypting and decrypting.
2)We will take in the first example a=2 and b=3 so ab=6.The relative prime number to a is 1 so
(2)=1,to b is 1 and 2 so (3)=2 and to ab is 1 and 5 so (6)=2.From here we see that
(6)=(2)*(3).Let's take another example a=3 and b=5. The relative prime number to a is 1
and 2 so (3)=2,to b is 1,2,3 and 4 so (5)=4 and to ab is 1,2,4,7,8,11,13,14 so (15)=8.From
here we see that (15)=(3)*(5).
...r
....m
m+1
m+2
.m+r
....2m
2m+1
2m+2
.2m+r
....3m
(n-1)m+2
.(n-1)m+r
(n-1)m+1
.....nm
.So to calculate (nm) we need to determine how many elements of this array are relatively prime with nm, which are the elements that are relatively prime to both n and m.
So what was the point of us arranging the integers in such an array. We notice that since
gcd(km + r, m) =gcd(r, m) we see that an entry in the r^th column is relatively prime to
m if and only if r is relatively prime to m, and in this case then all of the entries of the
column are relatively prime to m. So looking at it this way, there are (m) columns with
rs that are relatively prime to n, and so we need to show that in each column there are
(n) entries relatively prime to n and then we will be done.
So let us choose such a column, and let r be the corresponding element of the column
(mod m). So gcd(r, m)=1. The entries of this column are
r, m + r, 2m + r, ..., (n 1)m + r.
So we see that there are n integers in this column, so we would like to consider their
equivalence class module n.
Now if [km + r]_n = [lm + r]_n [km]_n = [lm]_n [k]_n = [l]_n since gcd(n, m)=1.
However, as we can see no two of the coeffiecients of m in the column are equivalent mod n.
Thus if we look at the column there are all of the equivalence classes modulo n. Therefore
the number of them that are relatively prime to n is (n).
So we have divided the numbers that are relatively prime to nm into (m) columns
where in each column with (n) such numbers in each column. Thus the total amount of
3)
For any set S, the identity function on S, denoted by 1_S :S S is the function defined by 1_S
(s) = s for all s S.
Assume f : A B has an inverse that is g : B A.
(i) Given b B, take a = f^1 (b) then f(a)= f (f^ 1 (b))= (f f ^1 )(b)= 1_B (b)= b.
Thus f maps onto b. This is true for all b B, so f maps onto B, i.e. f
is an onto function.
ii) Given a A, take b = f^1 (a) then f(b)= f^ 1( f(a))= (f ^1f )(a)= 1_A (a)= a.
So f^-1=g.