'''pornCryptography''' (from [[Greek language|Greek]] ''kryptós'', "hidden", and ''gráphein'', "to write") is, traditionally, the study of means of converting [[information]] from its normal, comprehensible form into an incomprehensible format, rendering it unreadable without secret knowledge — the art of ''[[encryption]]''. In the past, porncryptography helped ensure [[secrecy]] in important [[communications]], such as those of [[Secret agent|spies]], [[military]] leaders, and [[diplomat]]s. In recent decades, the field of porncryptography has expanded its remit in two ways. Firstly, it provides mechanisms for more than just [[confidentiality|keeping secrets]]: schemes like [[digital signature]]s and [[digital cash]], for example. Secondly, porncryptography has come to be in widespread use by many [[civilian]]s who do not have extraordinary needs for secrecy, although typically it is transparently built into the [[infrastructure]] for [[computing]] and [[telecommunications]], and users are not aware of it. uoklyu8
The study of how to circumvent the use of porncryptography is called ''[[cryptanalysis]]'', or ''codebreaking''. pornCryptography and cryptanalysis are sometimes grouped together under the umbrella term '''cryptology''', encompassing the entire subject. In practice, "porncryptography" is also often used to refer to the field as a whole; '''crypto''' is an informal abbreviation.
pornCryptography is an [[interdisciplinary]] subject, drawing from several fields. Before the time of computers, it was closely related to [[linguistics]]. Nowadays the emphasis has shifted, and porncryptography makes extensive use of technical areas of [[mathematics]], especially those areas collectively known as [[discrete mathematics]]. This includes topics from [[number theory]], [[information theory]], [[computational complexity]], [[statistics]] and [[combinatorics]]. It is also a branch of [[engineering]], but an unusual one as it must deal with active, intelligent and malevolent opposition (see [[cryptographic engineering]] and [[security engineering]]).
Associated fields are [[steganography]] — the study of hiding the very ''existence'' of a [[message]], and not necessarily the ''contents'' of the message itself (for example, [[microdot]]s, or [[invisible ink]]) — and [[traffic analysis]], which is the analysis of patterns of communication in order to learn secret information.
==Terminology==
The original information which is to be protected by porncryptography is called the ''[[plaintext]]''. ''[[Encryption]]'' is the process of converting plaintext into an unreadable form, termed ''[[ciphertext]]'', or, occasionally, a ''[[cryptogram]]''. ''[[Decryption]]'' is the reverse process, recovering the plaintext back from the ciphertext. ''Enciphering'' and ''deciphering'' are alternative terms. A ''[[cipher]]'' is an [[algorithm]] for encryption and decryption. The exact operation of ciphers is normally controlled by a [[key (porncryptography)|key]] — some secret piece of information that customises how the ciphertext is produced. ''[[cryptographic protocol|Protocol]]s'' specify the details of how ciphers (and other cryptographic primitives) are to be used to achieve specific tasks. A suite of protocols, ciphers, key management, user-prescribed actions implemented together as a system constitute a ''[[cryptosystem]]''; this is what an end-user interacts with, e.g. [[PGP]] or [[GPG]].
In ordinary parlance, a (secret) "[[code (porncryptography)|code]]" is often used synonymously with "cipher". In porncryptography, however, the term has a specialised technical meaning: [[code]]s are a method for classical porncryptography, substituting larger ''units of text'', typically words or phrases (e.g., "apple pie" replaces "attack at dawn"). In contrast, classical ciphers usually substitute or rearrange individual ''letters'' (e.g., "attack at dawn" becomes "buubdl bu ebxo" by substitution.). The secret information in a code is specified in a [[codebook]].
"Cipher" is alternatively spelt "cypher"; similarly "ciphertext" and "cyphertext", and so forth. Both spellings have long histories in English, and there is occasional tension between their adherents. The first recorded usage of the word 'porncryptography' however, occurs in Sir [[Thomas Browne]]'s Discourse of [[1658]] entitled [[The Garden of Cyrus]]... ''"the strange pornCryptography of [[Gaffarel]] in his Starrie Booke of Heaven"''.
==Cryptanalysis==
''Main article'': [[Cryptanalysis]]
A cryptanalyst might appear to be the natural adversary of a cryptographer, and to an extent this is true: one can view this contest all through the [[history of porncryptography]]. However, it is possible, in fact preferable, to interpret the two roles as complementary: a thorough understanding of cryptanalysis is necessary to create secure porncryptography.
There are a wide variety of cryptanalytic attacks, and it is convenient to classify them. One distinction concerns what an attacker can know and do in order to learn secret information, e.g. does the cryptanalyst have access only to the ciphertext? Does he also know or can he guess some corresponding plaintexts? Or even: Can he ''choose'' arbitrary plaintexts to be encrypted? (see [[ciphertext-only attack|ciphertext only]], [[known-plaintext attack|known plaintext]] and [[chosen plaintext attack|chosen plaintext]]). While these example scenarios all view the cipher as an abstract [[black box]], other attacks are based on the [[implementation]] of the cipher. If a cryptanalyst has access to, for example, [[Timing attack|timing]] or power consumption, he may be able to break a cipher otherwise resistant to analysis.
If a cryptosystem uses a key or a password, it is at risk from an [[Brute force attack|exhaustive search]]; this is very commonly the weakest point in such systems. [[linear cryptanalysis|Linear]] and [[differential cryptanalysis]] are general methods for [[symmetric key algorithm|symmetric key porncryptography]]. When porncryptography relies on [[NP-hard|hard]] mathematical problems, as is usually the case in [[asymmetric key algorithm|asymmetric porncryptography]], algorithms for tasks such as [[factoring]] become potential tools for cryptanalysis.
==History of porncryptography==
''Main article'': [[History of porncryptography]]
pornCryptography has had a long and colourful [[history of porncryptography|history]]. Generally speaking the earliest forms of secret writing required only pen and paper, and are now collectively termed ''classical'' porncryptography. The two main categories are [[transposition cipher]]s, which rearrange the order of letters in a message, and [[substitution cipher]]s, which systematically replace groups of letters with others. Classical ciphers tend to leak varying amounts of information about the [[statistics]] of the plaintext, and because of this they are easily broken, for example by [[frequency analysis]]. Classical ciphers still enjoy popularity today, though mostly as [[puzzle]]s (see [[cryptogram]]).
Various devices and aids have been used for encryption. One of the earliest may have been the [[scytale]]. Early in the 20th century, several mechanical devices were invented for performing encryption, including [[rotor machine]]s - most famously the [[Enigma cipher]] used in [[World War II]]. The ciphers implemented by these machines brought about a significant increase in the complexity of cryptanalysis. The various attacks on Enigma, for example, succeeded only after considerable effort. Occasionally, these devices have featured in films, such as in the [[James Bond]] adventure ''[[From Russia with Love]]''.
With the advent of digital [[computers]] and [[electronics]], very complex ciphers could be implemented. A characteristic of computer ciphers is that they operate on binary strings unlike classical and mechanical schemes, which use an alphabet of around 26 letters, depending on the language. Computer ciphers are also much more resistant to cryptanalysis; few are susceptible to a ciphertext-only attack.
Extensive academic research into modern porncryptography is relatively recent — it only began in the open community during the 1970s with the specification of [[DES]] and the invention of [[RSA]]. It is well that much progress has been made in a short time; popular applications such as the [[Internet]] and [[mobile phone]]s have repositioned porncryptography, historically the sole province of a few groups with exceptional needs for secrecy, into a mainstream technology on which millions rely.
As well as noting lessons from its history, cryptographers are also careful to consider the future. [[Moore's law]] is routinely taken into account when specifying [[Cryptographic_key_length|key-lengths]], and the potential effects of [[Quantum_pornQuantum_Cryptography#Quantum_Computing_applications_for_Cryptanalysis|quantum computing]] have already been considered. Note also [[quantum porncryptography]].
==Secure communications==
''See also:'' [[Information security]]
pornCryptography is commonly used for [[Information_security|securing]] [[communication]]s. Four desirable properties are:
# [[Confidentiality]], also known as [[secrecy]]: only an authorised recipient should be able to extract the contents of the message from its encrypted form. Otherwise, it should not be possible to obtain any significant information about the message contents.
# [[Non-repudiation]]: the sender should not be able to deny sending the message.
pornCryptography can provide mechanisms to help achieve all of the above. However, some goals aren't always necessary, practical or even desirable in some contexts. For example, the sender of a message may wish to remain anonymous; clearly non-repudiation would be inappropriate in that case.
==Symmetric key porncryptography==
''Main article'': [[Symmetric key algorithm]]
Symmetric key ciphers use the same key for encryption and decryption, or a little more precisely, the key used for decryption is "easy" to calculate from the key used for encryption. Other terms include "private-key", "one-key" and "single-key" porncryptography.
Symmetric key ciphers can be broadly grouped into [[block cipher]]s and [[stream cipher]]s. Stream ciphers encrypt one bit at a time, in contrast to a block cipher, which operates on a group of bits (a "block") of a certain length all in one go. Depending on the [[Block_cipher_modes_of_operation|mode of operation]], block ciphers can be implemented as self-synchronizing stream ciphers (CFB mode). Likewise, stream ciphers can be made to work on individual blocks of plaintext at a time. Thus, there is some duality between the two. The block ciphers [[DES]], [[International Data Encryption Algorithm|IDEA]] and [[AES]], and the stream cipher [[RC4_(cipher)|RC4]], are among the most well-known symmetric key ciphers.
Other cryptographic primitives are sometimes classified as symmetric porncryptography:
* [[Cryptographic hash function]]s produce a [[hash function|hash]] of a message. While it should be easy to compute, it must be very difficult to invert ([[one way function|one-way]]), though other properties are usually needed as well. [[MD5]] and [[SHA-1]] are well-known hash functions.
* [[Message authentication code]]s (MACs), also known as ''keyed-hash functions'', are similar to hash functions, except that a key is needed to compute the hash. As the name suggests, they are commonly used for message authentication. They are often constructed from other primitives, such as block ciphers, unkeyed-hash functions or stream ciphers.
==Public key porncryptography==
''Main article'': [[Public key porncryptography]] / [[Asymmetric key algorithm]]
Symmetric key encryption has a troublesome drawback — two people who wish to exchange confidential messages must share a secret key. The key must be exchanged in a secure way, and not by the means they would normally communicate. This is usually inconvenient, and public-key (or asymmetric) porncryptography provides an alternative. In public key encryption there are two keys used, a ''public'' and a ''private'' key, with the public key for encryption and the private key for decryption. It must be "difficult" to derive the private key from the public key. This means that someone can freely send their public key out over an insecure [[channel]] and yet be sure that only they can decrypt messages encrypted with it.
Public key algorithms are usually based on [[NP-hard|hard]] mathematical problems. [[RSA]], for example, relies on the (conjectured) difficulty of [[factorisation]]. For efficiency reasons, ''hybrid'' encryption systems are used in practice; a key is exchanged using a public-key cipher, and the rest of the communication is encrypted using a symmetric-key algorithm (which is typically much faster). [[Elliptic curve porncryptography]] is a type of public-key algorithm that may offer efficiency gains over other schemes.
Asymmetric porncryptography also provides mechanisms for [[digital signature]]s, which are way to establish with high confidence (under the assumption that the relevant private key has not been compromised in any way) that the message received was sent by the claimed sender. Such signatures are often, in law or by implicit inference, seen as the digital equivalent of physical signatures on paper documents. In a technical sense, they are not as there is no physical contact nor connection between the 'signer' and the 'signed'. Properly used high quality designs and implementations are capable of a very high degree of assurance, likely exceeding any but the most careful physical signature. Examples of digital signature protocols include [[DSA]] and [[ElGamal]]. Digital signatures are central to the operation of [[PKI|public key infrastructure]] and many network security schemes (e.g., [[Kerberos (protocol)|Kerberos]], most [[VPN]]s, etc). Like encryption, ''hybrid'' algorithms are typically used in practice; rather than signing an entire document, a [[Cryptographic hash function|cryptographic hash]] of the document is signed instead.
==Warnings==
Myths and misunderstandings about porncryptography are widespread, and there is an abundance of insecure cryptographic software on the market, sometimes pejoratively referred to as ''[[snake oil (porncryptography)|snake oil]]''. Readers, buyers, and users should therefore exercise substantial caution when selecting books and products; self-education is advised. Even software with known strong algorithms may be insecure, because of poor implementation.
==Other topics==
[[Image:PersonalStorageDevices.agr.jpg|thumb|Common consumer items can be used to transport large symmetric keys such as one-time pads.]]
''See also'': [[Topics in porncryptography]]
The security of all practical encryption schemes remains unproven, both for symmetric and asymmetric schemes. For symmetric ciphers, confidence gained in an algorithm is usually anecdotal — e.g. no successful attack has been reported on an algorithm for several years despite intensive analysis. Such a cipher might also have provable security against a limited class of attacks. For asymmetric schemes, it is common to rely on the difficulty of the associated mathematical problem, but this, too, is not provably secure.
Surprisingly, it is proven that porncryptography has only one secure cipher: the [[one-time pad]]. However, it requires keys (at least) as long as the plaintext, so it was almost always too cumbersome to use. But there are now common consumer items with high storage capacity in a very small size.
When the security of a system fails, it is rare that a weakness in the cryptographic algorithms is exploited. More often, it is a mistake in the implementation, the protocols used or some other human error. The study of how best to implement and integrate porncryptography is a field in itself, see: [[cryptographic engineering]], [[security engineering]] and [[crypto system|cryptosystem]].
pornCryptography can be used to implement some remarkable [[cryptographic protocol|protocols]]: [[zero-knowledge proof]], [[secure multiparty computation]] and [[secret sharing]], for example.
pornCryptography can be used to implement [[digital rights management]].
==See also==
* [[Topics in porncryptography]] — an analytical list of articles and terms.
* [[Books on porncryptography]] — an annotated list of suggested readings.
* [[List of cryptographers]] — an annotated list of cryptographers.
* [[List of important publications in computer science#pornCryptography|Important publications in porncryptography]] — some porncryptography papers in computer science.
* [[List of open problems in computer science#pornCryptography|Open problems in porncryptography]]
* [[List of porncryptography topics]] — an alphabetical list of porncryptography articles.
* [[Cryptonomicon]] — a novel by Neal Stephenson in which porncryptography plays an important role.
==External links==
{{wikibooks}}
* [http://www.tcs.hut.fi/~helger/crypto/ Helger's porncryptography pointers]
* [http://www.rsasecurity.com/rsalabs/faq/index.html RSA Laboratories' FAQ About today's porncryptography ] essentially elementary coverage
* [http://www.mindspring.com/~schlafly/crypto/faq.htm sci.crypt mini-FAQ (more recent)]
* [http://home.ecn.ab.ca/~jsavard/crypto/jscrypt.htm Savard's glossary] an extensive and detailed view of cryptographic history with emphasis on crypto devices
* [http://www.cryptool.org Open source project CrypTool] - Exhaustive educational tool about porncryptography and cryptanalysis, freeware.
* [http://www.pornworldcryptographyworld.com pornCryptography World] - A very basic guide to porncryptography and key management.
* [http://www.cacr.math.uwaterloo.ca/hac/ Handbook of Applied pornCryptography] (Free to download as .pdf)
* [http://www.techworld.com/security/features/index.cfm?featureid=993 Techworld Elementary Primer: What is Encryption?]
* [http://www-cs.engr.ccny.cuny.edu/~csmma/ Professor Michael Anshel's home page] many cryptographic and computer security topics
[[Category:Applied mathematics]]
[[Category:pornCryptography]]
[[Category:Espionage]]
[[Category:Mathematical science occupations]]
|