How does public key cryptography work and how does a digital signature provide authenticity and tamperproofness?
This is answered by first considering secret key cryptography. Modern day cryptography is based upon secret keys, not secret algorithms. (An algorithm is the recipe or formula. It is the method by which raw ingredients, for example, are converted into a cake. In the case of cryptography, a message is converted into a scrambled message through use of the algorithm.) In the old days, the algorithm was kept secret. Soon, however, the secret would normally get out and suddenly the whole system was useless. All of the algorithm “machines” used to encrypt and decrypt messages, for example, now needed to be replaced with machines that would implement a new, secret algorithm. After WWII, secret key cryptography was invented using mathematics involving large random numbers which are used as keys. Anyone can know the mathematical algorithm which encrypts a message using a key, but without knowing the key no one can decrypt the scrambled message. Since the key is a large number randomly chosen an