Is an attack where the attacker secretly relays and possibly alters the communication between two parties who believe they are directly communicating with each other. Man-in-the-middle attacks can be thought about through a chess analogy. Mallory, who barely knows how to play chess, claims that she can play two grandmasters simultaneously and either win one game or draw both. RESOURCES: https://en.wikipedia.org/wiki/Man-in-the-middle_attack
Does increased security provide comfort to paranoid people? Or does security provide some very basic protections that we are naive to believe that we don't need? During this time when the Internet provides essential communication between tens ofMILLIONS of people and is being increasingly used as a tool for commerce, security becomes a tremendously important issue to deal with.
There are many aspects to security and many applications, ranging from secure commerce and payments to private communications and protecting passwords. One essential aspect for secure communications is that of cryptography. But it is important to note that while cryptography is necessary for secure communications, it is not by itself sufficient. The reader is advised, then, that the topics covered here only describe the first of many steps necessary for better security in any number of situations.
This paper has two major purposes. The first is to define some of the terms and concepts behind basic cryptographic methods, and to offer a way to compare the myriad cryptographic schemes in use today. The second is to provide some real examples of cryptography in use today.
I would like to say at the outset that this page is very focused on terms, concepts, and schemes in current use and is not a treatise of the whole field. No mention is made here about pre computerised crypto schemes, the difference between a substitution and transposition cipher, cryptanalysis, or other history. Interested readers should check out some of the books in the references section below, a short list of my crypto URLs, or the Learn Cryptography page for detailed — and interesting! — background information.
THE PURPOSE OF CRYPTOGRAPHY
Cryptography is the science of writing in secret code and is an ancient art; the first documented use of cryptography in writing dates back to circa 1900 B.C. when an Egyptian scribe used non-standard hieroglyphs in an inscription. Some experts argue that cryptography appeared spontaneously sometime after writing was invented, with applications ranging from diplomatic missives to war-time battle plans. It is no surprise, then, that new forms of cryptography came soon after the widespread development of computer communications. In data and telecommunications, cryptography is necessary when communicating over any untrusted medium, which includes just about any network, particularly the Internet.
Within the context of any application-to-application communication, there are some specific security requirements, including:
Authentication: The process of proving one's identity. (The primary forms of host-to-host authentication on the Internet today are name-based or address-based, both of which are notoriously weak.)
Privacy/confidentiality: Ensuring that no one can read the message except the intended receiver.
Integrity: Assuring the receiver that the received message has not been altered in any way from the original.
Non-repudiation: A mechanism to prove that the sender really sent this message.
Cryptography, then, not only protects data from theft or alteration, but can also be used for user authentication. There are, in general, three types of cryptographic schemes typically used to accomplish these goals: secret key (or symmetric) cryptography, public-key (or asymmetric) cryptography, and hash functions, each of which is described below. In all cases, the initial unencrypted data is referred to as plaintext. It is encrypted into ciphertext, which will in turn (usually) be decrypted into usable plaintext.
In many of the descriptions below, two communicating parties will be referred to as Alice and Bob; this is the common nomenclature in the crypto field and literature to make it easier to identify the communicating parties. If there is a third or fourth party to the communication, they will be referred to as Carol and Dave. Mallory is a malicious party, Eve is an eavesdropper, and Trent is a trusted third party.
TYPES OF CRYPTOGRAPHIC ALGORITHMS
There are several ways of classifying cryptographic algorithms. For purposes of this paper, they will be categorized based on the number of keys that are employed for encryption and decryption, and further defined by their application and use. The three types of algorithms that will be discussed are (Figure 1):
Secret Key Cryptography (SKC): Uses a single key for both encryption and decryption
Public Key Cryptography (PKC): Uses one key for encryption and another for decryption
Hash Functions: Uses a mathematical transformation to irreversibly "encrypt" information
Past, present, and future methods of cryptography and data encryption
Historical cryptography
Rome
The earliest recorded military use of cryptography comes from Julius Caesar 2,000 years ago. Caesar, being commander of the Roman army, solved the problem of secure communication with his troops. The problem was that messengers of secret military messages were often overtaken by the enemy. Caesar developed a substitution cipher method in which he would substitute letters for different letters. Only those who knew the substitution used could decipher the secret messages. Now when the messengers were overtaken the secret messages were not exposed. This gave the Roman army a huge advantage during war.
Modern cryptography
One-Time Pad
The "one-time pad" encryption algorithm was invented in the early 1900's, and has since been proven as unbreakable. The one-time pad algorithm is derived from a previous cipher called Vernam Cipher, named after Gilbert Vernam. The Vernam Cipher was a cipher that combined a message with a key read from a paper tape or pad. The Vernam Cipher was not unbreakable until Joseph Mauborgne recognized that if the key was completely random the cryptanalytic difficultly would be equal to attempting every possible key (Kahn 1996). Even when trying every possible key, one would still have to review each attempt at decipherment to see if the proper key was used. The unbreakable aspect of the one-time pad comes from two assumptions: the key used is completely random; and the key cannot be used more than once. The security of the one-time pad relies on keeping the key 100% secret.
The one-time pad is typically implemented by using a modular addition (XOR) to combine plaintext elements with key elements. An example of this is shown in Figure 11. The key used for encryption is also used for decryption. Applying the same key to the ciphertext results back to the plaintext.
Future methods of cryptography
Elliptic Curve Cryptography
Elliptic Curve Cryptography (ECC) has technically already been invented but is considered by the author to be a future technique of cryptography because its advantages and disadvantages are not yet fully understood. ECC is an approach to encryption that utilizes the complex nature of elliptic curves in finite fields. ECC typically uses the same types of algorithms as that of Diffie-Hellman Key Exchange and RSA Encryption. The difference is that the numbers used are chosen from a finite field defined within an elliptic curve expression.
There are several ways of classifying cryptographic algorithms. For purposes of this paper,they will be categorized based on the number of keys that are employed for encryption and decryption, and further defined by their application and use. The three types of algorithms that will be discussed are:
Secret Key Cryptography (SKC): Uses a single key for both encryption and decryption.
Public Key Cryptography (PKC): Uses one key for encryption and another for decryption.
Hash Functions:Uses a mathematical transformation to irreversibly "encrypt" information.
Secret Key Cryptography
With secret key cryptography, a single key is used for both encryption and decryption. , the sender uses the key (or some set of rules) to encrypt the plaintext and sends the ciphertext to the receiver. The receiver applies the same key (or ruleset) to decrypt the message and recover the plaintext. Because a single key is used for both functions, secret key cryptography is also called symmetric encryption. With this form of cryptography, it is obvious that the key must be known to both the sender and the receiver; that, in fact, is the secret. The biggest difficulty with this approach, of course, is the distribution of the key. Secret key cryptography schemes are generally categorized as being either stream ciphers or block ciphers. Stream ciphers operate on a single bit (byte or computer word) at a time and implement some form of feedback mechanism so that the key is constantly changing. Block ciphers can operate in one of several modes; the following four are the most important:
Electronic Codebook (ECB) mode.
Cipher Block Chaining (CBC) mode.
Cipher Feedback (CFB) mode.
Output Feedback (OFB) mode.
Public-Key Cryptography
Public-key cryptography has been said to be the most significant new development in cryptography in the last 300-400 years. Modern PKC was first described publicly by Stanford University professor Martin Hellman and graduate student Whitfield Diffie in 1976. Their paper described a two-key crypto system in which two parties could engage in a secure communication over a non-secure communications channel without having to share a secret key. PKC depends upon the existence of so-called one-way functions, or mathematical functions that are easy to compute whereas their inverse function is relatively difficult to compute.
Public-key cryptography algorithms that are in use today for key exchange or digital signatures include:
Hash functions, also called message digests and one-way encryption, are algorithms that, in some sense, use no key. Instead, a fixed-length hash value is computed based upon the plaintext that makes it impossible for either the contents or length of the plaintext to be recovered. Hash algorithms are typically used to provide a digital fingerprint of a file's contents, often used to ensure that the file has not been altered by an intruder or virus. Hash functions are also commonly employed by many operating systems to encrypt passwords. Hash functions, then, provide a measure of the integrity of a file. Hash algorithms that are in common use today include:
Message Digest (MD) algorithms.
Secure Hash Algorithm (SHA).
Tiger.
watch this video to know how asymmetric encryption works:
Some more videos :
https://www.youtube.com/watch?v=ERp8420ucGs
https://www.youtube.com/watch?v=E5FEqGYLL0o
Cryptography is broadly divided into two levels. One with safe cryptographic recipes, “cryptography for humans” if you will. These are safe and easy to use and don’t require developers to make many decisions.
The other level is low-level cryptographic primitives. These are often dangerous and can be used incorrectly. They require making decisions and having an in-depth knowledge of the cryptographic concepts at work. Because of the potential danger in working at this level, this is referred to as the “hazardous materials” or “hazmat” layer. These live in the cryptography.hazmat package, and their documentation will always contain an admonition at the top.
The earliest form of cryptography was the simple writing of a message, as most people could not read. In fact, the very word cryptography comes from the Greek words kryptos and graphein, which mean hidden and writing, respectively.
Early cryptography was solely concerned with converting messages into unreadable groups of figures to protect the message’s content during the time the message was being carried from one place to another. In the modern era, cryptography has grown from basic message confidentiality to include some phases of message integrity checking, sender/receiver identity authentication, and digital signatures, among other things.
The need to conceal messages has been with us since we moved out of caves, started living in groups and decided to take this civilization idea seriously. As soon as there were different groups or tribes, the idea that we had to work against each other surfaced and was proliferated, along with rank violence, secrecy, and crowd manipulation. The earliest forms of cryptography were found in the cradle of civilization, which comes as no surprise, including the regions currently encompassed by Egypt, Greece and Rome.
The Greek’s idea was to wrap a tape around a stick, and then write the message on the wound tape. When the tape was unwound, the writing would be meaningless. The receiver of the message would of course have a stick of the same diameter and use it to decipher the message. The Roman method of cryptography was known as the Caesar Shift Cipher. It utilized the idea of shifting letters by an agreed upon number (three was a common historical choice), and thus writing the message using the letter-shift. The receiving group would then shift the letters back by the same number and decipher the message
In modern times, the public key method of cryptography has seen wide adoption. The use of a common public key and a private key held only by the sender is in use today as a form of asymmetric encryption; one of the uses of this method is for the sender to use the private key to encrypt the message and then anyone who receives the message uses the public key to decipher it. In this way, the receiver knows who the message had to come from.
In conclusion, it is somewhat surprising how limited the history of this very important topic is. No doubt cryptography and in a greater sense, cryptology, has played an enormous role in the shaping and development of many societies and cultures. Cryptography by its very nature, suggests secrecy and misdirection; therefore, the fact that the history of this topic is short and somewhat inaccessible is of no great surprise. Perhaps it is itself coded in what is has already been written.
If you want to know more fascinated stories about cryptography I suggest you go watch the movie that Shaikha Al Khazraji post "The Lmitation Game".
During World War II, Germany believed that its secret codes for radio messages were indecipherable to the Allies. However, the meticulous work of code breakers based at Britain’s Bletchley Park cracked the secrets of German wartime communication, and played a crucial role in the final defeat of Germany.
The Enigma story began in the 1920s, when the German military - using an ‘Enigma’ machine developed for the business market – began to communicate in unintelligible coded messages. The Enigma machine enabled its operator to type a message, then ‘scramble’ it using a letter substitution system, generated by variable rotors and an electric circuit. To decode the message, the recipient needed to know the exact settings of the wheels. German code experts added new plugs, circuits and features to the machine during the pre-war years, but its basic principle remained the same.
The Germans, convinced their Enigma messages were unbreakable, used the machine for battlefield, naval, and diplomatic communications.
If you are interested to know the full story I recommend you watch this amazing movie.