Tuesday, June 4, 2019

Cryptographic Techniques For Network Security Cryptography Computer Science Essay

Cryptographic Techniques For Network Security Cryptography Computer Science EssayThe rapid g rowth of electronic communication means that issues in information security are of increasing practical importance. Message exchanged over worldwide ordinaryly accessible computer networks must be kept confidential and protected against manipulation. Cryptography provides solutions to all these problems. Cryptography, a word with Greek origins means secret writing. We utilise the term to adjoin to the recognition and art of transforming messages to make them secure and immune to beleaguers. Cryptography is the practice and study of hiding information. In modern times, cryptography is considered to be a weapon of both mathematics and computer science, and is affiliated closely with information theory, computer security, and engineering. Cryptography is wont in applications present in technologically advanced societies parts entangle the security of ATM cards, computer passwords, el ectronic commerce, which all cypher on cryptography.SECURITY GOALSAvailabilityIntegrityConfidentialitySecurity goalsCONFIDENTIALITYConfidentiality is probably the most common manifestation of information security. We need to protect our confidential information. An musical arrangement need to guard those malicious actions that endanger the confidentiality of its information. In the military, concealment of sensitive information is the major concern. In industry, hiding just about information from competitors is crucial to the operation of the organization. In banking, customers account need to be kept secret. Confidentiality non sole(prenominal) applies to the storage of the information, it also applies to the transmittal of information. When we send a segment of information to be stored in a remote computer or when we retrieve a piece of information from a computer, we need to conceal it during transmission.INTEGRITYInformation needs to be changed constantly. In a blank, w hen a customer deposits or with draws money, the balance of her account needs to be changed. Integrity means that changes need to be done yet by authorized entities and through authorised mechanisms. Integrity violation is not necessary the go forth of a malicious act an interruption in the system, such as a power surge, may also create unwanted changes in some information.AVAILABILITYThe third component of information security is availability. The information created and stored by an organization needs to be available to authorized entities. Information is useless if it is not available. Information needs to be constantly changed. Which means it must be accessible to authorised entities. The unavailability of information is just as harmful for an organization as the lack of confidentiality or integrity. Imagine what would happen to a bank if the customers could not access their accounts for transactions.SECURITY SERVICESIt is easy to relate one or more of these services to one or more of the security goals. It is easy to see that these services stimulate been designed to prevent the security attacks that we amaze mentioned. info confidentialityIt is designed to protect data from disclosure attack. The service as defined by X.800 is very broad and encompasses confidentiality of the whole message or part of a message and also protection against traffic summary. That is, it is designed to prevent snooping and traffic analysis attack.Data integrityIt is designed to protect data from the modification, insertion, deletion, and replaying by an adversary. It may protect the whole message or part of the message.Au thusticationThis service provides the authentication of the party at the other end of the line. In connection orientated communication, it provides authentication of the transmitter or receiver during the connection establishment. In connectionless communication, it authenticates the source of the data.Non repudiationNon repudiation services protect s against repudiation by either the sender or the receiver of the data. In non repudiation with proof of the origin, the receiver of the data stub later prove the identity of the sender if denied. In non repudiation with proof of delivery, the sender of data can later prove that data were delivered to the intended to the intended recipient.Access controlIt provides protection against unauthorised access to data. The term access in this definition is very broad and can involve reading, writing, modifying, executing programs, and so on.CRYPTOGRAPHIC TECHNIQUESSYMMETRIC KEY ENCRYPTIONIt is also called as secret chance upon cryptography is a cryptographic technique where the two parties share a secret name. Data are work outed and rewriteed victimisation the uniform key. The sender encrypts data development the key. Once transmitted, the receiver should use the same key to interpret the message.CUsersmadhuDesktopsyymm.PNGFigure 1. Symmetric encryption algorithmic programSymmetri c encryption is computationally fast, center that it can occur in real time on content that is unknow previously. All securely transmitted live traffic today is encrypted using symmetric encryption algorithms for example such as live telephone conversation, streaming video transmission, high speed data link. unsymmetrical Key encryptionIn asymmetric key encryption, different keys are used for encrypting and decrypting a message. The asymmetric key algorithms that are most useful are those in which uncomplete key can be made public while the other is kept secure. in that location are some distinct advantages to this public-key-private-key arrangement, practically referred to as public key cryptography the necessity of distributing secret keys to a large numbers of users is eliminated. And the algorithm can be used for authentications as well as for cryptography. Asymmetric see algorithms are based on heavy mathematical operations, thus they are not efficient at processing large blocks of data. They are often used to safely exchange small session keys.CUsersmadhuDesktopasymm.PNGFigure 2 Asymmetric Encryption AlgorithmCryptanalysisAs cryptography is the science and art of creating secret codes, cryptanalysis is the science and art of breaking those codes. In addition to studying cryptography techniques, we also need to study cryptanalysis techniques. This is needed, not to break other peoples codes, but to learn how vulnerable our cryptosystem is. The study of cryptanalysis helps us create better secret codes. There are four common types of cryptanalysis attacksCryptanalysis attackChosen nil school textChosen plaintext cognize plaintext imaginetext onlyFigure 4 cryptanalysis attacksCiphertext Only AttackIn goose eggtext only attack, eve has access to only some opine text. She tries to feel out the corresponding key and the plain text. The assumption is that eventide knows the algorithm and can intercept the cipher text. The cipher text only attack is the most probable one because Eve needs only the cipher text for this attack. To thwart the decryption of a message by an adversary, a cipher must be very resisting to this type of attack. Various methods can be used in ciphertext only attack. wight make attackIn the brute force method or utter(a) key search method, Eve tries to use all possible keys. We make bold that Eve knows the algorithm and knows the key domain. Using the intercepted cipher, Eve decrypts the cipher text with every possible key until the plain text makes sense. Using brute force attack was a difficult task in the past it is easier today using a computer. To prevent this type of attack, the number of possible keys must be very large.Statistical attackThe cryptanalyst can benefit from some inherent characteristics of the plain text language to launch a statistical attack. For example we know that the garner E is the most frequently used garner in English text. The cryptanalyst finds the mostly used characte r in the cipher text and assumes that the corresponding plain text character is E. After finding a few pairs, the analyst can find the key and use it to decrypt the message. To prevent this type of attack, the cipher should hide the characteristics of the language.Pattern attackSome ciphers may hide the characteristics of the language, but may create some patterns in the ciphertext. A cryptanalyst may use a pattern attack to break the cipher. Therefore, it is important to use the ciphers that make the ciphertext look as random as possible.Known Plaintext AttackIn a known plaintext attack, Eve has access to some plain or ciphertext pairs in addition to the intercepted ciphertext that Eve wants to break. The plain or ciphertext pairs bring on been collected earlier. Alice has sent a secret message to bob, but Alice later made the contents of the message public. Eve has kept both the cipher and the plaintext to use them to break the next secret message from Alice to Bob, assuming that Alice has not changed her key. Eve uses the relationship between the previous pair to analyze the current ciphertext. The same methods used in the ciphertext-only attack can be applied here. This attack is easier to implement because Eve has more information to us for analysis. However, it is less belike to happen because Alice may have changed her key or may have not disclosed the contents of any previous messages.Chosen Plaintext AttackThe chosen plaintext attack is analogous to the known plaintext attack, but the plaintext or ciphertext pairs have been chosen by the attacker. This can happen, for example, if Eve has access to Alice computer. She can choose some plaintext and intercept the created ciphertext. Of course, she does not have the key because the key is normally embedded in the software used by the sender. This type of attack is much easier to implement, but it is much less likely to happen.Chosen Ciphertext AttackThe chosen ciphertext attack is similar to the chosen plaintext attack, except that the Eve chooses some ciphertext and decrypts it to form a ciphertext or plaintext pair. This can happen if Eve has access to Bobs computer.TRADITIONAL CIPHERSWe can divide traditional symmetric key ciphers into two broad categories substitution ciphers and transstance ciphers. In a substitution cipher, we step in one symbol in the cipher text with another symbol in a transposition cipher, we reorder the position of symbols in the plaintext.Substitution ciphersA substitution cipher replaces one symbol with another. If the symbols in the plaintext are rudimentic characters, we replace one character with another. For example, we can replace letter A with letter D, and letter T with letter Z. If the symbols are digits (0 to 9), we can replace 3 with 7, and 2 with 6. Substitution ciphers can be categorized as either monoalphabetic ciphers or polyalphabetic ciphers.Monoalphabetic ciphersWe first discuss a group of substitution ciphers called the monoalphab etic ciphers. In monoalphabetic substitution, a character in the plaintext is always changed to the same character in the ciphertext regardless of its position in the text. For example, if the algorithm says that letter A in the plaintext is changed to letter D. In other words, the relationship between letter in the plaintext and the ciphertext is one to one. modelling we use lowercase character to show the plaintext we use the uppercase characters to show the ciphertext. The cipher is probably the monoalphabetic because both 1s are encrypted as 0s.Plaintext hello ciphertext khoorCaesar cipherCaesar cipher is a special case of substitution techniques wherein apiece alphabet in a message is replaced by an alphabet three places down the line. Caesar cipher is susceptible to a statistical ciphertext only attack. Julius Caesar used this additive cipher to communicate with his officers. For this reason additive ciphers are referred as Caesar cipher. Caesar cipher used a key of 3 for his communications.PabcdefghijklmnopqrstuCABCDEFGHIJKLMNOPQRSTUV01234567891011121314151617181920vwxyzVWXYZ2122232425For example let the message hello is encrypted with the key of 15. consequently all the characters in the ciphertext will be shifted from 15. hence the answer ishello= WTAADMathematicallyC (ciphertext) = (P+K) mod 26 (K= key)P (plaintext) = (C-K) mod 26To encrypt message helloPlaintext h= 7 encryption (7+15)mod 26 C= 22= WPlaintext e= 4 encryption (4+15)mod 26 C= 19= TTo decrypt WTAADCiphertext W=22 decryption (22-15)mod 26 P= 7=hCiphertext T=19 decryption (19-15)mod 26 p= 4=eCryptanalysisCaesar ciphers are vulnerable to ciphertext only attacks using exhaustive key searches (brute force attack). The key domain of the Caesar cipher is very small there are only 26 keys. However, one of the keys, zero, is useless (the ciphertext is same as the plaintext). This leaves only 25 possible keys. Eve can easily launch a brute force attack on the ciphertext.Caesar cipher using cry ptool running(a) the same example using cryptool, first of all, to acquaint ourselves with the Caesar encryption algorithm we will open a document, encrypt it and then decrypt it again. We will then try to get the computer to work out the key with which a plaintext is encrypted.This plaintext document is encrypted using the Caesar encryption algorithm by selecting the menu crypt/decrypt.CUsersmadhuDesktopcaseaer 5.PNGThen the following dialog box appears. The key we enter is the number 15. Additionally, we change the options how to interpret the alphabet characters. The first alphabet character is slew to 1 (if we set the character to 0 and use A as key, then the resulting ciphertext is the same as the plaintext).CUsersmadhuDesktopcaesar 3.PNGClicking on the Encrypt liberation opens a new window that contains the encrypted text. It becomes apparent that the letters have been shifted by 15 positions. So the word hello, is now wtaadCUsersmadhuDesktopcaeser 6.PNGThe plaintext versio n of this encrypted document can now be obtained by selecting crypt/decrypt again. In this dialog box which appears we now enter the key with which the document was encrypted (15). This time it has to be decrypted so decrypt button must be selected. Now the next step is to find the key using cryptanalysis. The plaintext window is made active by clicking on it. Now the entropy is selected via the menu pickaxe summary/General/Entropy)CUsersmadhuDesktopentropy.PNGNow the frequency statistical distribution of the letters is mensurable.The histogram of the encrypted document letter frequencies have been shifted by 15 positions. That means the encryption algorithm is not secure. Moreover Z shifts the text by 26 positions so that the encrypted text is actually identical with the unencrypted text. Hence there are really only 25 keys.The Caesar encryption algorithm can be broken easily by a ciphertext only attack. To perform such an attack, restore the window containing the encrypted text to the window and select Analysis/ciphertext only/ Caesar. The text will automatically be analyzed.By analyzing the superposition it is possible to discover the key which was used to encrypt this document. In this case it was the letter P.When the decrypt button is clicked the plaintext appears, i.e. the text that has been decrypted with the key p that was discovered. So the cryptool successfully assemble the key with which the document has been encrypted.CUsersmadhuDesktopcaesar 8.PNGAnalysis of Caesar CipherAdvantagesVery easy to useThe encryption and decryption can be done very quicklyDisadvantagesThe encryption and decryption algorithms are knownThere are only 25 keys to tryThe language of the plaintext is known and easily recognizable.ApplicationsIt was used biblical times can be found on the back of Mezuzah where it encrypts the name of the god.During the First World War the Russian army used this method to relay messages to troops.It is used as an application in the Android version 1.4.0Polyalphabetic CipherIn polyalphabetic substitution, each occurrence of a character may have a different substitute. The relationship between characters in the plaintext to a character in the ciphertext is one-to-many. For example, a could be write in codeed as D in the beginning of the text, but as N at the middle. Polyalphabetic ciphers have the advantage of hiding the letter frequency of the underlying language. Eve cannot use single letter frequency statistic to break the ciphertext.To create a polyalphabetic cipher, we need to make each ciphertext character dependent on both the corresponding plaintext character and the position of the plaintext character in the message. This implies that our key should be stream of subkeys, in which each subkey depends in some way on the position of the plaintext character that uses that subkey for encipherment. In other words, we need to have a key stream k= (k1,k2,k3.) in which ki is used to encipher the ith character in the p laintext to create the ith character in the ciphertext.Playfair CipherPlayfair cipher is the example of polyalphabetic cipher. The secret key in this cipher is made of 25 alphabet letters arranged in a 55 matrix (letters I and J are considered the same when encrypting). Different arrangements of the letters in the matrix can create many different secret keys. One of the possible arrangements is shown belowLGDBAQMHECURNI/JFXVSOKZYWTPBefore encryption, if the two letters in a pair are the same, a simulated letter is inserted to separate them. After inserting bogus letters, if the number of characters in the plaintext is odd, one extra bogus character is added at the end to make the number of characters even.The cipher uses three rules for encryptionIf the two letters in a pair are located in the same row of the secret key, the corresponding encrypted character for each letter is the next letter to the right in the same row (with wrapping to the beginning of the row if the plaintext l etter is the last character in the row).If the two letters in a pair are located in the same row of the secret key, the corresponding encrypted character for each letter is the letter beneath it in the same column (with wrapping to the beginning of the column if the plaintext letter is the last character in the column).If the two letters in a pair are not in the same row or column of the secret, the corresponding encrypted for each letter is a letter that is in its own row but in the same column as the other letter.The playfair cipher meets the criteria for a polyalphabetic cipher. The key is a stream of subkeys in which the subkeys are created two at a time. In playfair cipher, the key stream and the cipher stream are the same. This means that the above mentioned rules can be thought of as the rules for creating the key stream. The encryption algorithm takes a pair of characters from plaintext and creates a pair of subkeys by following the above mentioned rules. We can say that the key stream depends on the position of the character in the plaintext. attitude dependency has a different interpretation here the subkey for each plaintext character depends on the next previously neighbour.If P= P1, P2, P3C= C1, C2, C3.K= (k1, k2), (k3, k4) Encryption Ci = kiDecryption Pi = ki event keyword is PLAYFAIRPLAYFIREXMBCDGHJKNOSTUVWZENCRYPT hide the gold undergroundplaintextHIDETHEGOLDUNDERGROUNDciphertextBMNDZBXDKYCVVNXECXKWVNDECRYPT DMYRYKEVGHWGNGPXMciphertextDMYRYKEVGHWGNGGPXMplaintextHELXLOANDGOXODBYEXMessage how-do-you-do and Goodbye.Cryptanalysis of a Playfair CipherBrute force attack on a playfair cipher is very difficult. The size of the key domain is 25 (Factorial 25). In addition, the encipherment hides the single letter frequency of the characters. However, the frequencies of diagrams are preserved. So a cryptanalyst can use a ciphertext-only attack based on the diagram frequency test to find a key.Analysis of playfairAdvantagesThe main advantage of the syst em is it robs a cryptanalyst as they are no longer looking for hap encoding as in an letter e can be encrypted as different letter each time.Playfair was long time considerably unbreakable.There are 26 letters so it is 26*26=676 diagrams which are quiet difficult to break.DisadvantagesStill leaves much of the language structureFrequency distribution of lettersFew 100s of ciphertext letters are enough for cryptanalysis.ApplicationsPlayfair cipher was used by British army during World War 1.When John F. Kennedys PT-109 was sunk by a Japanese controlled plum pudding island and was able to send an emergency message in playfair from an allied coast watchers hut to arrange the rescue of the survivors from his crew.Playfair crossword puzzle by Beetlejuice is an example puzzle using playfair as a gimmick.Vigenere CipherVigenere cipher made an immediate success as a field cipher. This type of polyalphabetic cipher was designed by Blaise de Vigenere, a sixteenth century French mathematician . A vigenere cipher uses a different strategy to create the key stream. The key stream is a repetition of an initial secret key stream of length m, where we have 1P= p1p2p3..C= c1c2c3K= (k1,k2,k3km),(k1,k2,k3km),Encryption Ci= Pi+Ki Decryption Pi= Ci-KiOne important difference between the vigenere cipher and the other polyalphabetic ciphers is that the vigenere cipher key stream does not depend on the plaintext characters it depends only on the position of the character in the plaintext. In other words the key stream can be created without knowing what the plaintext is.Example mathematicallyShe is listening this message should be encrypted using the keyword PASCAL.plaintextsheislisteningP values187481811818194138136key150182011150182011150C values77221018222318116131926CiphertextHHWKSWXSLGNTCGAnother way to look at viginere ciphers is through what is called a Vigenere Tableau. The first row shows the plaintext character to be encrypted. The first column contains the characters to be used by the key. The rest of the tableau shows the ciphertext characters. To find the ciphertext for the plaintext she is listening using the word pascal as the key, we can find s in the first row, p in the first column, the cross section is the ciphertext character H. We can find h in the first row and A in the second column, the cross section is the ciphertext character H. The same method should be followed until all the ciphertext characters are found.CUsersmadhuDesktoptable.PNGVigenere TableauCryptanalysis of Vigenere CipherVigenere ciphers do not preserve the frequency of characters. The cryptanalysis here consists of two parts for finding out the length of the key and finding the key itself.several(prenominal) methods has been devised to find the length of the key but one method called kaisiski test, the cryptanalysis searches for repeated text segments, of atleast three characters, in the ciphertext. Suppose that two of the segments are found and the distance between them is d. The cryptanalyst assumes that d/m where m is the key length. If more repeated segments with distances d1,d2,d3.dn then gcd (d1,d2,d3,..dn)/m. This assumption is logical because if two characters are the same are k*m (k= 1,2,) characters part in the ciphertext. Cryptanalyst uses segment of at least three characters to avoid the cases where the character in the key are not distinct.After the length of the key is found, the cryptanalyst uses the idea of dividing the ciphertext into m different pieces and applies the method used to crypt analyze the additive cipher, including the frequency attack. Each ciphertext piece can be decrypted and put together to create the whole plaintext.Vigenere Cipher Using CryptoolTo perform vigenere cipher encryption a new document is unfastened and then the encryption and decryption is performed.CUsersmadhuDesktopvin1.PNGThis plaintext document is encrypted using the vigenere encryption algorithm by selecting the keys crypt/decrypt/vigenere followin g which another dialog box appears.CUsersmadhuDesktopvin3.PNGBy clicking on the Encrypt button opens a new window that contains the encrypted text.CUsersmadhuDesktopvin2.PNGThe plaintext of this document can now be obtained by selecting crypt/decrypt/vigenere. In the dialog box which appears then where the key with which the document was encrypted. This time the document is to be decrypted. Therefore the decrypt button must be selected.CUsersmadhuDesktopvin3.PNGBy clicking on the decrypt button the plaintext document appears immediately.CUsersmadhuDesktopvin4.PNGTo find the key with which the document was encrypted. Restore the encrypted document window and then select analysis/ciphertext only/vigenere, following with which the text will automatically be analyzed.CUsersmadhuDesktopvin5.PNGIt is possible to work out the key length from the regular peaks in the autocorrelation. It is correctly calculated at 6 characters.CUsersmadhuDesktopvin6.PNGWhen the continue button is clicked, an other dialog box opens to display the key that has been computed.CUsersmadhuDesktopvin7.PNGBy clicking on the decrypt button the dialog box disappears and another window opens which contains the plaintext.CUsersmadhuDesktopvin8.PNGHill CipherHill cipher is invented by Lester S. Hill. This polyalphabetic cipher divides the plaintext into equal size blocks. The encrypted one at a time in such a way that each character in the block contributes to the encryption of other characters in the block. Hill cipher belongs to the category of ciphers called block ciphers.C1= (+ + ) mod 26C2= (+ + ) mod 26C3= (+ + ) mod 26The encryption algorithm takes m successive plaintext letters and substitute for them m ciphertext letter. The substitution is determined by m linear equations in which each character is assigned a numerical value (a=0, b=1,c=2, ..z=25). This can be expressed in terms of column vectors and matrices= mod 26C = KP mod 26 where C and P are column vectors representing the plaintext and ciphertext. K is the encrypting key.Example for Hill CipherPlaintext pay more moneyKey (K) =C = KP mod 26= mod 26== LNSFor plaintext pay, ciphertext is LNS.The entire ciphertext is LNSHDLEWMTRW. For the decryption of the hill cipher is done using the inverse of the matrix K.Cryptanalysis of Hill CipherCiphertext-only attack on hill cipher is difficult. Even brute force attack on a hill cipher is extremely difficult because the key is an m*m matrix. Each entry in the matrix can have one of the 26 values. At first glance, this means that the size of the key domain is.Secondly the hill ciphers do not preserve the statistics of the plaintext. Frequency analysis cannot be run on single letters, diagrams and trigrams. A frequency analysis of words of size m might work, but this is very rare that a plaintext has many strings of size m that are the same.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.