Gráfo "Write") Is The Study of Message Secrecy. in Modern Times, It Has Become A Branch of
Gráfo "Write") Is The Study of Message Secrecy. in Modern Times, It Has Become A Branch of
Cryptography (or cryptology; derived from Greek κρυπτός kryptós "hidden," and the verb γράφω
gráfo "write") is the study of message secrecy. In modern times, it has become a branch of
information theory, as the mathematical study of information and especially its transmission from
place to place.
The art of protecting information by transforming it (encrypting it) into an unreadable format, called
cipher text. Only those who possess a secret key can decipher (or decrypt) the message into plain text.
Encrypted messages can sometimes be broken by cryptanalysis, also called codebreaking, although
modern cryptography techniques are virtually unbreakable.
One of cryptography's primary purposes is hiding the meaning of messages, not usually the existence
of such messages. Cryptography also contributes to computer science, central to the techniques used
in computer and network security for such things as access control and information confidentiality.
Cryptography is also used in many applications encountered in everyday life; the security of ATM
cards, computer passwords, and electronic commerce all depend on cryptography.
As the Internet and other forms of electronic communication become more prevalent, electronic
security is becoming increasingly important. Cryptography is used to protect e-mail messages, credit
card information, and corporate data.
Information Security requirements have changed in recent times
traditionally provided by physical and administrative mechanisms
computer use requires automated tools to protect files and other stored information
use of networks and communications links requires measures to protect data during transmission
Some Basic Terminology:
• Computer Security - generic name for the collection of tools designed to protect data and to thwart hackers
• Internet Security - measures to protect data during their transmission over a collection of interconnected networks
Aim of Course:
• which consists of measures to deter, prevent, detect, and correct security violations that involve the transmission &
storage of information
– security attack
– security mechanism
– security service
• Security Attack
• Security Mechanism
• Security Service
A service that enhances the security of data processing systems and information transfers. A security service makes
use of one or more security mechanisms.
Security Attack:
• information security is about how to prevent attacks, or failing that, to detect attacks on information-based systems
– passive
– active
Passive Attacks:
Active Attacks:
Security Attacks:
• Interruption:
• Interception:
• Modification:
• Fabrication:
Security Attacks:
Security Goals:
Cryptanalysis:
• general approaches:
– cryptanalytic attack
– brute-force attack
Cryptanalytic Attacks:
• ciphertext only
– only know algorithm & ciphertext, is statistical, know or can identify plaintext
• known plaintext
• chosen ciphertext
• chosen text
More Definitions:
• unconditional security
– no matter how much computer power or time is available, the cipher cannot be broken since the ciphertext
provides insufficient information to uniquely determine the corresponding plaintext
• computational security
– given limited computing resources (eg time needed for calculations is greater than age of universe), the
cipher cannot be broken
Security Service:
• which, for example, have signatures, dates; need protection from disclosure, tampering, or
destruction; be notarized or witnessed; be recorded or licensed
Security Services:
• X.800:
“a service provided by a protocol layer of communicating open systems, which ensures adequate security of the systems or of
data transfers”
• RFC 2828:
“a processing or communication service provided by a system to give a specific kind of protection to system resources”
Security Services:
• Confidentiality
Privacy
• Authentication
• Integrity
• Non-repudiation
• Access Control
Security Mechanism:
• however one particular element underlies many of the security mechanisms in use:
– cryptographic techniques
– May be incorporated into the appropriate protocol layer in order to provide some of the OSI security
services.
• encipherment, digital signatures, access controls, data integrity, authentication exchange, traffic
padding, routing control, notarization
– Mechanisms that are not specific to any OSI security service or protocol layer
• trusted functionality, security labels, event detection, security audit trails, security recovery
4. specify a protocol enabling the principals to use the transformation and secret information for a security
service
2. implement security controls to ensure only authorised users access designated information or resources
• trusted computer systems may be useful to help implement this model
• or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with
ciphertext bit patterns
Caesar Cipher:
• by Julius Caesar
• example:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZABC
Class Activity:
• Pi = “a quick brown fox jumps over a lazy dog, which was fast a sleep”
• K = k ( 0 < k <26)
• And
• Ci = Ek(Pi) = (P + k) mod 26
– A maps to A,B,..Z
• could simply try each in turn
Monoalphabetic Cipher:
Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
– followed by T,R,N,I,O,A,S
• have tables of single, double & triple letter frequencies for various languages
• key concept - monoalphabetic substitution ciphers do not change relative letter frequencies
Example Cryptanalysis:
• given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
Playfair Cipher:
• not even the large number of keys in a monoalphabetic cipher provides security
• invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair
• https://www.youtube.com/watch?v=QXGYOh2Mgrw
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
2. if both letters fall in the same row, replace each with letter to right (wrapping back to start from end)
3. if both letters fall in the same column, replace each with the letter below it (again wrapping to top from
bottom)
4. otherwise each letter is replaced by the letter in the same row and in the column of the other letter of the
pair
• would need a 676 entry frequency table to analyse (verses 26 for a monoalphabetic)
Polyalphabetic Ciphers:
• make cryptanalysis harder with more alphabets to guess and flatter frequency distribution
• use a key to select which alphabet is used for each letter of the message
Vigenère Cipher:
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ
Aids:
• if not, then need to determine number of alphabets, since then can attach each
Kasiski Method:
• suggests size of 3 or 9
• then attack each monoalphabetic cipher individually using same techniques as before
Autokey Cipher:
key: deceptivewearediscoveredsav
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGKZEIIGASXSTSLVVWLA
One-Time Pad:
• if a truly random key as long as the message is used, the cipher will be secure
• since for any plaintext & any ciphertext there exists a key mapping one to other
Transposition Ciphers:
• can recognise these since have the same frequency distribution as the original text
mematrhtgpry
etefeteoaat
• giving ciphertext
MEMATRHTGPRYETEFETEOAAT
• then reorder the columns according to some key before reading off the rows
Key: 3421567
Plaintext: a t t a c k p
ostpone
duntilt
woamxyz
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
Product Ciphers:
• ciphers using substitutions or transpositions are not secure because of language characteristics
Rotor Machines:
• before modern ciphers, rotor machines were most common complex ciphers in use
• used a series of cylinders, each giving one substitution, which rotated and changed after each letter was encrypted
Steganography
• an alternative to encryption
• has drawbacks
Summary:
• have considered:
– classical cipher techniques and terminology
– Playfair cipher
– polyalphabetic ciphers
– transposition ciphers
– stenography
Types of Cryptography:
• Hash Functions
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.
• Symmetric ciphers have historically been susceptible to known-plaintext attacks, chosen plaintext attacks,
differential cryptanalysis and linear cryptanalysis.
• Careful construction of the functions for each round can greatly reduce the chances of a successful attack.
• When used with asymmetric ciphers for key transfer, pseudorandom key generators are nearly always used to
generate the symmetric cipher session keys.
• However, lack of randomness in those generators or in their initialization vectors is disastrous and has led to
cryptanalytic breaks in the past. Very careful implementation and deployment, with initialization based on high
quality sources of entropy, is essential lest security be lost.
Research Work:
• Find out the cryptanalysis techniques by which we can crack symmetric key cryptography.
• Note:
Research Activity
End Time(7:00 PM)
• You have been given a task to Encrypt a document, using Symmetric key algorithm i.e. RC4, used in early versions of
MS Word,
Public-Key Cryptography:
– key distribution – how to have secure communications in general without having to trust a KDC with your
key
– digital signatures – how to verify a message comes intact from the claimed sender
• public invention due to Whitfield Diffie & Martin Hellman at Stanford Uni in 1976
– a public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures
– a private-key, known only to the recipient, used to decrypt messages, and sign (create) signatures
• is asymmetric because
– those who encrypt messages or verify signatures cannot decrypt messages or create signatures
Public-Key Cryptography:
Public-Key Characteristics:
– it is computationally infeasible to find decryption key knowing only algorithm & encryption key
– it is computationally easy to en/decrypt messages when the relevant (en/decrypt) key is known
– either of the two related keys can be used for encryption, with the other used for decryption (for some
algorithms)
Public-Key Cryptosystems:
Public-Key Cryptosystems:
Public-Key Applications:
• some algorithms are suitable for all uses, others are specific to one
Security of Public Key Schemes:
• like private key schemes brute force exhaustive search attack is always theoretically possible
• security relies on a large enough difference in difficulty between easy (en/decrypt) and hard (cryptanalyse)
problems
• more generally the hard problem is known, but is made hard enough to be impractical to break
• confusion refers to making the relationship between the key and the ciphertext as complex and involved as possible;
diffusion refers to the property that redundancy in the statistics of the plaintext is "dissipated" in the statistics of the
ciphertext.
• http://en.wikipedia.org/wiki/Confusion_and_diffusion
Hash algorithm:
• A hash function (or hash algorithm) is a reproducible method of turning data (usually a message or a file) into a
number suitable to be handled by a computer. These functions provide a way of creating a small digital "fingerprint"
from any kind of data. The function chops and mixes (i.e., substitutes or transposes) the data to create the
fingerprint, often called a hash value.
• The hash value is commonly represented in hexadecimal notation. A good hash function is one that yields few hash
collisions in expected input domains. In hash tables and data processing, collisions inhibit the distinguishing of data,
making records more costly to find.
• In cryptography, a cryptographic hash function is a hash function with certain additional security properties to make
it suitable for use as a primitive in various information security applications, such as authentication and message
integrity. A hash function takes a long string (or 'message') of any length as input and produces a fixed length string
as output, sometimes termed a message digest or a digital fingerprint.
• In various standards and applications, the two most-commonly used hash functions are MD5 and SHA-1.
• Stream cipher
• Block cipher
Stream cipher:
• In cryptography, a stream cipher is a symmetric cipher in which the plaintext digits are encrypted one at a time,
and in which the transformation of successive digits varies during the encryption.
• An alternative name is a state cipher, as the encryption of each digit is dependent on the current state. In
practice, the digits are typically single bits or bytes.
• Clock-controlled generators
• Filter generator
Security:
• To be secure, the period of the keystream, that is, the number of digits output before the stream repeats itself,
needs to be sufficiently large. If the sequence repeats, then the overlapping ciphertexts can be aligned against
each other "in depth", and there are techniques which could allow the plaintext to be extracted
• However, for most choices of this parameter, the resulting stream had a period of only 2 32 — for many
applications, this period is far too low. For example, if encryption is being performed at a rate of 1 megabyte per
second, a stream of period 232 will repeat after around 8.5 minutes.
Usage:
• Stream ciphers are often used in applications where plaintext comes in quantities of unknowable length—for
example, a secure wireless connection
• nother advantage of stream ciphers in military cryptography is that the cipher stream can be generated in a
separate box that is subject to strict security measures and fed to other devices, e.g. a radio set, which will
perform the xor operation as part of their function. The latter device can then be designed and used in less
stringent environments.
• RC4 is the most widely used stream cipher in software; others include: A5/1, A5/2, Chameleon, FISH, Helix, ISAAC,
MUGI, Panama, Phelix, Pike, SEAL, SOBER, SOBER-128 and WAKE. Comparison ….?
• http://en.wikipedia.org/wiki/Stream_cipher
Block cipher:
• In cryptography, a block cipher is a symmetric key cipher which operates on fixed-length groups of bits, termed
blocks, with an unvarying transformation. When encrypting, a block cipher might take a (for example) 128-bit block
of plaintext as input, and output a corresponding 128-bit block of ciphertext.
• The exact transformation is controlled using a second input — the secret key. Decryption is similar: the decryption
algorithm takes, in this example, a 128-bit block of ciphertext together with the secret key, and yields the original
128-bit block of plaintext.
• An early and highly influential block cipher design was the Data Encryption Standard (DES), developed at IBM and
published as a standard in 1977.
Examples:
• Algorithms: 3-Way | AES | Akelarre | Anubis | ARIA | BaseKing | Blowfish | C2 | Camellia | CAST-128 | CAST-256 |
CIKS-1 | CIPHERUNICORN-A | CIPHERUNICORN-E | CMEA | Cobra | COCONUT98 | Crab | CS-Cipher | DEAL | DES |
DES-X | DFC | E2 | FEAL | FROG | G-DES | GOST | Grand Cru | Hasty Pudding Cipher | Hierocrypt | ICE | IDEA | IDEA
NXT | Iraqi | Intel Cascade Cipher | KASUMI | KHAZAD | Khufu and Khafre | KN-Cipher | Libelle | LOKI89/91 |
LOKI97 | Lucifer | M6 | MacGuffin | Madryga | MAGENTA | MARS | Mercy | MESH | MISTY1 | MMB | MULTI2 |
NewDES | NOEKEON | NUSH | Q | RC2 | RC5 | RC6 | REDOC | Red Pike | S-1 | SAFER | SC2000 | SEED | Serpent |
SHACAL | SHARK | Skipjack | SMS4 | Square | TEA | Triple DES | Twofish | UES | Xenon | xmx | XTEA | Zodiac
• http://en.wikipedia.org/wiki/Block_cipher
Hash algorithm:
• A hash function (or hash algorithm) is a reproducible method of turning data (usually a message or a file) into a
number suitable to be handled by a computer. These functions provide a way of creating a small digital "fingerprint"
from any kind of data. The function chops and mixes (i.e., substitutes or transposes) the data to create the
fingerprint, often called a hash value.
• The hash value is commonly represented in hexadecimal notation. A good hash function is one that yields few hash
collisions in expected input domains. In hash tables and data processing, collisions inhibit the distinguishing of data,
making records more costly to find.
• In cryptography, a cryptographic hash function is a hash function with certain additional security properties to make
it suitable for use as a primitive in various information security applications, such as authentication and message
integrity. A hash function takes a long string (or 'message') of any length as input and produces a fixed length string
as output, sometimes termed a message digest or a digital fingerprint.
• In various standards and applications, the two most-commonly used hash functions are MD5 and SHA-1.
Ciphering Mechanisms:
• Stream cipher
• Block cipher
Stream cipher:
• In cryptography, a stream cipher is a symmetric cipher in which the plaintext digits are encrypted one at a time,
and in which the transformation of successive digits varies during the encryption.
• An alternative name is a state cipher, as the encryption of each digit is dependent on the current state. In
practice, the digits are typically single bits or bytes.
• Clock-controlled generators
• Filter generator
Security:
• To be secure, the period of the keystream, that is, the number of digits output before the stream repeats itself,
needs to be sufficiently large. If the sequence repeats, then the overlapping ciphertexts can be aligned against
each other "in depth", and there are techniques which could allow the plaintext to be extracted
• However, for most choices of this parameter, the resulting stream had a period of only 2 32 — for many
applications, this period is far too low. For example, if encryption is being performed at a rate of 1 megabyte per
second, a stream of period 232 will repeat after around 8.5 minutes.
Usage:
• Stream ciphers are often used in applications where plaintext comes in quantities of unknowable length—for
example, a secure wireless connection
• Another advantage of stream ciphers in military cryptography is that the cipher stream can be generated in a
separate box that is subject to strict security measures and fed to other devices, e.g. a radio set, which will
perform the xor operation as part of their function. The latter device can then be designed and used in less
stringent environments.
• RC4 is the most widely used stream cipher in software; others include: A5/1, A5/2, Chameleon, FISH, Helix, ISAAC,
MUGI, Panama, Phelix, Pike, SEAL, SOBER, SOBER-128 and WAKE. Comparison ….?
• http://en.wikipedia.org/wiki/Stream_cipher
Block cipher:
• In cryptography, a block cipher is a symmetric key cipher which operates on fixed-length groups of bits, termed
blocks, with an unvarying transformation. When encrypting, a block cipher might take a (for example) 128-bit
block of plaintext as input, and output a corresponding 128-bit block of ciphertext.
• The exact transformation is controlled using a second input — the secret key. Decryption is similar:
the decryption algorithm takes, in this example, a 128-bit block of ciphertext together with the secret
key, and yields the original 128-bit block of plaintext.
• An early and highly influential block cipher design was the Data Encryption Standard (DES), developed at IBM and
published as a standard in 1977.
Examples:
• Algorithms: 3-Way | AES | Akelarre | Anubis | ARIA | BaseKing | Blowfish | C2 | Camellia | CAST-128 | CAST-256
| CIKS-1 | CIPHERUNICORN-A | CIPHERUNICORN-E | CMEA | Cobra | COCONUT98 | Crab | CS-Cipher | DEAL | DES
| DES-X | DFC | E2 | FEAL | FROG | G-DES | GOST | Grand Cru | Hasty Pudding Cipher | Hierocrypt | ICE | IDEA |
IDEA NXT | Iraqi | Intel Cascade Cipher | KASUMI | KHAZAD | Khufu and Khafre | KN-Cipher | Libelle | LOKI89/91
| LOKI97 | Lucifer | M6 | MacGuffin | Madryga | MAGENTA | MARS | Mercy | MESH | MISTY1 | MMB | MULTI2 |
NewDES | NOEKEON | NUSH | Q | RC2 | RC5 | RC6 | REDOC | Red Pike | S-1 | SAFER | SC2000 | SEED | Serpent |
SHACAL | SHARK | Skipjack | SMS4 | Square | TEA | Triple DES | Twofish | UES | Xenon | xmx | XTEA | Zodiac
• http://en.wikipedia.org/wiki/Block_cipher
• Etc.
Points of Vulnerability
• If encryption is to be used to counter these attacks, need to decide what to encrypt and where the encryption
should be located
– Link encryption
– End-to-end encryption
• Link encryption
• End-to-end encryption
– End-to-end protects data contents over entire path and provides authentication
• Link encryption:
– Payload encrypted
• High Security: Both link and end-to-end encryption are needed (see Figure 2.9)
• At the lowest practical layer, the encryption function could be performed at network layer
• All the user processes and applications within each end system would employ the same encryption scheme with the
same key
• With this arrangement, front-end processor may be used to off-load the encryption function
Logical Placement of E2E Encryption Function:
• X.25 or TCP provide end-to-end security for traffic within a fully integrated internetwork. However, such a scheme
cannot deliver the necessary service for traffic that crosses internetwork boundaries, such as E-Mail, EDI, and file
transfer
• In this case, the only place to achieve end-to-end encryption is at the application layer
• A drawback of application-layer encryption is that the number of entities to consider increases dramatically
– Knowledge about the number and length of messages between nodes may enable an opponent to
determine who is talking to whom
– Frequency of communication
– Link encryption hides address info., but leaves the amount of traffic
• Pad out data units to a uniform length at either the transport or application level
Covert Channel:
• Examples
– Message length
– Message content
– Message presence
Securing a Network:
• Key Distribution
Class Activity: A (Time: 6:15 PM):
• Given:
• Seek some encryption algorithms on Internet and choose a specific algorithm preferably non classical algorithms
• Send it to some of your friend through email and let him decrypt using the same key
Activity-1
ResearchTopic
Max Time: 15 Min
• Various techniques are used to Secure a Communication Link, reference to that describe any one method
• Note: Your discussion must be supported by IEEE, or Impact Factor based research Paper
Activity-2
– A = 65
– B = 66
Activity-3
• For symmetric encryption to work, the two parties must share the same key and that key must be protected from
access by others
– Trusted third party key distribution center (T3P or KDC) selects a key and physically delivers it to Alice and
Bob
– If Alice and Bob have previously and recently used a key, it can be used to distribute a new key
– If Alice and Bob have keys with the KDC, KDC can deliver a key on the encrypted links to Alice and Bob
• Manual delivery is a reasonable requirement with link encryption, challenging with end-to-end encryption
Key Distribution
2. A third party could select the key and physically deliver it to A and B.
3. If A and B have previously used a key, one party could transmit the new key to the other, encrypted using the old
key.
4. If A and B each have an encrypted connection to a third party C, C could deliver a key on the encrypted links to A and
B.
Session key:
Data encrypted with a one-time session key.At the conclusion of the session the key is destroyed
Permanent key:
Used between entities for the purpose of distributing session key
– Master key : long-lasting key that are used between a KDC and a party for the purpose of encrypting the
transmission of session keys
• Assume each user shares a unique master key with the KDC
(1) Alice issues a request to the KDC for a session key to be used with Bob. Alice’s request includes a nonce to prevent replay
attack
(2) KDC responds with a message encrypted under Alice’s key. The message contains the session key, the nonce, and the
session key along with Alice’s identity encrypted under Bob’s key
(3) Alice forwards the data encrypted under Bob’s Key to Bob
(4-5) Alice and Bob mutually authenticate under the session key
• (4) Bob sends a nonce to Alice encrypted under the session key
• (5) Alice applies a transformation to the nonce and sends the result back to Bob
A Key Distribution Scenario:
• Instead of a single KDC, a hierarchy of KDCs can be established; local KDCs and a golbal KDC
• Hierarchical scheme
– Limits the damage of a faulty or subverted KDC to its local area only
• The more frequent session keys, the more secure, but the less performance (the more network load and delay)
2. B responds with a message encrypted using the shared master key. Response includes the session key selected by B,
an identifier of B, the value of f(N1), and another nonce, N2
• It is desirable to impose some control on the way in which automatically distributed keys are used
– e.g. we may wish to define different types of session keys on the basis of use, such as
• Data-encrypting key
• PIN-encrypting key
• File-encrypting key
– e.g. the extra 8 bits in each 56-bit DES key can be used as a tag
– Limited flexibility and functionality due to the limited tag size
– Because the tag is not transmitted in clear form, it can be used only at the point of decryption, limiting the
ways in which key use can be controlled
• Control vector consists of a number of fields that specify the uses and restrictions for that session key
• Control vector is cryptographically coupled with the at the time of key generation at the KDC
– Key input = Km H
When a session key is delivered to a user from the KDC, it is accompanied by the control vector in clear form
Securing a Network:
– (Discussed Already)
• Key Distribution
Key Distribution:
• For symmetric encryption to work, the two parties must share the same key and that key must be protected from
access by others
• Alice’s options in establishing a shared secret key with Bob include (Ways for sharing a key):
2. Trusted third party key distribution center (T3P or KDC) selects a key and physically delivers it to Alice and
Bob
3. If Alice and Bob have previously and recently used a key, it can be used to distribute a new key
4. If Alice and Bob have keys with the KDC, KDC can deliver a key on the encrypted links to Alice and Bob
Key Distribution:
• Manual delivery is a reasonable requirement with link encryption, challenging with end-to-end encryption
Key Distribution:
2. A third party could select the key and physically deliver it to A and B.
3. If A and B have previously used a key, one party could transmit the new key to the other, encrypted using the old
key.
4. If A and B each have an encrypted connection to a third party C, C could deliver a key on the encrypted links to A and
B.
Key Distribution:
• Session key:
– Data encrypted with a one-time session key.At the conclusion of the session the key is destroyed
• Permanent key:
– Master key : long-lasting key that are used between a KDC and a party for the purpose of encrypting the
transmission of session keys
• Assume each user shares a unique master key with the KDC
• Alice desires a one-time session key to communicate with Bob
(1) Alice issues a request to the KDC for a session key to be used with Bob. Alice’s request includes a nonce to prevent replay
attack
(2) KDC responds with a message encrypted under Alice’s key. The message contains the session key, the nonce, and the
session key along with Alice’s identity encrypted under Bob’s key
(3) Alice forwards the data encrypted under Bob’s Key to Bob
(4-5) Alice and Bob mutually authenticate under the session key
• (4) Bob sends a nonce to Alice encrypted under the session key
• (5) Alice applies a transformation to the nonce and sends the result back to Bob
• Instead of a single KDC, a hierarchy of KDCs can be established; local KDCs and a golbal KDC
• Hierarchical scheme
– Limits the damage of a faulty or subverted KDC to its local area only
• The more frequent session keys, the more secure, but the less performance (the more network load and delay)
2. B responds with a message encrypted using the shared master key. Response includes the session key selected by B,
an identifier of B, the value of f(N1), and another nonce, N2
• It is desirable to impose some control on the way in which automatically distributed keys are used
– e.g. we may wish to define different types of session keys on the basis of use, such as
• Data-encrypting key
• PIN-encrypting key
• File-encrypting key
– e.g. the extra 8 bits in each 56-bit DES key can be used as a tag
– Because the tag is not transmitted in clear form, it can be used only at the point of decryption, limiting the
ways in which key use can be controlled
• A more flexible scheme is to use a control vector
• Control vector consists of a number of fields that specify the uses and restrictions for that session key
• Control vector is cryptographically coupled with the at the time of key generation at the KDC
– Key input = Km H
• When a session key is delivered to a user from the KDC, it is accompanied by the control vector in clear form
• The session key can be recovered only by using both the master key and the control vector
– No restriction on length of control vector (arbitrarily complex controls to be imposed on key use)
– Control vector is available in clear form at all stage of operation Key control can be exercised in multiple
locations
• Q.1
• Q.2
Consider an automated cash deposit machine in which users provide a card or an account number to deposit cash. Give
examples of confidentiality, integrity, and availability requirements associated with the system, and, in each case,
indicate the degree of importance of the requirement
Class Test(2):
• Q.3 For each of the following assets, assign a low, moderate, or high impact level for the loss of confidentiality,
availability, and integrity, respectively. Justify your answers.
– 64-bits or more
• S-P nets are based on the two primitive cryptographic operations seen before:
– substitution (S-box)
– permutation (P-box)
• One could perhaps quarrel with the title of this section. What about Playfair, or the Hill cipher? But LUCIFER, part of
an experimental cryptographic system designed by IBM, was the direct ancestor of DES, also designed by IBM.
Feistel Cipher:
• block size
• key size
• number of rounds
• round function
• ease of analysis
FC Structure:
• Multiple rounds
– Substitution (XOR)
– Permutation (Exchange of halves)
• Parameters
– Round function
• The plaintext and the ciphertext are 64 bit blocks, while the secret key is 128 bits long.
DES History:
• then redeveloped as a commercial cipher with input from NSA National Security Agency and others
• in 1973 NBS issued request for proposals for a national cipher standard
• IBM submitted their revised Lucifer which was eventually accepted as the DES
• subsequent events and public analysis show in fact design was appropriate
DES Implementation:
• DES C#
• https://www.youtube.com/watch?v=cYLX94DR8_Q&t=249s
• https://www.youtube.com/watch?v=iAYI-Xcd3Kk&list=PLrC9eiFFYSvXITUSFDIao2hsyTHsfa_lh
• DES Python
• https://www.youtube.com/watch?v=lSrrhP2vFS8&t=353s
Initial Permutation (IP):
Permutation Function(P):
DES S-Box(S1):
Permuted Choice One (PC-1):
DES:
• The overall processing at each iteration:
Li = Ri-1
• Concerns about:
(56-bits)
Mangler Function:
• 1. The mangler function first expands Rn (the right half of the input) from a 32-bit value into a 48-bit value, by
breaking Rn into eight 4-bit chunks and expanding each of those chunks into 6-bits.
• 2. The 48-bit key Kn is broken down into eight 6-bit chunks and Xor'ed with each Rn 6-bit chunk.
• 3. This 6-bit output is then fed into one of eight S-boxes, which produces a 4-bit output. Each set of 6-bits has its
own S-box. For example the 6-bit string 101101 uses its first 1 and last 1 to determine the row and the 2nd through
5th symbols to determine the column within the S-box table.
• 4. All eight 4-bit outputs are combined into a 32-bit quantity whose bits are then permuted to ensure good
diffusion and the avalanche affect.
• example:
– initial permutation of the key (PC1) which selects 56-bits in two 28-bit halves
• rotating each half separately either 1 or 2 places depending on the key rotation schedule K
• selecting 24-bits from each half & permuting them by PC2 for use in round function F
DES Decryption:
• with Feistel design, do encryption steps again using subkeys in reverse order (SK16 … SK1)
– ….
Avalanche Effect:
• where a change of one input or key bit results in changing approx half output bits
• include
– differential cryptanalysis
– linear cryptanalysis
• use knowledge of consequences of implementation to derive information about some/all subkey bits
• specifically use fact that calculations can take varying times depending on the value of the inputs to it
Differential Cryptanalysis:
• used to analyse most current block ciphers with varying degrees of success
• DES reasonably resistant to it, cf Lucifer
Differential Cryptanalysis:
• design of S-P networks has output of function f influenced by both input & key
• hence cannot trace values back through cipher without knowing value of the key
Differential Cryptanalysis:
• have some input difference giving some output difference with probability p
• if find instances of some higher probability input / output difference pairs occurring
• then must iterate process over many rounds (with decreasing probabilities)
• perform attack by repeatedly encrypting plaintext pairs with known input XOR until obtain desired output XOR
• when found
– if not then have a wrong pair, relative ratio is S/N for attack
• for large numbers of rounds, probability is so low that more pairs are required than exist with 64-bit inputs
• Biham and Shamir have shown how a 13-round iterated characteristic can break the full 16-round DES
Linear Cryptanalysis:
• can attack DES with 243 known plaintexts, easier but still in practise infeasible
– non-linearity
– good confusion
– increased diffusion
• number of rounds
• function f:
• key schedule
Summary:
• have considered:
– DES
• details
• strength
• You have been given a task to select one on the research paper and submit on LMS
• Keeping in view:
• by Diffie & Hellman in 1976 along with the exposition of public key concepts
• note: now know that Williamson (UK CESG) secretly proposed the concept in 1970
• Self
• https://www.youtube.com/watch?v=ESPT_36pUFc
• value of key depends on the participants (and their private and public key information)
• security relies on the difficulty of computing discrete logarithms (similar to factoring) – hard
Diffie-Hellman Setup
• KAB is used as session key in private-key encryption scheme between Alice and Bob
• if Alice and Bob subsequently communicate, they will have the same key as before, unless they choose new public-
keys
Diffie-Hellman Example
Hash:
• Also known as
– Message digest
– One-way function
• Randomness:
• Example use
– Fingerprint a program/document: attackers cannot find a different program with the same message digest
• MAC: MD(KAB|m)
• MD through chunk n depends on MD through chunks n-1 and the data in chunk n
• How to solve?
• MD(m| KAB)
– Use only half the bits of the message digest as the MAC
– Concatenate the secret to both the front and the back of the message
Encryption with a Message Digest
• One-time pad:
• b1=MD(KAB|IV), bi=MD(KAB|bi-1), …
• b1=MD(KAB|IV), c1= p1 b1
• MD5
• SHA-1, SHA-2
MD2
– Append MD2 checksum (16 octets) (a strange function of the padded message) to the end
MD2 Padding
MD2 Checksum
MD2 Checksum
• cn=(mnk cn-1) cn
• : 0 41, 1 46, …
• 48-byte quantity q:
– (current digest|chunk|digestchunk)
– cn=(cn-1) cn for n = 0, … 47; c-1 = 0 for pass 0; c-1 = (c47 + pass #) mod 256
– 16 8 = 128
MD4
• Fast in software
• Simple to program
MD4 Notation
• word = 32 bits
• Message m
• XY = X AND Y
• X v Y = X OR Y
MD4
• m’ = m100 … 0
– N is a multiple of 16
– A: 01 23 45 67
– B: 89 ab cd ef
– C: fe dc ba 98
– D: 76 54 32 10
• F(X,Y,Z) = XY v not(X) Z
• G(X,Y,Z) = XY v XZ v YZ
– Bitwise majority function: bit positions in which 2 or more bits are 1, output has a 1, else output has a 0
• H(X,Y,Z) = X Y Z
• Note: if bits of X, Y, and Z are independent and unbiased, each bit of F(X,Y,Z) and each bit of G(X,Y,Z) also will be
independent and unbiased.
MD4
for (i = 0 to N/16-1) {
/* Save A, B, C,D */
AA = A BB = B CC = C DD = D
Round 1
Round 2
Round 3
Output A,B,C,D
compression function
MD4 Round 1
/* 16 operations. */
Note: each word rotates through each of the four positions for each value of s
MD4 Round 2
/* [abcd k s] denotes
/* 16 operations. */
MD4 Round 3
/* 16 operations. */
/* increment each of A,B,C,D by the value it had before this block was started. */
A = A + AA
B = B + BB
C = C + CC
D = D + DD
MD4 Constants
• 5A827999: 32-bit constant, represents the square root of 2. The octal value is 013240474631.
6ED9EBA1: 32-bit constant, represents the square root of 3. The octal value is 015666365641
MD-5
• Self
MD5 Process
• As many stages as the number of 512-bit blocks in the final padded message
– Every stage consists of 4 passes over the message block, each modifying MD
• Operations
Constants of MD5
MD5 Message Digest Pass 1
SHA-1
• Developed by NIST
• SHA is specified as the hash algorithm in the Digital Signature Standard (DSS), NIST
• Take a message of length at most 264 bits and produces a 160-bit output.
A|B|C|D|E
A = 67452301
B = efcdab89
C = 98badcfe
D = 10325476
E = c3d2e1f0
– Input:
• Kt – a constant.
– Output:
• ABCDE: new MD
0 <=t<= 19 Kt = 5A827999
20<=t<=39 Kt = 6ED9EBA1
40<=t<=59 Kt = 8F1BBCDC
60<=t<=79 Kt = CA62C1D6
20<=t<=39 BCD
40<=t<=59 (BC)(BD)(CD)
60<=t<=79 BCD
Inner Loop of SHA-1 – 80 Iterations per Block
HMAC