Network Design and Security Management

download Network Design and Security Management

of 52

Transcript of Network Design and Security Management

  • 8/2/2019 Network Design and Security Management

    1/52

    NETWORK DESIGN SECURITY AND MANAGEMENT

    (IF452)

    OVERVIEW OF NETWORK SECURITY

    1.What is Encipherment?

    The use of mathematical algorithms to transform data into a form that is not readilyintelligible. The transformation and subsequent recovery of the data depend on analgorithm and zero or more encryption keys.

    2.What are the four basic tasks in designing a particular security service?

    1. Design an algorithm for performing the security-related transformation.The algorithm should be such that an opponent cannot defeat its purpose.

    2. Generate the secret information to be used with the algorithm.3. Develop methods for the distribution and sharing of the secret information4. Specify a protocol to be used by the two principals that makes use of the security

    algorithm and the secret information to achieve a particular security.

    3.Define Threats.

    Information access threats intercept or modify data on behalf of users who shouldnot have access to that data.

    Service threats exploit service flaws in computers to inhibit use by legitimate users.

    4.What is the use of digital signature?

    Data appended to, or a data unit that allows a recipient of the data unit to prove thesource and integrity if the data unit and protect against forgery.

    5.Define security recovery. Security recovery deals with requests from mechanisms, such as event handling andmanagement functions, and takes recovery actions.

    6.What are the aspects of information security?

    There are three aspects of the information security.Security attackSecurity mechanismSecurity Service

    7.List some common information integrity functions?

    Identification

    AuthorizationConcurrenceLiabilityEndorsementValidationTime of occurrenceRegistration

    8.What is meant by threat?

  • 8/2/2019 Network Design and Security Management

    2/52

    A potential for violation of security, which exists when there is acircumstances,capability,action or event that could breach security and cause harm. That is,a threat is a possible danger that might exploit a vulnerability.

    9.What is meant by attack?

    An attack on system security that derives from an intelligent threat: that is anintelligent act that is a deliberate attempt(especially in the sense of a method or technique)to evade security services and violate the security policy of a system.

    10.State some example of security attacks?

    1.Gain unauthorized access to information(ie.violate secrecy or privacy)2.Disavow responsibility or liability for information the cheater did originate.3.Enlarge cheaters legitimate license(for access ,origination, distribution etc).4.Pervert the function of software, typically by adding a covert function.5.Cause others to violate a protocol by means of introducing incorrect information.

    CLASSICAL ENCRYPTION TECHNIQUES

    1.What are the essential ingredients of a symmetric cipher?

    A symmetric encryption scheme has five ingredients:Plaintext: This is the original intelligible message or data that is fed into the

    algorithm as input.Encryption algorithm: The encryption algorithm performs various substitutions

    and transformations on the plaintext.Secret Key: The secret key is also input to the encryption algorithm. The key is the

    value independent of the plaintext. The algorithm will produce a different outputdepending on the specific key being used at the time. The exact substitutions and

    transformations performed by the algorithm depend on the key.Cipher text: This is the scrambled message produced as output. It depends on the

    plaintext and the key.Decryption algorithm: This is essentially the encryption algorithm in reverse. It

    takes the cipher text and the secret key and produces the original plaintext.

    2.What are the two basic functions used in the encryption algorithm?

    All the encryption algorithms are based on two general principles:Substitution: In which each element in the plaintext(bit, letter, group of bits or

    letters) is mapped into another element.Transposition: In which elements in the plaintext are rearranged.

    The fundamental requirement is that no information be lost(that is ,that alloperations are reversible). Most systems, referred to as product systems, involvemultiple stages of substitutions and transpositions.

    3.How many keys are required for two people to communicate via a cipher?

  • 8/2/2019 Network Design and Security Management

    3/52

    If both sender and receiver use the same key, the system is referred as symmetric,single-key, secret-key or conventional encryption. If both sender and receiver uses adifferent key, the system is referred as asymmetric, two-key or public key encryption.

    4.What is the difference between a block cipher and a stream cipher?

    A block cipher processes the input one block at a time, producing an output blockfor each input block.A stream cipher processes the input continuously, producing output one element at

    a time, as it goes alone.

    5.What are the two general approaches to attacking a cipher?

    The general two approaches for attacking a cipherCryptanalysis: Cryptanalytic attacks rely on the nature of the algorithm plus

    perhaps some knowledge of the general characteristics of the plaintext or even somesamples plaintext-cipher text pairs. This type of attack exploits the characteristics of thealgorithm to attempt to deduce a specific plaintext or to deduce the key being used. If

    the attack succeeds in deducing the key, the effect is catastrophic: All future and pastmessages encrypted with the key are compromised.Brute-force attack: The attacker tries every possible key on a piece of cipher text

    until an intelligible translation into plaintext is obtained. On average, half of allpossible keys must be tried to achieve success.

    6.List and briefly define types of cryptanalytic attacks based on what is known to the

    attacker?

    The various types of cryptanalytic attacks, based on the amount of information known tothe cryptanalyst

    Type of attack Known to cryptanalyst

  • 8/2/2019 Network Design and Security Management

    4/52

    7. What is the difference between an unconditionally secure cipher and a

    computationally secure cipher?

    Unconditionally secure cipher:

    An encryption scheme is unconditionally secure if the cipher text generated by the schemedoes not contain enough information to determine uniquely the corresponding plaintext, nomatter how much cipher text is available.

    Computationally secure cipher:

    An encryption scheme is said to be computationally secure if:The cost of breaking the cipher exceeds the value of the encrypted information.The time required to break the cipher exceeds the useful lifetime of the information.

    8. Briefly define the Caesar cipher?

    The Caesar cipher involves replacing each letter of the alphabet with the letterstanding three places down the alphabet .The alphabet is wrapped around, so that the letterfollowing Z is A. C = E (p) = (p + 3) mod (26)

    The general Caesar cipher algorithm isC = E (p) = (p + k) mod (26)

    Where k takes the value in the range 1 to 25The decryption algorithm is

    p = D(C) = (C - k) mod (26)

    9. Briefly define the monoalphabetic cipher?

    Cipher text Encryption algorithmCipher text to be decoded

    Known plaintext Encryption algorithmCipher text to be decodedOne or more plaintext-cipher text pairs formed with the

    secret keyChosen plaintext Encryption algorithm

    Cipher text to be decodedPlaintext message chosen by cryptanalyst, together with its

    corresponding cipher text generated with the secret key.

    Chosen cipher

    text

    Encryption algorithmCipher text to be decodedPurported cipher text chosen by cryptanalyst, together with its

    corresponding decrypted plaintext generated with the secret key.

    Chosen text Encryption algorithmCipher text to be decoded

    Plaintext message chosen by cryptanalyst, together with itscorresponding cipher text generated with the secret key.

    Purported cipher text chosen by cryptanalyst, together with itscorresponding decrypted plaintext generated with the secret key

  • 8/2/2019 Network Design and Security Management

    5/52

    A dramatic increase in the key space is achieved by allowing an arbitrarysubstitution. There are 26! Possible keys. It is referred to as monoalphabetic substitutioncipher, because a single cipher alphabet is used per message.

    10.Briefly define the Playfair cipher?

    The Playfair cipher treats the digrams in the plaintext as single units and translatesthese units into ciphertext digrams. This algorithm is based on the use of a 5 by 5matrix of letters constructed using keyword. Consider keyword as monarchy. Thematrix is constructed by filling in the letters of the keyword from left to right andfrom top to bottom, and then filling in the remainder of the matrix with the remainingletters. The letters I, J count as one letter

    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

    The rules to be followed are:Repeating plaintext letters that come in the same pair are separated with a filer

    letter, such as x.Plaintext letters that fall in the same row are replaced by the letter to the right, with

    the first element of the row circularly following the first.Plaintext letters that fall in the same column are replaced by the letter beneath,

    with the top element circularly following the last.Otherwise each letter is replaced by the letter that lies in its own row and the

    column occupied by the other plaintext.

    11.What is the difference between a monoalphabetic cipher and a polyalphabetic

    cipher?

    In monoalphabetic cipher single cipher alphabet is used per message. But inpolyalphabetic cipher there are multiple ciphertext letters for each plaintext letter, one foreach unique letter of keyword.

    12.What are two problems with the one-time pad?

    The one- time pad has the following two fundamental difficulties:(a) There is the practical problem of making large quantities of randomkeys. Supplying truly random characters in this volume is a significant task.

    (b) For every message to be sent, a key of equal length is needed byboth sender and receiver. Thus a mammoth key distribution problem exists.

    BLOCK CIPHERS AND THE DATA ENCRYPTION STANDARD

    1.Why is it important to study the Feistel Cipher?

  • 8/2/2019 Network Design and Security Management

    6/52

    Feistel cipher using the concept of a product cipher, which is the performing oftwo or more basic ciphers in sequence in such a way that the final result or productis cryptographically stronger then any of the component ciphers.

    Feistel proposed the use of a cipher that alternates substitutions and permutations.So Feistel cipher is considered to be an important one.

    2.What is the difference between a block cipher and a stream cipher?

    A block cipher process the input one block of elements at a time producing anoutput block for each input block.

    A stream cipher process the input elements continuously , producing output oneelement at a time, as it goes along.

    3.Why is it not practical to use an arbitrary reversible substitution cipher of the kind

    shown in Table.

    Encryption and decryptions tables for substitution cipher

    Cipher Text Plain Text

    0000

    0001

    0010

    0011

    0100

    01010110

    0111

    1000

    1001

    1010

    1011

    1100

    1110

    0011

    0100

    1000

    0001

    11001010

    1111

    0111

    1101

    1001

    0110

    1011

    Plain Text Cipher Text

    00000001

    0010

    0011

    0100

    0101

    0110

    0111

    1000

    1001

    1010

    10111100

    1101

    1110

    1111

    11100100

    1101

    0001

    0010

    1111

    1011

    1000

    0011

    1010

    0110

    11000101

    1001

    0000

    0111

  • 8/2/2019 Network Design and Security Management

    7/52

    1101

    1110

    1111

    0010

    0000

    0101

    In this example the key requires 64 bits. In general, for an n-bit general substitution blockcipher, the size of the key is n*2n. For a 64-bit block, which is a desirable length to thwartstatistical attacks, the key size is 64*264 = 270 ~ 1021 bits. So it is not practical to use anarbitrarily reversible substitution cipher.

    4.What is product cipher?

    Product cipher has the performance of two or more basic ciphers in sequence issuch a way that the final result or product is cryptographically stronger than any of thecomponent ciphers.

    5.What is the difference between Diffusion and Confusion? In Diffusion the statistical structure of the plaintext is dissipated into long rangestatistics of the cipher text. This is achieved by having each plaintext digit affect the valueof many cipher text digits. Which is equivalent to saying that each cipher text digit isaffected by many plaintext digits. Confusion seeks to make a relationship between the statistics of the cipher text andthe value of the encryption key as complex as possible. Thus even if the attacker can getsome handle on the statistics of the cipher text, the way in which the key was used toproduce that cipher text is so complex as to make it difficult to deduce the key.

    6 .Which parameters and design choices determine the actual algorithm of a Feistel

    cipher?Block size: Larger block sizes mean greater security but reducedencryption/decryption speed. A block size of 64 bits is a reasonabletradeoff and hasbeen nearly universal in block cipher design.However, the new AES uses a 128-bitblock size.

    Key size:Larger key size means greater security but may decreaseencryption/decryption speed.Key sizes of 64 bits or less are now widely considered tobe inadequate, and 128 bits has ecome a common size.

    Number of rounds: The essence of the Feistel cipher is that a single round offersinadequate security but that multiple rounds offer increasing security.A typical size is16 rounds.

    Subkey generation algorithm: Greater complexity in this algorithm should lead togreater difficulty of cryptanalysis.Round function: Again, greater complexity generally means greater resistance to

    cryptanalysis.

    7. What is the purpose of the S-boxes in DES?

    The role of the S-boxes in the function F is that the substitution consists of a set ofeight S-boxes ,each of which accepts 6 bits as input and produces 4 bits as follows: The

  • 8/2/2019 Network Design and Security Management

    8/52

    first and last bits of the input to box Si form a 2-bit binary number to select one of foursubstitutions defined by the four rows in the table for Si.The middle four bits select one ofthe sixteen columns.The decimal value in the cell selected by the row and column is thenconverted to its 4-bit representation to produce the output. For example, in S1,for input011001,the row is 01 and the column is 1100.The value in row 1,column 12 is 9,so the

    output is 1001.

    8. Explain the avalanche effect?A desirable property of any encryption algorithm is that a small change in either

    the plaintext or the key should produce a significant change in the ciphertext.In particular, achange I one of the plaintext or one bit of the key should produce a change in many bits ofthe ciphertext.

    9. What is the difference between differential and linear cyptanalysis?

    Linear cryptanalysis based on finding linear approximations to describe thetransformations performed in DES

    KEY MANAGEMENT:OTHER PUBLIC KEY CRYPTOSYSTEMS

    1.What are the two different uses of public-key cryptography related to key

    distribution?

    There are two aspects to the use of public-key cryptography

    In this regard:The distribution of public keysThe use of public-key encryption to distribution secret

    keys

    2.List four general categories of schemes for the distribution of public keys.

    Public announcementPublicly available directoryPublic-key authorityPublic-key certificates

    3.What are the essential ingredients of a public-key directory?

    The authority maintains a directory with a entry for each participant.Each participant registers a public key with the directory authority.A participant may replace the existing key with a new one at any time.Periodically, the authority publishes the entire directory or updates to the directory.Participants could also access the directory electronically.

  • 8/2/2019 Network Design and Security Management

    9/52

    4.What is public-key certificate?

    The public-key authority could be a bottleneck in the system, for auser must appeal to the authority for a public key for every other user that it

    wishes to contact. As before the directory of names and public keys maintained by

    the authority is vulnerable to tempering.

    5.What are the requirements for the use of a public-key certificate scheme?

    Any participant can read a certificate to determine the name and public key of thecertificates owner.

    Any participant can verify that the certificate originated from the certificateauthority and is not counterfeit.

    Only the certificate authority can create and update certificates.Any participant can verify the currency of the certificate.

    6.Briefly explain Diffie-Hellman key exchange.

    The purpose for this algorithm is to enable two users to exchange a key securely that canthen be used for subsequent encryption of messages. It depends for its effectiveness on thedifficulty of computing discrete logarithms.

    MESSAGE AUTHENTICATION AND HASH FUNCTIONS

    1)What types of attacks are addressed by message authentication?

    Content modification - Changes to the contents of the messageSequence modification - Any modification to a sequence of messages

    between parties, including insertion, deletion,and reordering.

    Timing modification - Delay or replay of messages.

    2)What two levels of functionality comprise a message authentication or digital

    signature mechanism?

    Low-level authenticationHigher-level authentication

    At the lower level there must be some sort of function that produces anauthenticator: a value to be used to authenticate a message. This lower levelfunction is then used as primitive in a higher-level authentication protocol

    that enables a receiver to verify the authenticity of message.

    3) What are some approaches to producing message authentication?

    Message encryption - The cipher text of the entire imageserves as its authenticator.

    Message authentication code - (MAC) A public function of the message and asecret key that produces a fixed length value that serves as a authenticator.

  • 8/2/2019 Network Design and Security Management

    10/52

    Hash function - A public function that maps amessage of any length into a fixed lengthhash value, which serves asthe authenticator.

    4) When combination of symmetric encryption and an error control code is used formessage authentication, in what order must the two functions be performed?The message is encrypted first, and then the MAC is calculated using the resulting

    cipher text to form the transmitted block.

    5) What is a message authentication code?

    An alternative authentication technique involves the use of a small fixedsize block of data, known as a cryptographic checksum or MAC that is appended to themessage.

    6) What is the difference between a message authentication code and a one-way hash

    function?The difference between an MAC and a one-way hash function is that unlike an MAC, ahash code does not use a key but is a function only of the input message.

    7) In what ways can a hash value be secured so as to provide message authentication?

    The ways in which a hash code can be used to provide message authentication are:

    The message plus concatenated hash code is encrypted using symmetricencryption.The hash code provides the structure required for authentication.

    Only the hash code is encrypted using symmetric encryption. This reduces the

    processing burden.Only the hash code is encrypted using public key encryption and the sendersprivate key.This provides digital signature.

    The message plus the public key-encrypted hash code may be encrypted using asymmetric secret key.

    A hash function may be used without encryption for message authentication.Itassumes that two communicating parties (A and B) share a common key (s). Acomputes the hash value over the concatenation of M and S.B knows S and thereforecan re-compute M.

    The entire message plus the hash code may be encrypted.

    8) Is it necessary to recover the secret key in order to attack a MAC algorithm?

    A number of keys will produce the correct MAC and the opponent has no way ofknowing which is the correct key. On an awerage 2(n-k) keys produce a match.Thereforeattacks do not require the discovery of the key.

    9) What characteristics are needed in a secure hash function?

  • 8/2/2019 Network Design and Security Management

    11/52

    Requirements of a hash function(H):H can be applied to a block of data of any size.H produces a fixed length output.H(x) is easy to compute for any given xFor any given value h it is computationally infeasible to find y/x with H(y)=H(x).

    It is computationally infeasible to find any pair(x,y) such that H(x)=H(y).

    10) What is the difference between a strong and a weak collision resistance?

    For any given value h it is computationally infeasible to find y/x withH(y)=H(x).This is weak collision resistance.It is a one-way property.It is easy to

    generate a code given a message, but almost impossible to do the reverse.It is computationally infeasible to find any pair(x,y) such that H(x)=H(y).This is

    strong collision resistance. This guarantees that an alternative message hashing to thesame value as a given message cannot be found.This prevents forgery.

    11)What is the function of a compression function in a hash function?

    The hash function involves repeated use of a compression function. The motivation isthat if the compression function is collision resistant, then the hash function is alsocollision resistant function.So a secure hash function can be produced.

    AUTHENTICATION APPLICATIONS

    1.What problem was Kerberos designed to address?

    The problem that Kerberos addresses is this: Assume an open distributed

    environment in which users at workstations wish to access services on servers distributedthroughout the network. We would like for servers to be able to restrict access toauthorized users and to be able to authenticate requests for service. In this environment aworkstation cannot be trusted to identify its users correctly to network services.

    2.What are the three threats associated with user authentication over a network or

    Internet?

    The three threats are:

    A user may gain access to a particular workstation and pretend to another user

    operating from that workstation.A user may alter the network address of a workstation so that the requests sent fromthe altered workstation appear to come from the impersonated workstation.

    A user may eavesdrop on exchanges and use a replay attack to gain entrance to aserver or to disrupt operations.

    3.List three approaches to secure user authentication in a distributed environment?

  • 8/2/2019 Network Design and Security Management

    12/52

    Three approaches to secure user authentication in a distributed environment are:

    Rely on each individual client workstation to assure the identity of its user or usersand rely on each server to enforce a security policy based on user identification (ID).

    Require that client systems authenticate themselves to servers, but trust the client

    system concerning the identity of its user.Require the user to prove identity for each service invoked. Also require thatservers prove their identity to clients.

    4.What four requirements were defined for Kerberos?

    The four requirements defined for Kerberos are:

    Secure: A network eavesdropper should not be able to obtain the necessaryinformation to impersonate a user. More generally Kerberos should be strong enoughthat a potential opponent does not find it to be the weak link.

    Reliable: For all services that relay on Kerberos for access control, lack of

    availability of the supported services. Hence, Kerberos should be highly reliable andshould employ a distributed server architecture, with one system able to back upanother.

    Transparent: Ideally, the user should not be aware that authentication is takingplace, beyond the requirement to enter a password.

    Scalable: The system should be capable of supporting large numbers of clients andservers. This suggests a modular, distributed architecture.

    5.What entities constitute a full-service Kerberos environment?

    A full service environment consists of a Kerberos server, a number of clients and a

    number of application servers.

    6.In the context of Kerberos, what is a realm?

    The Kerberos server must have the user ID (UID) and hashed password of allparticipating users in its database. All users are registered with the Kerberos server.

    The Kerberos server must share a secret with each server. All servers are registeredwith the Kerberos server.

    Such an environment is referred to as realm.

    7.What are the principle differences between version 4 and version 5 of Kerberos?

    The principle differences between version 4 and version 5 of Kerberos are:

    1.Encryption system dependence2.Internet Protocol Dependence3.Message byte ordering4.Ticket Life Time5.Authentication Forwarding

  • 8/2/2019 Network Design and Security Management

    13/52

    6.Interrealm Authentication

    ELECTRONIC MAIL SECURITY

    1. What are the five principle services provided by the PGP?

    Function Algorithm used Description

    Digital Signature DSS\SHA or RSA\SHA

    The hash code of a

    message is created using

    SHA1.This message

    digest is encrypted using

    DSS or RSA with the

    senders private key and

    included with themessage

    Message Encryption

    CAST or IDEA or Three-

    key Triple DES with

    Diffie-Hellman or RSA

    A message is encrypted

    using CAST-128 or IDEA

    or 3DES with a one-time

    session key generated by

    the sender. The session

    key is encrypted using

    Diffie-Hellman or RSA

    with the recipients

    public key and includedwith the message

    Compression ZIP

    A message may be

    compressed, for storage

    or transmission using ZIP

    Email compatibility Radix 64 conversion

    To provide transparency

    for email applications, an

    encrypted message may

    be converted to an ASCII

    string using radix 64

    conversion

    Segmentation ------

    To accommodate

    maximum message size

    limitations, PGP

    performs segmentation

    and reassembly

  • 8/2/2019 Network Design and Security Management

    14/52

    2.What is the utility of a detached signature?

    A detached signature may be stored and transmitted separately from the message itsigns. This is useful in several contexts. A user may wish to maintain a separate signaturelog of all messages sent or received. A detached signature of an executable program candetect subsequent virus infection. Finally detached signature can be used when more than

    one party must sign a document, such as legal contract.

    3. Why does PGP generate a signature before applying compression?

    The signature is generated before compression due to 2 reasons:

    1. It is preferable to sign an uncompressed message so that one can store only theuncompressed message together with the signature for future verification2. Even if one were willing to generate dynamically a recompressed message forverification, PGPs compression algorithm presents a difficulty

    4.What is Radix 64 conversion?

    Radix 64 converts the input stream into radix 64 format.It expands a message by 33%

    5.Why is R 64 conversion useful for email generation?

    The Radix 64 conversion is performed before the segmentation of the messages take placeThe use of radix 64 is that it converts he input stream to 33%. The radix 64 converts theinput stream to a radix 64 format

    6.What is MIME?

    Multipurpose Internet Mail Extensions (MIME) is an extension to the RFC 822framework that is intended to address some of the problems and limitations of these use ofSMTP.Some of limitations: -

    1. It cannot transmit executable files or folders.2. SMTP servers may reject, mail message over a certain size.

    7.Why is the segmentation and reassembly function in PGP is needed?

    E-mail facilities often are restricted to a maximum message length. To accommodatethis restriction, PGP automatically subdivides a message that is too large into segments thatare small enough to send via e-mail. The segmentation is done after all of the other

    processing, including the radix-64 conversion. Thus, the session key component andsignature component appear only once, at the beginning of the first segment.

    8.What is S/MIME?

    Secure/Multipurpose Internet Mail Extension is a security enhancement to the MIMEInternet e-mail format standard, based on technology from RSA Data Security. It is abilityto sign and/or encrypt messages.

  • 8/2/2019 Network Design and Security Management

    15/52

    9.What is RFC 822?

    RFC 822 defines a format for text messages that are sent using electronic mail.It has been the standard for Internet-based text message and remains in common use. Inthe RFC822 context, messages are viewed as having an envelope and contents. Theenvelope contains whatever information needed to accomplish transmission and delivery.

    The contents compose the object to be delivered to the recipient.

    10.How does PGP use the concept of trust?

    PGP provide a convenient means of using trust, associating trust with public keys, andexploiting trust information. Each entry in the public-key ring is a public key certificate.Associated with each such entry is a key legitimacy field that indicates the extent to whichPGP will trust that this is a valid public key for this user; the higher the level of trust, thestronger is the binding of this user ID to this key.

    IPSEC

    1.Give examples of applications of IPSec?Secure branch office connectivity over the Internet.Secure remote access over the Internet.Establishing extranet and intranet connectivity with partners.Enhancing electronic commerce security.

    2.What services are provided by IPSec?

    Access controlConnectionless integrityData origin authenticationRejection of replayed packets

    3.What parameters identify an SA and What parameter Characterize the nature of a

    particular SA?

    A security association(SA) is uniquely identified by three parameters,Security Parameter Index(SPI)IP Destination AddressSecurity Protocol IdentifierThe parameters that characterize the particular SA isSequence number counterSequence counter overflowAnti-Replay window

    AH InformationESP InformationLifetime of this SAIPSec Protocol ModePath MTU

    4.What is the difference between Transport mode and Tunnel mode?

  • 8/2/2019 Network Design and Security Management

    16/52

    Transport mode Tunnel mode

    1.It provides protection for upper layer

    protocols.

    2.Used for end-to-end communication

    between two host

    3.AH:Authenticates IP payload andselected portions of IP header and IPv6

    extension header

    1. It provides protection to the entire IP

    packet.

    3.It is used when one or both ends of an

    SA is a security gateway , such as firewall

    or router that implement IPSec.3.Authenticates entir inner IP packet plus

    selected portions of outer IP header and

    outer IPv6 extension headers.

    5.What is replay attack?

    A replay attack is one which an attacker obtains a copy of an authenticated packetand later transmit it to the intended destination.

    6.Why does ESP include a padding field?

    Padding field is added to the ESP to provide partial traffic flow confidentiality byconcealing the actual length of the payload.

    7.What are the basic approaches to bundling SAs?

    1.Transport adjacency

    Refers to applying more than one security protocol to the same packet,without invoking tunneling.

    2.Iterated tunneling

    Refers to the application of multiple layers of security protocol affected

    through IP tunneling.

    FIREWALL

    1.List the three design goals for a firewall.

    1.All traffic from inside to outside, and vice versa, must pass through the firewall. Thisis achieved by physically blocking all access to the local network except via the firewall.

    2.Only authorized traffic, as defined by the local security policy, will be allowed topass. Various types of firewalls are used, which implement various types of securitypolicies.

    3. The firewall itself is immune to penetration. this implies that use of a trusted system

    with a secure operating system.

    2.List four techniques used by firewalls to control access and enforce a security policy.

    Service control

    Direction control

    User control

    Behavior control

  • 8/2/2019 Network Design and Security Management

    17/52

    3.What information does a typical packet-filtering router use?

    Packet filtering router uses the following information:

    Source IP address:The IP address of the system that originated the IP packet

    Destination IP address:

    The IP address of the system the IP packet is trying to reach Source and destination transport-level address:

    The transport level port number,which definesapplications such as SNMP or TELNET

    IP protocol field:Defines the transport protocol

    Interface:For a router with three or more ports,which interface of the

    router the packet came from or which interface of the router the packetis destined for.

    4.what are some weaknesses of a packet-filtering router?

    They cannot prevents attacks that employ application-specificfunctions.

    Logging functionality is limited

    Do not support advanced user authentication schemes.

    It cannot detect a network packet in which the OSI layer 3addressing information has been alerted.

    They are susceptible to security breaches caused by improperconfiguration.

    5.what is the difference between a packet-filtering router and a stateful inspection

    firewall?

    A simple packet-filtering firewall must permit inbound network traffic on all thesehigh-numbered ports for TCP-based traffic to occur. This creates a vulnerability that can beexploited by unauthorized users.

    A stateful inspection packet filter tightens up the rules for TCP traffic by creating adirectory of outbound TCP connection. The packet filters now allow incoming traffic tohigh-numbered ports only for those packets that fit the profile of one of the entries in thedirectory.

    6. What is an application level gateway?An application level gateway, are also called a proxy server, acts as a relay of

    application level traffic. The user contacts the gateway using a TCP/IP application, such astelnet or FTP, and the gateway asks the user for the name of the remote host be accessed.

    7. What is a circuit level gateway?

    A circuit-level gateway does not permit an end-to-end TCP connection; rather, thegateway sets up two TCP connections, one between itself and a TCP user on an inner host

  • 8/2/2019 Network Design and Security Management

    18/52

    and other between itself and a TCP user on an outer host. Once these connections areestablished, the gateway typically relays TCP segments from one connection to otherwithout examining the contents.

    8.what are the differences among the three configuration of firewall?

    In the screened host firewall, single-homed bastion configuration, the firewallconsists of two systems: a packet-filtering router and a bastion host.In the screened host firewall, dual-homed bastion configuration prevents such a

    security breach.In the screened subnet firewall configuration is the most secure one.

    Here two packet filters are used, one between the bastion host and the Internet and onebetween the bastion host and the internal network.

    9.In the context access control, what is the difference between a subject and an

    object?

    Subject is an entity capable of accessing objects. Any user or application actually

    gains access to an object by means of a process that represents that user or application.Object is one in which anything is controlled.eg.files, programs and segments ofmemory.

    10. What is the difference between an access control list and a capability ticket?

    An access control list lists users and their permitted access rights for each object.A capability ticket specifies authorized objects and operations for a user. Each user

    has a no.of tickets and may be authorized to loan or give them to others.

    11.what are the two rules that a reference monitor enforces?

    No read up

    A subject can only read an object of less or equal security level. Thisis referred to as simple security property.

    No write downA subject can only write into an object of grater or equal securitylevel. This is referred to as * property.

    12.what properties are required for a reference monitor?

    Complete mediation: The security rules are enforced on everyaccess, just, for example, when a file is opened.

    Isolation: The reference monitor and database are protected fromunauthorized modification.

    Verifiability: The reference monitors correctness must be provable

    Web Security

    1.What are the advantages of each of the three approaches shown in the figure?

  • 8/2/2019 Network Design and Security Management

    19/52

    Figure 1 : Figure 2:

    HTTP FTP SMTP

    TCP

    IP/IPSec

    Figure 3:

    S/MIME PGP SET

    Kerberos SMTP HTTP

    UDP TCP

    IP

    Figure 1:The advantage of using IPSec is that it is transparent to end users and applications

    and provides a general-purpose solution.Further,IPSec includes a filtering capability so thatonly selected traffic need incur the overhead of IPSec processing.Figure 2:

    SSL(or TLS) could be provided as part of the underlying protocol suite andtherefore be transparent to applications.Figure 3:

    The advantage of this approach is that the service can be tailored to the specificneeds of a given application.

    2. What protocols comprise SSL?

    The protocols that comprise SSL are:SSL Handshake Protocol,SSL ChangeCipher Spec Protocol,SSL Alert Protocol,Hypertext Transfer Protocol(HTTP)and SSL Recprd Protocol.

    3. What is the difference between an SSL connection and an SSLsession ?

    HTTP FTP SMTP

    SSL or TLS

    TCP

    IP

  • 8/2/2019 Network Design and Security Management

    20/52

    A Connection is a transport that provides a suitable type of service.ForSSL,such connections are peer-to-peer relationships.The connections are transient.

    An SSL session is an association between a client and a server.Sessions arecreated by the Handshake Protocol.Sessions define a set of cryptographic securityparameters, which can be shared among multiple connections.

    4. List and briefly define the parameters that define an SSL session state.

    A session state is defined by the following parameters:

    Session identifier

    Peer certificate

    Compression method

    Cipher spec

    Master secret

    Is resumable

    5. List and briefly define the parameters that define an SSL session connection.

    A connection state is defined by the following parameters:

    Server and client random

    Server write MACsecret

    Client write MACsecret

    Server write key

    Client write key

    Initialization vectors

    Sequence numbers

    ESSAYS

    1.Write notes on security service

    1.AUTHENTICATION

    The assurance that the communicating entity is the one that it claims to be.Peer Entity Authentication:

    Used in association with a logical connection to provide confidence in theidentity of the entities connected.

    Data Origin Authentication:

    In a connectionless transfer, provides assurance that the source of received

    data is as claimed.

    2.ACCESS CONTROL

    The prevention of unauthorized use of a resource (that is this service control who canhave access to a resource, under what condition access can occur, and what those accessingthe resource are allowed to do).

    3.DATA CONFIDENTIALITY

  • 8/2/2019 Network Design and Security Management

    21/52

    The protection of data from unauthorized disclosureConnection Confidentiality:

    The protection of all user data on a connection.Connectionless Confidentiality:

    The protection of all user data in a single data block.

    Selective Field Confidentiality:

    The confidentiality of selective field within the user data on a connection or in a singledata block.

    Traffic-Flow Confidentiality:

    The protection of the information that might be derived from observation of trafficflows.

    DATA INTEGRITY

    The assurance that data received are exactly as sent by an authorized entity.

    Connection Integrity with recovery:Provides for the integrity of all user data on a connection and detect anymodification,ionsertion,deletion,or replay of any data within an entire datasequence, with recovery attempted.

    Connection Integrity without recovery:

    As above, but provides only detection without recovery.Selective-Field Connection Integrity:

    Provides for the integrity of selected fields within the user data of the data blocktransferred over a connection and takes the form of determination of whether theselected fields have been modified,inserted,deleted or replayed.

    Connectionless Integrity:

    Provides for the integrity of a single connectionless data block and may take theform of detection of data modifivation.Additionally a limited form of replaydetection may be provided.

    Selective-field Connectionless Integrity:

    Provides for the integrity of selected fields within a single connectionless datablock: takes the form of determination of whether the selected fields have beenmodified.

    5.NONREPUDIATION

    Provides protection against denial by one of the entities involved in a communicationof having participated in all or part of the communication.Nonrepudiation ,Origin:

    Proof that the message was sent by the specified party.Nonrepudiation,Destination:

    Proof that the message was received by the specified party.

  • 8/2/2019 Network Design and Security Management

    22/52

    2.Security Attacks

    A useful means of classifying security attacks, used both in x.800 and RFC 2828, is interms of passive attacks and active attacks. A passive attack attempts to learn ormake use of information from the system but does not affect system resources. Anactive attack attempts to alter system resources or affect their operation.

    Passive attacks

    Passive attacks are in the nature of eavesdropping on, or monitoring of, transmissions. Two

    types of passive attacks are release of message contents and traffic analysis. The releaseof messagecontents is easily understood. A telephone conversation, an electronic mailmessage, and a transferred file may contain sensitive or confidential information.

    A second type of passive attack, traffic analysis, is subtler. Suppose that we had aWay of masking the contents of messages or other information traffic so that opponents,even if they captured the message, could not extract the information from the message.

    Passive attacks are very difficult to detect because they do not involve any alteration of

    the data.

    Active attacks

    Active attacks involves some modification of the data stream or the creation of a falseStream and can be subdivided into four categories.

    I. MasqueradeII. Replay

    III. Modification of messageIV. Denial of service

    A masquerade takes place when one entity when one entity pretends to be a different entity.A masquerade attack usually includes one of the other forms of active attack.

    Replay involves the passive capture of a data unit and its subsequent retransmission toproduce an unauthorized effect.Modificationof messages simply means that some portion of a legitimate message isaltered or that messages are delayed or reordered, to produce an unauthorized effect.The denial of service prevents or inhibits the normal use or management of

    communication facilities.

    1.Explain about transposition techniques?

    All the substitution techniques involve the substitution of a cipher text symbol for aplaintext symbol. A very different kind of mapping is achieved by performing some sort ofpermutation on the plaintext letters. This technique is referred to as a transposition cipher.

    The simplest such cipher is of the rail fence technique, in which the plaintext iswritten down as a sequence of diagonals and then read off as a sequence of rows. Forexample, to encipher the message meet me after the toga party with a rail fence of depth2, we write the following:

    m e m a t r h t g p r ye t e f e t e o a a t

    The encrypted message isMEMATRHTGPRYETEFETEOAAT

  • 8/2/2019 Network Design and Security Management

    23/52

    This sort of thing would be trivial to cryptanalyze. A more complex scheme is towrite the message in a rectangle, row by row, and read off the message off, column bycolumn, but permute the order of the columns. The order of the columns then becomes thekey to the algorithm. For example,

    Key: 4 3 1 2 5 6 7Plaintext: a t t a c k po s t p o n ed u n t i l tw o a m x y z

    Cipher text: TNNAAPTMTSUOAODWCOIXKNLYPETZ

    A pure transposition cipher is easily recognized because it has the same letterfrequencies as the original plaintext. For the type columnar transposition, cryptanalysis isfairly straightforward and involves laying out the cipher text in a matrix and playing aroundwith column positions. Diagram and triagram frequency tables can be useful.

    The transposition cipher can be made significantly more secure by performing morethan one stage of transposition. The result is a more complex permutation that is not easilyreconstructed. Thus, if the foregoing message is re-encrypted using the same algorithm,

    Key: 4 3 1 2 5 6 7Plaintext: t t n a a p t

    m t s u o a od w c o i x kn l y p e t z

    Cipher text: NSCYAUOPTTWLTMDNAOIEPAXTTOKZ

    To visualize the result of this double transposition, designate the letters in theoriginal plaintext message by the numbers designating their position. Thus, with 28 lettersin the message, the original sequence of letters is

    1 02 03 04 05 06 07 08 09 10 11 12 13 1415 16 17 18 19 20 21 22 23 24 25 26 27 28

    After the first transposition we have

    03 10 17 24 04 11 18 25 02 09 16 23 01 0815 22 05 12 19 26 06 13 20 27 07 14 21 28

    which has somewhat a regular structure. But after the second transposition , we have

    17 09 05 27 24 16 12 07 10 02 22 20 03 2515 13 04 23 19 14 11 01 26 21 18 08 06 28

    This is much less structured permutation and is much more difficult to cryptanalyze.

  • 8/2/2019 Network Design and Security Management

    24/52

    2.Write short notes on Steganography

    The methods of stegonagraphy conceal the existence of the message,whereas the methods of cryptography render the message unintelligible to outsiders byvarious transformations of the text. A simple form of steganography, but one that is timeconsuming is one in which an arrangement of words or letters within an apparently

    innocuous text spells out the real message.Some of the other techniques are:

    Character marking: Selected letters of printed or typewritten text are overwritten inpencil. The marks are ordinarily not visible unless the paper is held at an angle to brightlight.

    Invisible Ink: A number of substances can be used for writing but leave no visibletraces until heat or some chemical is applied on the paper.

    Pin punctures: Small pin punctures on selected letters are ordinarily not visible unlessthe paper is held up in front of a light.

    Typewriter correction ribbon: Used between lines typed with a black ribbon, theresults of typing with the correction are visible only under a strong light.

    For example, The Kodak Photo CD formats maximum resolution is 2048 by 3072pixels with each pixel containing 24 bits of RGB color information. The least significantbit of each 24-bit pixel can be changed without greatly affecting the quality of the image.The result is that we can hide a 2.3-megabyte message in a single digital snapshot.

    The advantage of steganography is that it can be employed by parties who havesomething to lose should the fact of their secret communication be discovered.

    Steganography has a number of drawbacks when compared to encryption. Itrequires a lot of overhead information to hide relatively few bits of information.

    1.Briefly describe about the Strength of DES?With a key length of 56 bits, there are 256 possible Keys, Which is approximately

    7.2* 1016 Keys. Thus, on the face of it, a brute-force attack appears impractical. Assumingthat, on average half the key space has to be searched, a single machine performing oneDES encryption per microsecond would take more than a thousand years to break thecipher

    However, the assumption of one encryption per microsecond is overlyconservative. As far back as1977, Diffie and hellman postulated that the technology existedto built a parallel machine with 1 million encryption devices, each of which could performone encryption per microsecond. This would bring the average search time down to about10 hours. The authors estimated that the cost would be about $20 million

    in 1977 dollars.DES finally and definitively proved insure in July 1988, when the electronic

    Frontier Foundation (EFF) announced that it had broken a DEF encryption using aspecial-purpose DES cracker machine that was built for less than $250,000. The attacktook less than three days. The EFF has published a detailed description of the machine,enabling others to build their own cracker. And, of course, hard wareprices will continue to drop as speeds increase, making DES virtually Worthless.

  • 8/2/2019 Network Design and Security Management

    25/52

    It is important to note that there is more to a key-search attack than simply runningthrough all possible keys. Unless known plaintext is provided the analyst must be able torecognize plaintext as plaintext .If the message is just plaintext in English,then the result pops out easily, although the task of recognizing English would have to beautomated. If the text message has been compressed before encryption, then recognition is

    more difficult. And if the message is some more general type of data, such as numericalfile, and this has been compressed, the problem becomes more difficult to automate, thesupplement the Brute-force approach, some degree of knowledge about the expectedplaintext is needed, and the handsome means of automatically distinguishing plaintext fromgarble is also needed. The EEF approach addresses this issue as well and introduces someautomated techniques that would be effective in many context.

    The Nature of DES AlgorithmAnother concern is the possibility that the cryptanalysis is possible by exploiting the

    characteristics of the DES algorithm. The focus of concern has been on the eightsubstitution tables, or S-boxes that are used in each iteration. Because the design criteria for

    these boxes, and indeed for the entire algorithm, were not made public, there is a suspicionthat the boxes were constructed in such a way that cryptanalysis is possible for anopponent who knows the weaknesses in the S-boxes. This assertion is tantalizing, and overthe years a number of regularities and unexpected behaviors of the s-boxes have beendiscovered. Despite this no one has so far succeeded in discovering the supposed fatalweaknesses in the s-boxes.

    Timing Attacks

    A timing attack is one in which information about the key or plaintext is obtained by

    observing how long it takes a given implementation to perform decryptions on variouscipher texts. A timing attack exploits the facts that the encryption and decryption algorithmoften takes slightly different amounts of time on different inputs. report on an approach thatyields the Hamming weight of the secret key. This is the long way from knowing the actualkey, but it is an intriguing first step. DES appears to be fairly resistant to a successfultiming attack but suggest some avenues to explore.

    2.Briefly explain about DES design criteria?

    The criteria used in the design of DES, focused on the design of the S-boxes and

    on the P function that takes the output of the S boxes .The criteria for the S-boxes are as

    follows:1. No output bit of any S-box should be too close a linear function of the input bits.

    Specifically,if we select any output bit and any subset of the six input bits, thefraction of inputs for which this output bit equals the XOR of these input bitsshould not be close to 0 or 1, but rather should be near .

    2. Each row of an S-box should include all 16 possible output bit combinations.3. if two inputs to an S-box differ in exactly one bit, the outputs must differ I atleast

    two bits.

  • 8/2/2019 Network Design and Security Management

    26/52

    4.If two inputs to an S-box differ in their first two bits and are

    identical in their last two bits, the two outputs must not be the same.

    5.For any non zero 6-bit difference between inputs, no more than8 of the 32 pairs of inputsexhibiting that difference may result in the same output difference.6.This is a criterion similar to the previous one, but for the case of three S boxes.Coppersmith pointed out that the first criterion in the preceding list was needed because the

    S-boxes are the only nonlinear part of DES. If the S-boxes were linear ,the entire algorithmwould be linear and easily broken. We have seen this phenomenon with the Hill Cipher,which is linear. The remaining criteria were primarily aimed at thwarting differencialcryptanalysis and at providing good confusion properties.The criteria for the permutation P are as follows:

    1. The four output bits from each S-box at round I are distributed so that two of themaffect middle bits of round(I+1) and the other two affect end bits. The end bitsare the two left-hand bits and the two righthand bits, which are shared with adjacentS-boxes.

    2. The four output bits from each S-box affect six different S-boxes on the next round,and no two affect the same S-box.

    3. For two S-boxes j,k, if an output bit from Sj, affects a middle bit of Sk on the nextround,then an output bit from Sk cannot affect a middle bit of Sj. This implies thatfor j=k, an output bit from Sj must not affect a middle bit of Sj.

    These criteria are intended to increase the diffusion of the algorithm.

    Key management

    There are two aspects to the use of public-key cryptographyin this regard:

    The distribution of publickeys

    The use of public-keyencryption to distribution secret keys.

    Distribution of public keys

    Four general categories of schemes for the distribution of public keys.

    Public announcement

    Publicly available directory

    Public-key authority

    Public-key certificates

  • 8/2/2019 Network Design and Security Management

    27/52

    Public announcement of public keys

    KUa KUb

    KUa KUb

    . .

    . . . . .

    KUb

    KUa

    Here the public-key is public one. For example PGP.

    Although this approach is convenient, it has a weakness that anyone can forge such a

    public announcement.

    Publicly available directory

    It has the following elements:

    The authority maintains a directory with a entry for each participant.

    Each participant registers a public key with the directory authority.

    A participant may replace the existing key with a new one at any time.

    Periodically, the authority publishes the entire directory or updates to thedirectory.

    Participants could also access the directory electronically.

    KUaKUb

    AB

    Public key

    directory

    AB

  • 8/2/2019 Network Design and Security Management

    28/52

    Public-key authority

    (1) Request||timer1 (5) EKRauth [kua||Request||Time2]

    (2) EKRauth [Kub||Request ||Time1] (4)Request||

    Time2]

    (3) EKUa [Ida||N1](6)EKUa[N1||N2]

    (7) EKUb [N2]

    It has the following steps:

    Time stamp message

    Authority public key

    A sends id of A and a nonce it B

    B receives As public key B sends a message to A

    A returns N2 encrypted using Bs public key

    Public-key certificates

    Certificate that can be used by participants to exchange keys without contacting

    a public-key authority.

    KUa KUb

    CB=EKRauth

    CA=EKRauth [Time1,IDA,KUa] [Time2,IDB,Kub]

    Public key

    authority

    Initiator

    A

    Responder

    B

    Certificate

    authority

    A B

    (1) CA

    (2) CB

  • 8/2/2019 Network Design and Security Management

    29/52

    Public key distribution of secret keys

    Simple secret key distribution

    (1) KUa||IDA

    (2) EKUa [Ks]

    1.A generate KUa, KRa and sends Kua and IDA2.B generate ks and encrypts it using EKUa3.A discards KUa and KRa4.B discards KUa

    5.Transaction using conventional methods

    Secret key distribution with confidentiality and authentication

    (1)EKUb [N1||Ida]

    (2 (2)EKUa [N1||N2]

    (3)EKUb[N2]

    (4)EKUb [EKRa[ks]]

    2.Diffie-Helman key exchange

    Solution to problem of key agreement or key exchange in 1976

    Two parties can agree on a symmetric key

    Key can be used for encryption or decryption

    Once parties agree on the key symmetric key encryption algorithm is usedfor confidential

    Algorithm

    Alice and Bob agree on two larges prime no.s n and g

    Alice chooses large random no x and calculateA=gx mod n

    Alice send the no A to Bob

    Bob independently chooses another large random integer y and calculate

    A B

    Initiator

    A

    Responder

    B

  • 8/2/2019 Network Design and Security Management

    30/52

    B=gy mod n

    Bob sends B to Alice

    Now A computes the secret key k1k1=Bx mod n

    B computes the secret key k2

    k2=Ax

    mod n k1=k2=k symmetric key

    1.Explain Message Authentication Code

    This technique assumes that two communicating parties A and B share a common keyK.When A sends a message to B it calculates the MAC as a function of the messageand the key:MAC=CK{M),Where,M=input message

    C=MAC functionK=shared secret keyMAC=message authentication codeThe message plus the MAC are transmitted to the recipient. The recipient performs thesame calculation on the received message to generate a new MAC.The received MACis compared to the calculated MAC.If only the sender and receiver know the secretkey,if the received MAC matches the calculated MAC , then1.The receiver is assured that the message has not been altered.2.The receiver is assured that the message is from the alleged sender.3.If the message includes a sequence number then the receiver is assured of the proper

    sequence.The MAC function need not be reversible.Usually, it is a many-to-one function.If there are N possible messages then an n bit MAC is used where N>>2n and thereare 2kpossible keys where the key has k bits.For example, if we are using 100 bit messages then there are 2100 different messagesand if a 10 bit MAC is used there are 210 different MACs. On an average each MACvalue is generated by a total of (2100/210)=290 different messages. If a 5bit key is usedthere are 25=32 different mappings from a set of messages to a set of MAC values.Usually two separate keys are used each of which is shared by the sender andreceiver.The message is calculated with the message as input and is then concatenatedto the message.The entire block is then encrypted.

  • 8/2/2019 Network Design and Security Management

    31/52

    The fig shows the basic uses of MAC.

    MAC is used when:1.There are a number of applications in which the same message is broadcast to manydestinations.2.When there exchanges where there is heavy load on one side and there is no time todecrypt.3.For authentication of a computer in plain text.4.When it is not needed to keep messages secret but it is important to provide

    authentication.5.Because separation of authentication and confidentiality provides architectural flexibility.6.When users wish to prolong the period of protection beyond the time of reception and yetallow processing of message contents.MAC does not provide digital signature because both sender and receiver share the samekey.

    REQUIREMENTS OF MAC:

    Assume that the opponent knows the MAC function C but does not know the key K.Thenthe MAC function should have the following properties:1.If an opponent observes M and CK(M), it should be computationally infeasible for theopponent to construct a message M' such that CK(M')=CK(M).2.CK(M) should be uniformly distributed in the sense that for randomly chosen messagesM and M', the probability that CK(M)=CK(M') IS 2

    -n, where n is the number of bits in theMAC.3.Let M' be equal to some known transformation on M.That is, M'=f(M).For example, f

    M|

    |

    C

    c

    MC

    COMPAREk

    k

    SOURCE

    M

    C

    c

    |

    |

    DM

    DESTINATI

    C

    K1

  • 8/2/2019 Network Design and Security Management

    32/52

    may involve inverting one or more specific bits.In that case,Pr[CK(M)=CK(M')]=2-n.

    2.Hash FunctionA variation on the message authentication code is the one-way hash

    function. As with the message authentication code, a hash function accepts a variable sizemessage M as input and produces a fixed-size output , referred to as hash code H(M).

    A variety of ways in which hash code can be used to provide messageauthentication, as follows:

    The message plus concatenated hash code is encrypted using symmetric encryption.Only the hash code is encrypted using symmetric encryption.Only the hash code is encrypted using the public-key encryption and using the

    senders private key.If confidentiality as well as a digital signature is desired ,then the message plus the

    public key encrypted hash code can be encrypted using a symmetric secret key.This technique uses a hash function but no encryption for message authentication.

    Confidentiality can be added to the approach of(e) by encrypting the entire messageplus the hash code.

    When confidentiality is not required , methods (b) and (c) have an advantageover those that encrypt the message in that less computation is required

    1.Write about the AH and ESP associated with IPSec

    AUTHENTICATION HEADER

    A ---- B: M || Ck(M) Provides authentication

    ---- Only A and B share K

    (a)Message authentication

    ----------------------------------------------------------------

    A ---- B: Ek2[M || Ck1(M) Provides authentication

    ----- Only A and B share K1

    Provides confidentialityOnly A and B share K2

    (b)Message authentication and confidentiality:

    authentication tied to plain text

    -----------------------------------------------------------------------------

    A ----- B:EX2[M] CK1(CK2[M2]) Provides authentication

    ------- Using K1

    Provides confidentiality

    -------Using K2(c)Message authentication and confidentiality

    authentication tied to cipher text.

  • 8/2/2019 Network Design and Security Management

    33/52

    The authentication header provides support for data integrity and

    authentication of IP packets. The data integrity feature ensures that undetected

    modification to a packets content in transit is not possible. The authentication feature

    enables an end system or network to authenticate the the user or application and

    filter traffic accordingly.Authentication is based on the use of a message authentication code(MAC)

    The authentication header consists of the following fields.

    Next header(8 bits):Identifies the type of header immediately following thisheader.

    Payload length(8 bits):Length of authentication header in 32-bit words,minus 2.

    Reserved(16 bits):For future use.

    Security parameters index(32 bits):Identifies a security association.

    Sequence number(32 bits):A monotonically increasing counter value.

    Authentication data(variable):A variable-length field that contains the IntegrityCheck Value.

    Anti-replay serviceA replay attack is one in which an attacker obtains a copy of an authenticated

    packet and later transmits it to the intended destination. The sequence number field is

    designed to thwart such attacks.

    Integrity check valueThe authentication data field holds a value referred to as the integrity check

    value. The ICV is a message authentication code or a truncated version of a code

    produced by a MAC algorithm.

    Transport and tunnel modesThese are the two ways in which the IPSec authentication service can be

    used.In one case authentication is provided directly between a server and client work

    stations;the work station can be either on the same network as the server or on an

    external network.As long as the work station and the server share a protected secret

  • 8/2/2019 Network Design and Security Management

    34/52

    key, the authentication process is secure.This case uses a transport mode SA. In the

    other case a remote work station authenticates itself to the corporate firewall, either

    for access to the entire internal network or because the requested server does not

    support the authentication feature. This case uses a tunnel mode SA.

    For transport mode AH using IPv4, the AH is inserted after the original IP

    header and before the IP payload.In the context of IPv6, the AH is viewed as an end-to-end payload;that is it is

    not examined or processed by intermediate routers. Therefore the AH appears after

    the IPv6 base header and the hop-by-hop,routing and fragment extension headers.

    For tunnel mode AH the original IP packet is authenticated, and the AH is

    inserted between the original IP header and a new outer IP header

    IPv4

    IPv6

    IPv4

    IPv6

    IPv4

    IPv6

    ENCAPSULATING SECURITY PAYLOAD

    Orig IP hdr TCP Data

    Orig IP hdr Extension

    hdrs if

    present

    TCP Data

    Orig IP hdr AH TCP Data

    Orig IP

    hdr

    hop-by-hop ,

    dest,routing,fragment

    AH dest TCP data

    New IP

    hdr

    AH Orig IP

    hdr

    TCP Data

    New

    IP

    hdr

    Ext

    hdrs

    AH Orig IP hdr Ext hdrs TCP data

  • 8/2/2019 Network Design and Security Management

    35/52

    The encapsulating security payload provides confidentiality services ,

    including confidentiality of message contents and limited traffic flow

    confidentiality.As an optional feature , ESP can also provide the same authentication

    services as AH.

    ESP FormatESP packet contains the following fields

    Security parameters index(32 bits):Identifies a security association.

    Sequence number(32 bits):A monotonically increasing counter value;this

    provides an anti-replay function,as discussed for AH.

    Payload data(variable):This is a transport level segment(transport mode)or IP

    packet(tunnel mode)that is protected by encryption.

    Padding(0-255 bytes):The padding field serves several purposes:

    o If an encryption algorithm requires the plain text to be a multiple of

    some number of bytes the padding field is used to expand the plain textto the required length.

    o The ESP format requires that the cipher text must be an integer

    multiple of 32 bits. The padding field is used to assure this alignment.

    o Additional padding may be added to provide partial traffic flow

    confidentiality by concealing the actual length of the payload.

    Pad length(8 bits):Indicates the nuber of pad bytes immediately preceding this

    field.

    Next header(8 bits):Identifies the type of data contained in the payload data

    field.

    Authentication data(variable):A variable length field that contains the

    Integrity Check Value computed over the ESP packet minus the

    authentication data field.

  • 8/2/2019 Network Design and Security Management

    36/52

    Transport and tunnel modesFigure shows the two ways in which IPsec ESP services can be used.Hosts on

    the internal networks use the internet for the transport of data but do not interact

    with the other internet based hosts. By terminating the tunnels at the security gateway

    to each internal network the configuration allows the hosts to avoid implementing the

    security capability . The former technique is supported by a transport mode SA, while

    the latter technique uses a tunnel mode SA.

    Transport mode ESPTransport mode ESP is used to encrypt and optionally authenticate the data

    carried by IP. For this mode using IPv4, the ESP header is inserted into the IP packetimmediately prior to the transport layer header and an ESP trailer is placed after the

    IP packet.

    In the context of IPv6, ESP is viewed as an end-to-end payload ; that is it is not

    examined or processed by intermediate routers. Therefore the ESP header appears

    after the IPv6 base header and the hop-by-hop, routing and fragment extension

    headers.The destination option extension could appear before or after the ESP

    header, depending on the semantics required.For IPv6 encryption covers the entire

  • 8/2/2019 Network Design and Security Management

    37/52

    transport level segment plus the ESP trailer plus the destination options extension

    header if it occurs after the ESP header.

    IPv4

    Orig

    IP hdr

    ESP

    hdr

    TCP data ESP trlr ESP auth

    IPv6

    orig

    IP

    hdr

    hop-by-hop ,

    dest,routing,fragment

    ESP

    hdr

    dest TCP data ESP

    trlr

    ESP

    auth

    Tunnel mode ESPTunnel mode ESP is used to encrypt the entire IP packet . For this mode the

    ESP header is prefixed to the packet and then the packet plus the ESP trailer is

    encrypted. This method can be used to counter the traffic analysis.

    IPv4New

    IP hdr

    ESP

    hdr

    Orig IP hdr TCP data ESP

    trlr

    ESP

    auth

    IPv6

    new

    IP hdr

    Ext

    hdrs

    ESP

    hdr

    Orig

    IP hdr

    Ext

    hdrs

    TCP data ESP

    trlr

    ESP

    auth

    2.Write about how security associations can be combined.

    An individual SA can implement either the AH or ESP protocol but not both.

    Sometimes a particular traffic flow will call for the services provided by both AH and

    ESP.Multiple SA must be employed for the same traffic flow to achieve the desired IP

    services. The term security association bundle refers to a sequence of SAs through

    which traffic must be processed to provide a desired set of IPsec services. The SAs in

    a bundle may terminate at different endpoints or at the same endpoints.

    Security associations may be combined into bundle in two types.

    o Transport adjacency: Refers to applying more than one security protocol to the

    same IP packet without invoking tunneling.

    o Iterated tunneling: Refers to the application of multiple layers of securityprotocols effected through IP tunneling.

    The two approaches can be combined for example by having a transport SA between

    hosts travel part of the way through a tunnel SA between security gateways

    Authentication plus confidentiality

  • 8/2/2019 Network Design and Security Management

    38/52

    Encryption and authentication can be combined inorder to transmit an IP

    packet that has both confidentiality and authentication between hosts.

    ESp with authentication optionIn this approach the user first applies ESP to the data to be protected

    and the appends the authentication data field. There are two sub cases.Transport mode ESP:Authentication and encryption apply to the IP payloaddelivered to the host but the IP header is not protected.

    Tunnel mode ESP:Authentication applies to the entire IP packet delivered tothe outer IP destination address and authentication is performed at that destination.

    For both the cases authentication applies to cipher text rather than the plain text.

    Transport adjacencyAnother way to apply authentication after the encryption is to use two

    bundle transport SAs with the inner being an ESP SA and the outer being an AH SA .

    In this case ESP is used without its authentication option. Because the inner SA is atransport SA, encryption is applied to the IP payload. The resulting packet consists of

    an IP header followe by an ESP. AH is then applied in the transport mode so that

    authenticayion covers the ESP plus the original IP header except for mutable fields.

    Transport-Tunnel bundleOne approach to applying authentication before encryption between

    two hosts is to use a bundle consisting of an inner AH transport SA an outer ESP

    tunnel SA. IN this case authentication is applied to the IP payload plus the IP header

    except for the mutable fields. The resulting IP packet is then processed in the tunnel

    mode by the ESP; the result is that the entire authenticated inner packet is encrypted

    and a new outer IP header is added.

    Basic combinations of security associations

    In case1 all security is provided between end systems that implement IPsec.

    For any two end systems to communicate via an SA they must share the appropriate

    secret keys. The following are among the possible combinations.

    AH in transport mode.

    ESp in transport mode.

    AH followed by ESP in transport mode.

    Any one of a,b, or c inside an AH or ESP in tunnel mode.

    For case2 security is provided only between gateways and no hosts implement IPsec.

    Case3 builds on case2 by adding end-to-end security. The gateway to-gateway tunnel

    provides either authentication or confidentiality or both for all traffic between end

    systems. When the gateway-to-gateway tunnel is ESP it also provides a limited form

    of traffic confidentiality.

  • 8/2/2019 Network Design and Security Management

    39/52

    Case4 provides support for a remote host that uses the internet to reach an

    organizations firewall and then to gain access to some server or workstation behind

    the firewall. Only tunnel mode is required between the remote host and the firewall .

  • 8/2/2019 Network Design and Security Management

    40/52

  • 8/2/2019 Network Design and Security Management

    41/52

    7

    1.Explain S/MIME?S/MIME

    Secure/Multipurpose Internet Mail Extension is a security enhancement to theMIME Internet e-mail format standard, based on technology from RSA Data Security. It isability to sign and/or encrypt messages.RFC 822

    RFC 822 defines a format for text messages that are sent using electronic mail.It has been the standard for Internet-based text message and remains in common use. Inthe RFC822 context, messages are viewed as having an envelope and contents. Theenvelope contains whatever information needed to accomplish transmission and delivery.The contents compose the object to be delivered to the recipient.

    MIMEMultipurpose Internet Mail Extensions (MIME) is an extension to the

    RFC 822 framework that is intended to address some of the problems and limitations of theuse of SMTP.Some of limitations: -

    1.It cannot transmit executable files or folders.2.SMTP servers may reject, mail message over a certain size.

  • 8/2/2019 Network Design and Security Management

    42/52

    3. Some SMTP implementations do not adhere completely to the SMTP standardsdefined in RFC 821. Common problems includeDeletion, addition, or reordering of carriage return and linefeedTruncating or wrapping lines longer than 76 charactersRemoval of trailing white space

    Padding of lines in a message to the same lengthConversion of tab characters into multiple space characters

    The MIME specification includes the following elements:

    1.Five message header fields are defined which may be included in and RFC 822 header.2.A numbers of content formats are defined, thus standardizing representations that supportmultimedia electronic mail.3.Transfer encodings are defined that enable the conversion of any content format into aform that is protected from alteration by the mail system.

    S/MIME Functionality

    It offers ability to sign and/or encrypt messages.Functions

    Enveloped Data: This consists of encrypted content of any type and encryptedcontent encryption keys for one or more recipients.

    Signed Data: A digital signature is formed by taking the message digest of thecontent to be signed and then encrypting that with the private key of signer. Thecontent plus signature are the encoded using base64 encoding.

    Clear-signed data: As with assigned data, a digital signature of the content is

    formed. In this case only the digital signature is encoded using base64.Signed and enveloped date: Signed-only and encrypted-only entities may be nested,so that encrypted data may be signed and signed data or clear-signed data may besigned and signed data or clear-signed data may be encrypted.

    Cryptographic algorithms

    Function Requirement

    Create a message digest to be used inForming a digital signature

    Encrypt session key for transmissionwith message

    MUST support SHA-1.Receiver SHOULD support md5 forbackward compatibility

    Sending and receiving agents MUSTsupport Diffie-Hellman.Sending agents Should support RSAencryption with key sizes 51 bits to 1024bits.

  • 8/2/2019 Network Design and Security Management

    43/52

    MUST: The definition is an absolute requirement of the specification. An implementationmust include this feature or function to be in conformance with the specification.SHOULD: There may exist valid reasons in particular circumstances to ignore this featureor function, but it is recommended that an implementation include this feature of function.

    S/MIME incorporates three public-key algorithms. The Digital SignatureStandard (DSS) is the preferred algorithm for digital signature. S/MIME use a variant ofDiffie-Hellman that does provide encryption/decryption.

    The S/MIME specification includes a discussion of the procedure for decidingwhich content encryption algorithm to use.

    A sending agent should follow the following rules, in the following order:

    1. The sending agent SHOULD choose the first capability on the list that it is capableof using.

    2. If the sending agent has no such list of capabilities from an intended recipient but

    has received one or more messages from the recipient, then the outgoing messageSHOULD use the same encryption algorithm as was used on the last signed andencrypted message received from that intended recipient.

    3. If the sending agent has no acknowledge about the decryption capabilities of theintended recipient and is willing to risk that the recipient may not be able to decryptthe message, then the sending agent SHOULD use tripleDES.

    4. 4. If the sending agent has no knowledge about the decryption capabilities of theintended recipient and is not willing to risk that the recipient may not be able todecrypt the message, then the sending agent MUST use RC2/40.

    Securing a MIME Entity

    S/MIME secures a MIME entity with a signature, encryption, or both. A MIME entitymay be an entire message, or if the MIME content type is multipart, then a MIME entity isone or more of the subparts of the message. Then the MIME entity plus some securityrelated date, such as algorithm identifies and certificated, are processed by S/MIME toproduce what is known as a PKCS object. A PKCS object is then treated as messagecontent and wrapped in MIME.S/MIME Certificate Processing

    S/MIME uses public-key certificates. The key-management scheme used by S/MIMEis in some ways a hybrid between a strict X.509 certification hierarchy and PGPs web oftrust. As with the PGP model, S/MIME managers and/or users must configure each clientwith a list of trusted keys and with certificate revocation lists. That is the responsibility islocal for maintaining the certificated needed to verify incoming signatures ad to encryptoutgoing messages. On the other hand, the certificates are signed by certificationauthorities.

    An S/MIME user has several key management functions to perform:

    1. 1.Key generation: Each key pair MUST be generated from a good source ofnondeterministic random input and be protected in a secure fashion.

  • 8/2/2019 Network Design and Security Management

    44/52

    2. 2.Registration: A users public key must be registered with a certification authorityin order to receive an X.509 public key certificate.

    3. 3.Certificate storage and retrieval: A user requires access to local list of certificatedin order to verify incoming signatures and to encrypt outgoing messages.

    2. PRETTY GOOD PRIVACY

    PGP provides a confidentiality and authentication service that can be used forelectronic mail and file storage applications. Phil Zimmermann has done the following:1. Selected the best available cryptographic as building blocks2. Integrated these algorithms into a general purpose application that is independent ofoperating system and processor and that is based on a small set of easy to use commands3. Made the package and its documentation including the source code, freely available viainternet ,bulletin boards ,and commercial networks such as AOL

    4. Entered into an agreement with a company to provide a fully compatible, low costcommercial version of PGP.

    PGP has grown explosively and now widely used. A number of reasons can be cited forthis growth,1. It is available free worldwide in versions that run on a variety of platforms,includingwindows ,UNIX,Macintosh,and many more.2. It is based on algorithms that have survived extensive public review and are consideredextremely secure.3. It has a wide range of applicability from corporations that wish to select and enforce astandardized scheme for encrypting files and messages to individuals who wish tocommunicate securely with others worldwide over the internet and other networks .4. It was not developed by ,nor is it controlled by, any governmental or standardorganization5. PGP is now on an internet standards track.

    Notation

    Ks =Session key used in symmetric encryption schemeKRa=Private key of user A used in public key encryption scheme.KUa= Public key of user A, used in public key encryption schemeEP = Public key encryptionDP = Public key decryptionEC = Symmetric encryptionDC = Symmetric decryptionH = Hash function|| = ConcatenationZ = compression using ZIP algorithm

  • 8/2/2019 Network Design and Security Management

    45/52

    R64 = Conversion to radix 64 ASCII format R64 = Conversion to radix 64 ASCII formatDP

    DP

    Operational Description

    PGP provides five services

    M

    H

    I

    E

    P

    |

    |Z

    H

    D

    P

    Z-1

    1111

    -

    M

    MZ

    E

    C

    D

    P

    Z-1

    E

    P

    |

    |D

    C

    KRA

    M

    H

    Z|

    |E

    C

    |

    ||

    E

    P

    Z-

    1

    D

    C

    DP

    M

    COMP

    COM

  • 8/2/2019 Network Design and Security Management

    46/52

    Authentication DSS/SHA or RSA/SHAConfidentiality CAST or IDEA or 3DES Diffe or RSACompression ZIPEmail Compatibility Radix 64 conversionSegmentation

    Authentication

    1. The sender creates a message2. SHA-1 is used to generate a 160 bit hash code of the message

    3. The hash code is encrypted with RSA using the senders private key,and the result isprepended to the message4. The receiver uses RSA with the senders public key to decrypt and recover the hash code5. The receiver generates a new hash code for the message and compares it with thedecrypted hash code

    Confidentiality

    1. The sender generates a message and random 128 bit number to be used as a sessionkey for this message only2. The message is encrypted ,using CAST -128 with the session key3. The session key is encrypted with RSA with its private key to decrypt and recover thesession key4. The session key is used to decrypt the message5.The receiver uses RSA with its private key to decrypt and recover the session key

    Compression

    1. The signature is generated before compression for 2 reasonsa. It is preferable to sign an uncompreesed message so that one can store only thecompressed message together with the signature for future verificationb. Even if one were willing to generate dynamically a recompressed message for

    verification

    2.The message encryption is applied after compression to strengthen cryptographic security

    Email Compatibility

    When PGP is used , atleast part of the block to be transmitted is encrypted.If only thesignature service is used then the message digest is encrypted.If the confidentiality serviceis used , the message plus signature are encrypted .Thus part or all of the resulting blockconsist of a stream of arbitrary 8 bit octets.

    Segmentation and reassembly

  • 8/2/2019 Network Design and Security Management

    47/52

    Email facilities often are restricted to a maximum message length.To accommodate thisrestriction PGP automatically subdivides the message that is too large into segments thatare small enough to send via email

    Cryptographic Keys and Key rings

    1. A means of generating unpredictable session keys is needed2. We would like to allow a user to have multiple public-key/private-key pairsThe user may wish to change his or her key pair from time to time.Also the recipient will

    know only the old private key until an update reaches them3. Each PGP entity must maintain a file of its own public/private key pairs as well as a fileof public keys of correspondence

    Key Rings

    Private Key RingsTimestamp: The date/time when this key pair was generatedKey ID: The least significant 64 bits of the public key for the entryPublic key: The public key portion of the pairPrivate key: The private key portion of the pairUser ID: is the users email address

    Public key RingsTimestamp:The date/time when the entry was generatedKey ID: The least significant 64 bits of the public key for this entryPublic key: the public keys for this entry

    UserID: Identifies the owner of this keyPGP MESSAGE GENERATION

    Public key ring

  • 8/2/2019 Network Design and Security Management

    48/52

    ||

    H

    D

    C

    M

    HE

    P

    |

    |

    E

    C

    E

    P

    |

    |

    Passphrase

    Encryp

    ted

    private

    key

    Key

    id Key

    id

    output

    Private key

    ring

  • 8/2/2019 Network Design and Security Management

    49/52

    1.Differences between version4 and version5

    Version4 had the following environmental shortcomings:1.Ecryption system dependence:It requires the use of DES

    2.Internet protocol dependen