Why Does RSA Work?

To skip to the math, scroll down or click here. The Algorithm The algorithm is divided into three stages: precalculation, encryption, and decryption. Precalculation is performed a single time for each person with a public/private key pair, and encryption/decryption is performed for each message. Precalculation Pick primes: Find two arbitrarily large prime numbers, p and [...]

Fun With String Searching

Source of the program used. Almost every major program that works with text performs string searches. There are some juicy algorithms in this area, each with their own tradeoffs. Choosing the wrong algorithm for the wrong task produces awful results, and we need to carefully weigh the consequences of each algorithm. I’m going to take [...]

Use a Better Algorithm and Beat Haskell Today!

Note: This refers to the article “Use those extra cores and beat C today! (Parallel Haskell redux)”, and should be viewed as a good-natured ribbing! I’ll see your sensational headline and raise you a better algorithm! The Code: #include "gmpxx.h" #include #include   using namespace std;   mpz_class fib(unsigned int num) { mpz_class a(1), b(1); [...]