Cryptography

Public Key Encryption

   Before public key encryption, the management of keys was a problem. How could two persons, Alice and Bob, wishing to communicate over insecure channels exchange encryption keys without fear of evesdropping. If a key was compromised unbeknowst to Alice, an attacker could wreak havoc with their supposedly secure link. At the very least, if the key compromise was known, Alice and Bob would have to exchange new keys with the same problems as before.

   Public key encryption solves some of the problems of key management by utilizing protocols which involve key pairs, one secret key and one public key, hence the name. The secret key, known only to the owner of the key pair, is used for digital signatures and decrypting messages signed with the public key. The public key, on the other hand can be widely distributed over insecure channels. In fact, today there are many sites that act as public key servers where one can get anyone's public key. The public key is used to encrypt messages to the owner of the key pair.

   The idea behind public key encryption is that it is computationally infeasible to calculate the secret key from the public key and that no information can be obtained about the secret key from any message by knowing the public key. Most implementations of public key cryptography rely on the hard problems of factoring large numbers. Whereas it is relatively easy to multiply two large primes, it is currently very difficult to factor the result back to the two original primes.

   Public key cryptography is relatively slow as compared to symmetric algorithms (same key used for encryption and decryption). In some implementations messages are encrypted with conventional symmetric algorithms but the session keys used for encryption and decryption are encrypted with the secret key and sent along with the encrypted message. Upon receiving the encrypted message the recipient uses her secret key to decrypt the session key and then uses the session key to decrypt the message. This combines the ease of key management using public key cryptography with the speed of conventional cryptography.

Digital Signatures

   Digital signatures are a way of signing data in much the same way that we sign documents today. Digital signatures have the following properties.

   With digital signatures Alice can encrypt a message to Bob using his public key and then sign the message with her secret key. Bob can then decrypt the message with his secret key and verify the signature with Alice's public key. This provides all the properties of digital signatures listed above plus encryption.

   Usually, rather than signing the entire message, a one-way hash is made of the message and then the hash is signed. Hashes condense the message into a range of 100-200 bits. Signing a hash of the message is much faster than signing the whole message. One-way hash functions have the property that no two messages hash to the same value. In reality there are messages that will hash to same value but good algrorithms make finding these messages computationally infeasible.

Digital Cash

References