Tuesday, December 24, 2013

B.Sc. IT BT0088 (Semester 5, Cryptography and Network Security) Assignment

Fall 2013 Assignment
Bachelor of Science in Information Technology (BSc IT) – Semester 5
BT0088 – Cryptography and Network Security – 4 Credits
(Book ID: B1183)
Assignment Set (60 Marks)


1.      What is the need for security? Explain types of security attacks.
Ans.-    Computer security is required because many organizations will be damaged by hostile software or intruders. There may be several forms of damage which are obviously interrelated. These include:
·         Damage or destruction of computer systems.
·         Damage or destruction of internal data.
·         Loss of sensitive information to hostile parties.
·         Use of sensitive information to steal elements of monitary value.
·         Use of sensitive information against the customers which may result in legal action by customers against the organization and loss of customers.
·         Damage to the reputation of an organization.
·         Monitory damage, due to loss of sensitive information, destruction of data, hostile use of sensitive data, or damage to the reputation of the organization.

Types of Threats (Attacks)
Now you would see the various types of threats which a computing environment would encounter.

·         Interception:
This type of threat occurs when an unauthorized party(outsider) has gained access. The outside party can be a person, a program, or a computing system. Examples of this type of failure are illicit copying of program or data files, or wiretapping to obtain data in a network. Although a loss may be discovered fairly quickly, a silent interceptor may leave no traces by which the interception can be readily detected.

·         Interruption:
This occurs when an asset of the system becomes lost, unavailable, or unusable. An example is the malicious destruction of a hardware device, erasure of a program or data file, or malfunction of an operating system file manager so that it cannot find a particular disk file.

Passive attacks:- Passive attacks are in the nature of eavesdropping on, or monitoring of transmissions. The goal of the opponent is to obtain information that is being transmitted. Two types of passive attacks are release of message contents and traffic analysis.
The release of message content is easily understood. A telephone conversation, an electronic mail message, and a transferred file may contain sensitive or confidential information. We would like to prevent the opponent from learning the contents of these transmissions.
A second type of passive attack is traffic analysis. Suppose a sender is masking the content by using encryption( will be discussed later) an attacker still be able to observe the pattern of these messages. The attacker (Opponent) could determine the location and identify the communicating hosts and could observe the frequency and length of messages being exchanged. This information might be useful in guessing the nature of the communication that has taken place.
Passive attacks are very difficult to detect because they do not involve any alteration of the data.

Active Attacks:- Active attacks involve some modification of the data stream or the creation of a false stream and can be subdivided into four categories: masquerade, replay, modification of messages and denial of service.
A Masquerade takes place 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 to produce an unauthorized effect.

2.      List substitution techniques. Explain Ceaser’s cipher.
Ans.-    Substitutions are the simple form of encryption in which one letter is exchanged for another. A substitution is an acceptable way of encrypting text. There are four types of Substitutions techniques--

1.      The Caesar Cipher
2.      One-Time Pads
3.      The Vernam Cipher
4.      Book Cipher
The Caesar Cipher:- The Caesar cipher has an important place in history. Julius Caesar is said to have been the first to use this scheme, in which each letter is translated to a letter a fixed number of places after it in the alphabet. Caesar used a shift of 3, so that plaintext letter pi was enciphered as ciphertext letter ci by the rule
A full translation chart of the Caesar cipher is shown here.



Using this encryption, the message
SIKKIM MANIPAL UNIVERSITY
would be encoded as
S I K K I M M A N I P A L U N I V E R S I T Y
v l n n l p p d q l s d o x q l y h u v l w b

Cryptanalysis of the Caesar Cipher
Let us take a closer look at the result of applying Caesar's encryption technique to "SIKKIM MANIPAL UNIVERSITY" If we did not know the plaintext and were trying to guess it, we would have many clues from the ciphertext. For example, the break between the two words is preserved in the ciphertext, and double letters are preserved: The SS is translated to vv. We might also notice that when a letter is repeated, it maps again to the same ciphertext as it did previously. So the letter K always translate to n. These clues make this cipher easy to break.
Suppose you are given the following ciphertext message, and you want to try to determine the original plaintext.

wklv phvvdjh lv qrw wrr kdug wr euhdn

The message has actually been enciphered with a 27-symbol alphabet: A through Z plus the "blank" character or separator between words. As a start, assume that the coder was lazy and has allowed the blank to be translated to itself. If your assumption is true, it is an exceptional piece of information; knowing where the spaces are allows us to see which are the small words. English has relatively few small words, such as am, is, to, be, he, we, and, are, you, she, and so on. Therefore, one way to attack this problem and break the encryption is to substitute known short words at appropriate places in the ciphertext until you have something that seems to be meaningful. Once the small words fall into place, you can try substituting for matching characters at other places in the ciphertext.
Look again at the ciphertext you are decrypting. There is a strong clue in the repeated r of the word wrr. You might use this text to guess at three-letter words that you know. For instance, two very common three-letter words having the pattern xyy are see and too; other less common possibilities are add, odd, and off. (Of course, there are also obscure possibilities like woo or gee, but it makes more sense to try the common cases first.) Moreover, the combination wr appears in the ciphertext, too, so you can determine whether the first two letters of the three-letter word also form a two-letter word.

3.      Explain in brief types of encryption systems.
Ans.-    The two basic kinds of encryption systems are key based and block based. Key based encryption is based on either single key or multiple keys. Block based encryption is based on either stream or block of characters.

Based on Key :- We have two types of encryptions based on keys they are symmetric (also called "secret key") and asymmetric (also called "public key"). Symmetric algorithms use one key, which works for both encryption and decryption. Usually, the decryption algorithm is closely related to the encryption one.
The symmetric system means both encryption and the decryption are performed using the same key. They provide a two-way channel to their users: A and B share a secret key, and they can both encrypt information to send to the other as well as decrypt information from the other. As long as the key remains secret, the system also provides authentication, proof that a message received was not fabricated by someone other than the declared sender. Authenticity is ensured because only the legitimate sender can produce a message that will decrypt properly with the shared key.
Public key systems, on the other hand, excel at key management. By the nature of the public key approach, you can send a public key in an e-mail message or post it in a public directory. Only the corresponding private key, which presumably is kept private, can decrypt what has been encrypted with the public key.
But for both kinds of encryption, a key must be kept well secured. Once the symmetric or private key is known by an outsider, all messages written previously or in the future can be decrypted (and hence read or modified) by the outsider. So, for all encryption algorithms, key management is a major issue. It involves storing, safeguarding, and activating keys.

Based on Block:- Block based encryption system is classified as stream and block encryption system. Stream encryption algorithm convert one symbol of plaintext immediately into a symbol of ciphertext. The transformation depends only on the symbol, the key, and the control information of the encipherment algorithm. A model of stream enciphering is shown in below figure.



Some kinds of errors, such as skipping a character in the key during encryption, affect the encryption of all future characters. However, such errors can sometimes be recognized during decryption because the plaintext will be properly recovered up to a point, and then all following characters will be wrong. If that is the case, the receiver may be able to recover from the error by dropping a character of the key on the receiving end. Once the receiver has successfully recalibrated the key with the ciphertext, there will be no further effects from this error.
To address this problem and make it harder for a cryptanalyst to break the code, we can use block encryption algorithm. A block encryption encrypts a group of plaintext symbols as one block. The columnar transposition and other transpositions are examples of block ciphers. In the columnar transposition, the entire message is translated as one block. The block size need not have any particular relationship to the size of a character. Block ciphers work on blocks of plaintext and produce blocks of ciphertext, as shown in below figure. In this figure, the central box represents an encryption machine: The previous plaintext pair is converted to po, the current one being converted is IH, and the machine is soon to convert ES.




4.      Explain authentication header with necessary diagrams.
Ans.-    Authentication Header (AH) is one of the two core security protocols in IPSec protocol suite. AH provides data integrity, data source authentication, and protection against replay attacks. It does not provide confidentiality. This makes AH header much simpler than ESP. It is merely a header and not a header plus trailer. The below figure shows the AH protected IP packet.


It provides authentication of either all or part of the contents of a datagram through the addition of a header that is calculated based on the values in the datagram. What parts of the datagram are used for the calculation, and the placement of the header, depends on the mode (tunnel or transport) and the version of IP. The below figure shows the AH protocol structure.


The fields comprising the AH header are:
·         Next Header: The next header field identifies the protocol type of the next packet header after the AH packet header.
·         Payload Length: The length field states the length of the AH header information.
·         Reserved field: It is for future extensions of the AH protocol.
·         SPI field: shows to which SA the packet belongs.
·         Sequence number: It is an incrementing value that prevents against replay attacks.
·         The authentication data: contains the information for authenticating the packet.

The operation of the AH protocol is simple especially for any protocol that has anything to do with network security. It can be considered analogous to the algorithms used to calculate checksums or perform CRC checks for error detection. In those cases, a standard algorithm is used by the sender to compute a checksum or CRC code based on the contents of a message. This computed result is transmitted along with the original data to the destination, which repeats the calculation and discards the message if any discrepancy is found between its calculation and the one done by the source.
This is the same idea behind AH, except that instead of using a simple algorithm known to everyone, it uses a special hashing algorithm and a specific key known only to the source and the destination. SA between two devices is set up that specifies these particulars so that the source and destination know how to perform the computation, but nobody else can. On the source device, AH performs the computation and puts the result (called the Integrity Check Value or ICV) into a special header with other fields for transmission. The destination device does the same calculation using the key the two devices share, which enables it to see immediately if any of the fields in the original datagram were modified either due to error or malice.
It's important to point here that just as a checksum doesn't change the original data, neither does the ICV calculation change it. The presence of the AH header allows us to verify the integrity of the message, but doesn't encrypt it. Thus, AH provides authentication but not privacy.

5.      Explain the processing of Encrypted E-Mail.
Ans.-    The sender chooses a (random) symmetric algorithm encryption key. Then, the sender encrypts a copy of the entire message to be transmitted, including FROM:, TO:, SUBJECT:, and DATE: headers. Next, the sender prepends plaintext headers. For key management, the sender encrypts the message key under the recipient's public key, and attaches that to the message as well. The process of creating an encrypted e-mail message is shown in Figure A.


Encryption can potentially yield any string as output. Many e-mail handlers expect that message traffic will not contain characters other than the normal printable characters. Network e-mail handlers use unprintable characters as control signals in the traffic stream. To avoid problems in transmission, encrypted e-mail converts the entire ciphertext message to printable characters. An example of an encrypted e-mail message is shown in above Figure A. Notice the three portions: an external (plaintext) header, a section by which the message encryption key can be transferred, and the encrypted message itself. (The encryption is shown with shading.)


The encrypted e-mail standard works most easily as just described, using both symmetric and asymmetric encryption. The standard is also defined for symmetric encryption only: To use symmetric encryption, the sender and receiver must have previously established a shared secret encryption key. The processing type ("Proc-Type") field tells what privacy enhancement services have been applied. In the data exchange key field ("DEK-Info"), the kind of key exchange (symmetric or asymmetric) is shown. The key exchange ("Key-Info") field contains the message encryption key, encrypted under this shared encryption key. The field also identifies the originator (sender) so that the receiver can determine which shared symmetric key was used. If the key exchange technique were to use asymmetric encryption, the key exchange field would contain the message encryption field, encrypted under the recipient's public key. Also included could be the sender's certificate (used for determining authenticity and for generating replies).
To ensure the authenticity of the sender, the encrypted e-mail messages always carry a digital signature along with the message. The integrity is also assured because of a hash function (called a message integrity check, or MIC) in the digital signature. Optionally, encrypted e-mail messages can be encrypted for confidentiality.
Notice in above Figure A. that the header inside the message (in the encrypted portion) differs from that outside. A sender's identity or the actual subject of a message can be concealed within the encrypted portion.
The encrypted e-mail processing can integrate with ordinary e-mail packages, so a person can send both enhanced and nonenhanced messages, as shown in below Figure B. If the sender decides to add enhancements, an extra bit of encrypted e-mail processing is invoked on the sender's end; the receiver must also remove the enhancements. But without enhancements, messages flow through the mail handlers as usual.



6.      Explain characteristics of good security policy.
Ans.-    Characteristics of a good security policy
If a security policy is written poorly, it cannot guide the developers and users in providing appropriate security mechanisms to protect important assets. Certain characteristics make a security policy a good one.

1. Coverage: A security policy must be comprehensive: It must either apply to or explicitly exclude all possible situations. Furthermore, a security policy may not be updated as each new situation arises, so it must be general enough to apply naturally to new cases that occur as the system is used in unusual or unexpected ways.

2.Durability: A security policy must grow and adapt well. In large measure, it will survive the system's growth and expansion without change. If written in a flexible way, the existing policy will be applicable to new situations. However, there are times when the policy must change (such as when government regulations mandate new security constraints), so the policy must be changeable when it needs to be.
An important key to durability is keeping the policy free from ties to specific data or protection mechanisms that almost certainly will change. For example, an initial version of a security policy might require a ten-character password for anyone needing access to data on the Sun workstation in room 110. But when that workstation is replaced or moved, the policy's guidance becomes useless. It is preferable to describe assets needing protection in terms of their function and characteristics, rather than in terms of specific implementation. For example, the policy on Sun workstations could be re-worded to mandate strong authentication for access to sensitive student grades or customers' proprietary data. Better still, we can separate the elements of the policy, having one policy statement for student grades and another for customers' proprietary data. Similarly, we may want to define one policy that applies to preserving the confidentiality of relationships, and another protecting the use of system through strong authentication.

3.Realism: The policy must be realistic. That is, it must be possible to implement the stated security requirements with existing technology. Moreover, the implementation must be beneficial in terms of time, cost, and convenience; the policy should not recommend a control that works but prevents the system or its users from performing their activities and functions. It is important to make economically worthwhile investments in security, just as for any other careful business investment.


4.Usefulness: An obscure or incomplete security policy can not be implemented properly, if at all. The policy must be written in a language that can be read, understood and followed by anyone who must implement it or is affected by it. For this reason, the policy should be succinct, clear, and direct.

For More Assignments Click Here

No comments:

Post a Comment