Jeff Moser has a clear, fascinating enumeration of all the incredible math stuff that happens between a server and your browser when you click on an HTTPS link and open a secure connection to a remote end. It's one of the most important (and least understood) parts of the technical functioning of the Internet.
People sometimes wonder if math has any relevance to programming. Certificates give a very practical example of applied math. Amazon's certificate tells us that we should use the RSA algorithm to check the signature. RSA was created in the 1970's by MIT professors Ron *R*ivest, Adi *S*hamir, and Len *A*dleman who found a clever way to combine ideas spanning 2000 years of math development to come up with a beautifully simple algorithm:
You pick two huge prime numbers "p" and "q." Multiply them to get "n = p*q." Next, you pick a small public exponent "e" which is the "encryption exponent" and a specially crafted inverse of "e" called "d" as the "decryption exponent." You then make "n" and "e" public and keep "d" as secret as you possibly can and then throw away "p" and "q" (or keep them as secret as "d"). It's really important to remember that "e" and "d" are inverses of each other.
Now, if you have some message, you just need to interpret its bytes as a number "M." If you want to "encrypt" a message to create a "ciphertext", you'd calculate:
C ≡ Me (mod n)
This means that you multiply "M" by itself "e" times. The "mod n" means that we only take the remainder (e.g. "modulus") when dividing by "n." For example, 11 AM + 3 hours ≡ 2 (PM) (mod 12 hours). The recipient knows "d" which allows them to invert the message to recover the original message:
Cd ≡ (Me)d ≡ Me*d ≡ M1 ≡ M (mod n)
The First Few Milliseconds of an HTTPS Connection
(via O'Reilly Radar)
When “social media” meant “blogs,” there were many tools, services and protocols that comprised an infrastructure for federated, open, loosely joined interaction: the rise of the social giants has killed off much of this infrastructure, all but erasing it from our memories.
On August 9, Facebook announced that it had defeated adblockers; on August 11, Adblock Plus announced that it had defeated Facebook.
They’ve “expressly prohibited” turning anything from the Olympics into “animated formats such as animated GIFs (i.e. GIFV), GFY, WebM, or short video formats such as Vines.”
If you’re like us, packing and unpacking are two of your least favorite aspects of traveling. Specifically with multi-destination trips, our suitcases usually end in wrinkled clothing, toothpaste stains, and a misplaced deodorant.The good news is that we’ve found a suitcase that eliminates the disastrous effects of packing and unpacking: The Rolo Travel Bag ($42.99). You essentially use it […]
Finding quality icons is a challenge for designers, and can also get pretty costly if you use them often. And when you’ve got a lot to do, the last thing you want to spend your time on is creating new icons from scratch That’s why we recommend using the Noun Project ($49). Noun Project is a site […]
While Netflix and Hulu have seemingly dominated the streaming market with their limited selections, we’ve looked a little outside the box and found something pretty great as an alternative. SelectTV combines all the content of cable with the convenience of streaming, and it’s affordable too.SelectTV is an online subscription service that packs an impressive library of over […]