P 3
P 3
• DES is a symmetric key system, even though there are many subkeys
and many steps
• A0 size poster, submit in week 8, general office will print them outside
• Less wordings, more graph/photo
• If you don’t submit on time, you have to print it by yourself without any re-fund
• Used in your final presentation on 19 july
• 19 july, please reserve whole day for video taking(schedule will be released around week 7).
(each group need to prepare 20 minutes presentation, only one attempt (one-take video)
Page 28
• How to get final answer X=(0,1,1,0) from 15?
• Method on page 19
• A=(2,5,10,21)
• Try the largest element first, a4=21, try x4=1,
• A4*x4=21>15, so x4 is 0
• a3=10, try x3=1, a3*x3=10<21, so x3 is 1
RSA
• Most popular, typical public key system
• Euler Phi function is used in RSA
• If p and q are two primes, n=p*q and phi(n)=(p-1)(q-1)
• For example, p=7, q=11, then n=7*11=77 and phi(n)=(7-1)*(11-1)=60
Page 37
• Example of RSA
• e value is not random and not unique
• e meets conditions: 1<=e<=m-1, AND gcd(e,m)=1
Page 38
• Why E*D=kphi(N)+1
• Because E*D=1 mod phi(N)
• So E*D=1+kphi(N)
• For example, E=3, D=5, phi(N)= 16
• 3*5=1 mod 16
• Also 3*5=1+k*16 mod 16
Public key (pair)
• Page 39, public key is not one integer
• The pair (n,e) is the public key in RSA
Page 41
• Confidentiality: decrypt plaintext X
• Authentication: because only one person knows
• and can use private key. (it is like authenticate the usage of a system)
Page 42
• How to choose p and q?
• Previously in the rsa algorithm, no special requirement for p and q,
only require p and q are prime numbers.
• In the practical usage, we have some requirement for p and q
• At least 100 decimal digits long
• Why small numbers are NOT selected? (small numbers are easy to be
broken, attacker can use brute force…)
• For large number, attacker still can break, but it may take longer time,
• If it takes one month to break, the system is still relative secure
Page 42
• What is a probabilistic primality testing algorithm
• - it can NOT make sure the testing result is correct
• - with a high probability, the result is correct
• - it is quick to have a result
• Then we can calculate 2^64 mod 179, 2^8 mod 179, 2^1 mod 179
• 2^64 = 2^32*2^32
• 2^32= 2^16*2^16
Page 50
• 5^375 mod 1823
• Step 1: divide 375 into the sum of 2^x
• 375=256 + 64 +32 +16 +4 +2 +1
• =2^8 + 2^6+2^5+2^4+2^2+2^1+2^0
• Step 2: compute the table [precomputation table]
• X^1 mod 1823, X^2 mod 1823, X^4 mod 1823, X^8 mod 1823
• So X^375=x^256 * x^64 * x^32 * x^16 * x^4 * x^2 * x^1
• = 1658 * 42 * 1058 * 1435 * 625 *25 *5= 591 mod 1823