And Https
HTTP is what the internet runs on.
HTTP is unencrypted, which allows people to intercept packets and read them. This is a Man in the middle attack (MITM).
int x = 61, int y = 53;
int n = x * y;
// n = 3233.
// compute the totient, phi
int phi = (x-1)*(y-1);
// phi = 3120.
int e = findCoprime(phi);
// find an 'e' which is > 1 and is a co-prime of phi.
// e = 17 satisfies the current values.
// Using the extended euclidean algorithm, find 'd' which satisfies
// this equation:
= (1 mod (phi))/e;
d // d = 2753 for the example values.
= (e=17, n=3233);
public_key = (d=2753, n=3233);
private_key
// Given the plaintext P=123, the ciphertext C is :
= (123^17) % 3233 = 855;
C // To decrypt the cypher text C:
= (855^2753) % 3233 = 123; P
client hello
—a string of random
bytes—to the server.server hello
—another string
of random bytes—as well as its SSL certificate
, which
contains its public key
.certificate authority
and sends
premaster secret
—yet another string of random bytes, this
time encrypted with the server's public key—to the server.symmetric-encryption
session keys, to be used to encrypt
and decrypt all data communicated during the remainder of the
connection.Prev: [mapreduce](mapreduce.html) Next: [api-design](api-design.html)