1.65k likes | 2.1k Views
Network Security. By : B A Patel Narmada College Of computer Application Zadeshwar, Bharuch. Outline Cryptography Symmetric-Key Algorithms Public-Key Algorithms Digital Signatures. Why To have Computer Network?. Why To have Computer Network?. For Communication For resource sharing.
E N D
Network Security Network Security By : B A Patel Narmada College Of computer Application Zadeshwar, Bharuch
Network Security • Outline • Cryptography • Symmetric-Key Algorithms • Public-Key Algorithms • Digital Signatures
Network Security Why To have Computer Network?
Network Security Why To have Computer Network? • For Communication • For resource sharing
Network Security The OSI model
Network Security Why To have Security?
Network Security • The world before computers was in some ways much simpler • Signing, legalizing a paper would authenticate it • Photocopying easily detected • Erasing, inserting, modifying words on a paper document easily detectable • Secure transmission of a document: seal it and use a reasonable mail carrier (hoping the mail train does not get robbed) • One can recognize each other’s face, voice, hand signature, etc. •
Network Security • Electronic world: the ability to copy and alter information has changed dramatically • No difference between an “original” file and copies of it • Removing a word from a file or inserting others is undetectable • Adding a signature to the end of a file/email: one can impersonate it –add it to other files as well, modify it, etc. • Electronic traffic can be (and is!) monitored, altered, often without noticing • How to authenticate the person electronically communicating with you
Network Security • Some people who cause security problem and why • Student: to have fun snooping on other people’s email • Cracker: to test out someone’s security system, to steal data • Businessman: to discover a competitor’s strategic marketing plan • Ex-employee: to get revenge for being fired • Accountant: to embezzle money from a company • Stockbroker: to deny a promise made to a customer by email • Convict: to steal credit card numbers for sale • Spy: to learn an enemy’s military or industrial secrets
Network Security • Some people who cause security problem and why • Terrorist: to steal germ warfare secrets • Point to make: making a network or a communication secure involves more than just keeping it free of programming errors • It involves outsmarting often intelligent, dedicated and often well-funded adversaries
Network Security • Security issues: some practical situations • A sends a file to B: E intercepts it and reads it • How to send a file that looks garbage to all but the intended receiver? • A send a file to B: E intercepts it, modifies it, and then forwards it to B • How to make sure that the document has been received in exactly the form it has been sent • E sends a file to B pretending it is from A • How to make sure your communication partner is really who (s) he claims to be
Network Security • Security issues: some practical situations • A sends a message to B: E is able to delay the message for a while • How to detect old messages • A sends a message to B. Later A (or B) denies having sent (received) the message • How to deal with electronic contracts • E learns which user accesses which information although the information itself remains secure • E prevents communication between A and B: B will reject any message from A because they look unauthentic
Network Security Security Attack • generic types of attacks • passive • active
Network Security Passive Attacks
Network Security Active Attacks
Network Security • Classes of network security problems • Secrecy (or confidentiality) • Keep the information out of the hands of unauthorized users, even if it has to travel over insecure links • Authentication • Determine whom you are talking to before revealing sensitive information
Network Security • Classes of network security problems • Non-repudiation (or signatures) • Prove that the order was to buy X liters of alcohol at the price before the taxes fell down and not the price after. Prove also that the order indeed existed • Data integrity (or message authentication) • Make sure that the message received was exactly the message you sent (not necessarily interested here in the confidentiality of the document)
Cryptography Network Security What does it say? Cryptography
Cryptography Network Security • Cryptography comes from the Greek words for ''secret writing.'‘ • Cryptography is the study of secret (crypto) writing (graphy) concerned with developing algorithms which may be used to • Conceal the context of some message from all except the sender and recipient (privacy of secrecy), and /or • Verify the correctness of a message to the recipient (authentication) • Form the basis of many technological solutions to computer and communications security problems
Cryptography Network Security • History • Cryptography was already used in ancient times, essentially in three kinds of contexts: • private communications • art and religion • military and diplomatic use Cryptology could be considered as one of humanity's oldest professions. It have a history of at least 4000 years Ancient Egyptians enciphered some of their hieroglyphic writing on monuments.
Cryptography Network Security STEGANOGRAPHY Methods of concealing text. Character marking: Selected letters of text are overwitten in pencil. The marks are not visible unless the paper is held at an angle to bright light. Invisible ink: Substances can be used that leave no visible trace until heat or some chemical is applied. Pin punctures : Small pin punctures on selected letters are not ordinarily visible unless paper is held in front of light.
Cryptography Network Security Some Basic Terminology • Cryptography: The art or science encompassing the principles and methods of transforming an intelligible message into one that is unintelligible, and the retransforming that message back to its original form. • plaintext – the original message • ciphertext – the coded/transformed message • cipher – an algorithm for transforming an intelligible (plain) message into one that is unintelligible (ciphertext) by transposition and/or substitution methods • key – some information used in cipher known only to sender/receiver
Cryptography Network Security Some Basic Terminology • encipher (encrypt) - the process of converting plaintext to ciphertext using cipher and a key. • decipher (decrypt) – the process of converting ciphertext to plaintext using cipher and a key. • cryptanalysis (codebreaking) – the study of principles and methods of transforming (deciphering) an ciphertext back into plaintext without knowing key. Also called codebreaking. • cryptology - field of both cryptography and cryptanalysis
Cryptography Network Security Some Basic Terminology • Code - an algorithm for transforming an intelligible message into an unintelligible one using a code-book • Keyspace – Total number of possible values of keys in a crypto algorithm • Cryptosystem – The combination of algorithm, key, and key management functions used to perform cryptographic operations
Network Security Symmetric Cipher Model
Network Security Requirements • two requirements for secure use of symmetric encryption: • a strong encryption algorithm • a secret key known only to sender / receiver • mathematically have: Y = EK(X) X = DK(Y) DK(EK(X)) = X • assume encryption algorithm is known • implies a secure channel to distribute key
Network Security The encryption model (for a symmetric-key cipher).
Network Security A fundamental rule of cryptography is that one must assume that the cryptanalyst knows the methods used for encryption and decryption. The idea that the cryptanalyst knows the algorithms and that the secrecy lies exclusively in the keys is called Kerckhoff's principle. Kerckhoff's principle: All algorithms must be public; only the keys are secret.
Network Security Types of Cryptanalytic Attacks • ciphertext only • only know algorithm / ciphertext, statistical, can identify plaintext • known plaintext • know/suspect plaintext & ciphertext to attack cipher • chosen plaintext • select plaintext and obtain ciphertext to attack cipher • chosen ciphertext • select ciphertext and obtain plaintext to attack cipher • chosen text • select either plaintext or ciphertext to en/decrypt to attack cipher
Network Security Cryptography • can be characterized by: • type of encryption operations used • substitution / transposition / product • number of keys used • single-key or private / two-key or public • way in which plaintext is processed • block / stream
Types of Cryptography Network Security • Stream-based Ciphers • One at a time, please • Mixes plaintext with key stream • Good for real-time services • Block Ciphers • Amusement Park Ride • Substitution and transposition 33
Encryption Systems Network Security • Substitution Cipher • Convert one letter to another • Cryptoquip • Transposition Cipher • Change position of letter in text • Word Jumble • Monoalphabetic Cipher • Caesar 34
Encryption Systems Network Security • Polyalphabetic Cipher • Vigenère • Modular Mathematics • Running Key Cipher • One-time Pads • Randomly generated keys 35
Steganography Network Security • Hiding a message within another medium, such as an image • No key is required • Example • Modify color map of JPEG image 36
Cryptographic Methods Network Security • Symmetric • Same key for encryption and decryption • Key distribution problem • Asymmetric • Mathematically related key pairs for encryption and decryption • Public and private keys 37
Cryptographic Methods Network Security • Hybrid • Combines strengths of both methods • Asymmetric distributes symmetric key • Also known as a session key • Symmetric provides bulk encryption • Example: • SSL negotiates a hybrid method 38
Network Security Warning! • “A little knowledge is a dangerous thing” • Very true in cryptography
Network Security Classical Substitution Ciphers • where letters of plaintext are replaced by other letters or by numbers or symbols • or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns
Cryptography Network Security Secrecy • Scenario: Alice wants to send a message (plaintext p) to Bob. The communication channel is insecure and can be eavesdropped by Trudy. If Alice and Bob have previously agreed on anencryption scheme (cipher),the message can be sent encrypted(ciphertext c) • Issues: • What is a good cipher? • What is the complexity of encrypting/decrypting? • What is the size of the ciphertext, relative to the plaintext? • If Alice and Bob have never interacted before, how can they agree on a cipher?
Cryptography Network Security Traditional Cryptography • Ciphers were already studied in ancient times • Caesar’s cipher: replace a with d replace b with e ... replace z with c • A more generalmonoalphabetic substitutioncipher maps each letter to some other letter.
Network Security Caesar Cipher • earliest known substitution cipher • by Julius Caesar • first attested use in military affairs • replaces each letter by 3rd letter on • example: meet me after the party PHHW PH DIWHU WKH SDUWB
Network Security Caesar Cipher • More formally: • Encrypt(Letter, Key) = (Letter + Key) (mod 26) • Decrypt(Letter, Key) = (Letter - Key) (mod 26) • Encrypt(“NIKITA”, 3) = “QLNLWD” • Decrypt(“QLNLWD”, 3) = “NIKITA”
Network Security Cryptanalysis of Caesar Cipher • only have 26 possible ciphers • A maps to A,B,..Z • could simply try each in turn • a brute force search • given ciphertext, just try all shifts of letters • do need to recognize when have plaintext
Cryptography Network Security Breaking Traditional Cryptography • Armed with simple statistcal knowledge, Trudy can easily break a monalphabetic substitution cypher • most frequent letters in English: e, t, o, a, n, i, ... • most frequent digrams: th, in, er, re, an, ... • most frequent trigrams: the, ing, and, ion, ... • The first description of the frequency analysis attack appears in a book written in the 9th century by the Arab philosopher al-Kindi
Cryptography Network Security • Ciphertext • PCQ VMJYPD LBYK LYSO KBXBJXWXV BXV ZCJPO EYPD KBXBJYUXJ LBJOO KCPK. CP LBO LBCMKXPV XPV IYJKL PYDBL, QBOP KBO BXV OPVOV LBO LXRO CI SX'XJMI, KBO JCKO XPV EYKKOV LBO DJCMPV ZOICJO BYS, KXUYPD: 'DJOXL EYPD, ICJ X LBCMKXPV XPV CPO PYDBLK Y BXNO ZOOP JOACMPLYPD LC UCM LBO IXZROK CI FXKL XDOK XPV LBO RODOPVK CI XPAYOPL EYPDK. SXU Y SXEO KC ZCRV XK LC AJXNO X IXNCMJ CI UCMJ SXGOKLU?' OFYRCDMO, LXROK IJCS LBO LBCMKXPV XPV CPO PYDBLK Any Guesses???
Cryptography Network Security Frequency Analysis • Identyfying comon letters, digrams and trigrams... • PCQ VMJYPD LBYK LYSO KBXBJXWXV BXV ZCJPO EYPD KBXBJYUXJ LBJOO KCPK. CP LBO LBCMKXPV XPV IYJKL PYDBL, QBOP KBO BXV OPVOV LBO LXRO CI SX'XJMI, KBO JCKO XPV EYKKOV LBO DJCMPV ZOICJO BYS, KXUYPD: 'DJOXL EYPD, X LBCMKXPV XPV CPO PYDBLK Y BXNO ZOOP JOACMPLYPD LC UCM LBO IXZROK CI FXKL XDOK XPV LBO RODOPVK CI XPAYOPL EYPDK. SXU Y SXEO KC ZCRV XK LC AJXNO X IXNCMJ CI UCMJ SXGOKLU?' OFYRCDMO, LXROK IJCS LBO LBCMKXPV XPV CPO PYDBLK • First guess: LBO is THE
Cryptography Network Security Frequency Analysis • Assuming LBO represents THE we replace L with T, B with H, and O with E and get • PCQ VMJYPD THYK TYSE KHXHJXWXV HXV ZCJPE EYPD KHXHJYUXJ THJEE KCPK. CP THE THCMKXPV XPV IYJKT PYDHT, QHEP KHO HXV EPVEV THE LXRE CI SX'XJMI, KHE JCKE XPV EYKKOV THE DJCMPV ZEICJE HYS, KXUYPD: 'DJEXT EYPD, ICJ X LHCMKXPV XPV CPE PYDHLK Y HXNE ZEEP JEACMPTYPD TC UCM THE IXZREK CI FXKL XDEK XPV THE REDEPVK CI XPAYEPTEYPDK. SXU Y SXEE KC ZCRV XK TC AJXNE X IXNCMJ CI UCMJ SXGEKTU?' EFYRCDME, TXREK IJCS THE LHCMKXPV XPV CPE PYDBTK • More guesses…?
Cryptography Network Security THE SOLUTION • Code X Z A V O I D B Y G E R S P C F H J K L M N Q T U W A B C D E F G H I J K L M N O P Q R S T U V W X Y Z • Plaintext Now during this time Shahrazad had borne King Shahriyar three sons. On the thousand and first night, when she had ended the tale of Ma'aruf, she rose and kissed the ground before him, saying: 'Great King, for a thousand and one nights I have been recounting to you the fables of past ages and the legends of ancient kings. May I make so bold as to crave a favour of your majesty?’ Epilogue, Tales from the Thousand and One Nights