CS4ProgrammingWeek4
Continue Khan Academy programming using Java Script https://www.khanacademy.org/cs
Contents
Monday
NO SCHOOL!
Tuesday
- Logic and If Statements
Wednesday (Lab)
- Complete Khan's Javascript course
Technology Friday
Cryptography - Part 3 - RSA
Summary
RSA is what you use to encrypt the keys and Diffie–Hellman is what you use to exchange the encrypted keys securely
RSA is an algorithm for public-key cryptography that is based on the presumed difficulty of factoring large integers, the factoring problem. RSA stands for Ron Rivest, Adi Shamir and Leonard Adleman
Diffie–Hellman key exchange (D-H)[nb 1] is a specific method of exchanging cryptographic keys. It is one of the earliest practical examples of key exchange implemented within the field of cryptography. The Diffie–Hellman key exchange method allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure.
(http://www.quora.com/What-is-the-difference-between-RSA-and-Diffie-Hellman)
Dillie-Hellman
Cryptographic explanation
The simplest and the original implementation of the protocol uses the multiplicative group of integers modulo p, where p is prime, and g is a primitive root modulo p. Here is an example of the protocol, with non-secret values in blue, and secret values in red.
- Alice and Bob agree to use a prime number p = 23 and base g = 5 (which is a primitive root modulo 23).
- Alice chooses a secret integer a = 6, then sends Bob A = g^{a} mod p
- A = 5^{6} mod 23 = 8
- Bob chooses a secret integer b = 15, then sends Alice B = g^{b} mod p
- B = 5^{15} mod 23 = 19
- Alice computes s = B^{a} mod p
- s = 19^{6} mod 23 = 2
- Bob computes s = A^{b} mod p
- s = 8^{15} mod 23 = 2
- Alice and Bob now share a secret (the number 2).