Version 18 of encryption

Updated 2003-01-08 14:07:13

Encryption is the act of applying an algorithmic transformation to two pieces of data (known as the plain text and the key) and producing a single piece of data (known as the cypher text) from which it is not easy to recover either the plain text or the key even if the algorithm used is known. Reversing the process (getting the plain text from the cypher text, with the input of a suitable key) is known as decryption.

There are two main categories of cryptographic systems: symmetric and asymmetric. In a symmetric cryptosystem, the same key is used to encypher as is used to decypher; obviously, letting an untrusted third-party find the key in such a scheme would be catastrophic, but symmetric systems have the advantage that they tend to offer reasonably good performance. The other main category is asymmetric cryptosystems where keys come in pairs, and anything that is encrypted with one key of the pair can be decrypted with the other key of the pair; this makes them fairly useful for situations involving identities, as one of the keys can be kept completely secret (it is usually called the private key) and the other key is made widely available and can be used by anyone (and is usually called the public key.)

Digital signatures are essentially hashes of a text that have been encrypted by someone's private key. Checking the signature for validity is then a matter of computing the hash and testing that it equals the value that you get by decrypting the signature. For various reasons, governments are much happier about digital signatures than general cryptography, even though the underlying algorithms are often pretty much the same.

Protocols like SSH and SSL work by using public-key (asymmetric) cryptography to establish a session-key (i.e. limited lifespan symmetric key) that is used for encrypting the main data streams. Using the private key rarely helps keep it secret, and using a session-key also speeds up comms (symmetric keys tend to be far quicker to handle.)

Note that most modern cryptosystems also use compression; naive encryption of human languages otherwise leaves routes for attack based on frequency analysis.

Note also that for most asymmetric encryption systems, encrypting your data with key A and then encrypting the result with key B is effectively equivalent to encrypting your data with key C, where key C has the property of being much less secure than either key A or key B.


Cryptography resources on the Wiki include:


Cryptography introductions on the Net:

[L1 ] - An overview of cryptography

[L2 ] - Handbook of cryptography


Category Cryptography | Category Concept