This document summarizes several public key cryptosystems including the Knapsack cryptosystem, RSA cryptosystem, ElGamal cryptosystem, and elliptic curve cryptography applied to ElGamal. For each cryptosystem, it describes the key generation process, encryption, and decryption algorithms. It also discusses security aspects such as the hard computational problems that the cryptosystems rely on like integer factorization and discrete logarithms. Finally, it provides code examples for implementing some of the cryptosystems in C.