Publicité

CRYPTOGRAPHY AND NETWORK SECURITY- E-Mail Security

Professor & HOD à Jyothishmathi Institute of Technology and Science Karimnagar
4 May 2021
Publicité

Contenu connexe

Publicité

Plus de Jyothishmathi Institute of Technology and Science Karimnagar(20)

Publicité

CRYPTOGRAPHY AND NETWORK SECURITY- E-Mail Security

  1. CRYPTOGRAPHY AND NETWORK SECURITY- E-Mail Security Dr R Jegadeesan Prof-CSE Jyothishmathi Institute of Technology and Science, karimnagar
  2. SYLLABUS . E-Mail Security: Pretty Good Privacy, S/MIME IP Security: IP Security overview, IP Security architecture, Authentication Header, Encapsulating security payload, Combining security associations, Internet Key Exchange Case Studies on Cryptography and security: Secure Multiparty Calculation, Virtual Elections, Single sign On, Secure Inter-branch Payment Transactions, Cross site Scripting Vulnerability.
  3. : Topic Name : E-Mail Security: Pretty Good Privacy, S/MIME IP Security: IP Security overview, IP Security architecture Topic : Introduction to E-Mail Security. S/MIME IP Security Aim & Objective : Illustrate E-mail Security and IP security Application With Example :E-Mail security Applications Limitations If Any: Reference Links : Cryptography and Network Security: C K Shyamala, N Harini, Dr T R Padmanabhan, Wiley India, 1st Edition. Cryptography and Network Security : Forouzan Mukhopadhyay, Mc Graw Hill, 3rd Edition https://www.slideshare.net/ayyakathir/unit-5-76965230?qid=1f7b88c5-e066-4449-9e89- 602464a7e397&v=&b=&from_search=5 https://www.tutorialspoint.com/internet_technologies/e_mail_security.htm https://www.minigranth.com https://www.igi-global.com › •Video Link details •https://www.youtube.com/results?search_query=email+security+in+cryptography+and+network+s ecurity https://www.youtube.com/watch?v=lcBpC1RsWsw
  4. Universities & Important Questions : •What is transport mode and tunnel mode in IP sec? •Give a brief note on Virtual Elections. •Briefly explain the scenario of IP security and its Policy •Explain IP security architecture and also explain basic combinations of security associations with a neat diagram. •List and explain the PGP services and explain how PGP message generation is done with a neat diagram
  5. 247 E-MAIL, IP & WEB SECURITY • E-mail Security: Security Services for E-mail-attacks possible through E-mail – establishing keys privacy-authentication of the source- Message Integrity-Non-repudiation-Pretty Good Privacy-S/MIME. IPSecurity: Overview of IPSec – IP and IPv6-Authentication Header- Encapsulation Security • Payload (ESP)-InternetKeyExchange (Phasesof like ISAKMP/IKE Encoding). •WebSecurity:SSL/TLS basic Protocol-computing the keys- client authentication-PKI as deployed by SSLAttacks fixed in v3- Exportability- Encoding-Secure Electronic Transaction (SET).
  6. Email Security 248 • email is one of the most widely used and regarded network services Example From : abc @gmail.com To : cdf@yahoo.com Sub: Hi How are you?
  7. Single mail to group of recipients • Remote Exploder mail mail mail • Local Exploder mail Req list reterive list mail mail mail Sender Recipient 2 Recipient 1 Distribution site Recipient 3 Sender Distribution list maintenance Recipient 3 Recipient 1 Recipient 2
  8. 250 Email Security Services from 1. Confidentiality- protection disclosure 2. Authentication of the source 3. message integrity -protection from modification 4. non-repudiation of origin -protection from denial by sender
  9. 251 5. Proof of submission 6. Proof of delivery 7. Message flow confidentiality-intruder unable to know whether msg sent/not between users 8. Anonymity- Hiding the sender details 9. Containment- ability to maintain n/w security 10. Audit 11. Self Destruct 12. Message Sequence
  10. 252 Pretty Good Privacy (PGP) • widely used de facto secure email • developed by Phil Zimmermann • selected best available crypto algs to use integrated into a single program • available on Unix, PC, Macintosh and Amiga systems • originally free, now have commercial versions available also
  11. 253 PGP Services 1. Authentication 2. Confidentiality 3. Compression 4. 4.E-mail Compatibility 5.Segmentation & Reassembly
  12. 255 PGP Operation – Authentication 1. sender creates a message 2. SHA-1 used to generate 160-bit hash code of message 3. hash code is encrypted with RSA using the sender's private key, and result is attached to message 4. receiver uses RSA or DSS with sender's public key to decrypt and recover hash code 5. receiver generates new hash code for message and compares with decrypted hash code, if match, message is accepted as authentic
  13. 256 PGP Operation – Confidentiality •sender generates message and random 128-bit number to be used as session key for this message only •message is encrypted, using CAST-128 / IDEA/3DES with session key •session key is encrypted using RSA with recipient's public key, then attached to message •receiver uses RSA with its private key to decrypt and recover session key •session key is used to decrypt message
  14. 257 PGP Operation – Confidentiality & Authentication • uses both services on same message –create signature & attach to message –encrypt both message & signature –attach RSA encrypted session key
  15. 258 PGP Operation – Compression • by default PGP compresses message after signing but before encrypting – One can store uncompressed message & signature for later verification – & because compression is non deterministic • uses ZIP compression algorithm
  16. 259 PGP Operation – Email Compatibility • when using PGP will have binary data to send (encrypted message etc) • however email was designed only for text • hence PGP must encode raw binary data into printable ASCII characters • uses radix-64 algorithm – maps 3 bytes to 4 printable chars(ASCII) – also appends a CRC • PGP also segments messages if too big
  17. 260 PGP Operation
  18. 261 Segmentation & Reassembly • PGP subdivides the original message(if length >50000 octects) which is too large to small enough to send via mail. • On the receiving end, PGP reassemble entire original block
  19. 262 PGP Session Keys • need a session key for each message – of varying sizes: 56-bit DES, 128-bit CAST or IDEA, 168-bit Triple-DES • generated using ANSI X12.17 mode • uses random inputs taken from previous uses and from keystroke timing of user
  20. PGP Public & Private Keys • since many public/private keys may be in use, need to identify which is actually used to encrypt session key in a message – could send full public-key with every message – but this is inefficient • rather use a key identifier based on key – is least significant 64-bits of the key – will very likely be unique • also use key ID in signatures
  21. 264 PGP Key Rings • each PGP user has a pair of keyrings: – public-key ring contains all the public-keys of other PGP users known to this user, indexed by key ID – private-key ring contains the public/private key pair(s) for this user, indexed by key ID & encrypted keyed from a hashed passphrase
  22. PGP Key Management • rather than relying on certificate authorities • in PGP every user is own CA – can sign keys for users they know directly • forms a “web of trust” – trust keys have signed – can trust keys others have signed if have a chain of signatures to them • key ring includes trust indicators • users can also revoke their keys
  23. S/MIME (Secure/Multipurpose Internet Mail Extensions) • security enhancement to MIME email – original Internet RFC822 email was text only – MIME provided support for varying content types and multi-part messages – with encoding of binary data to textual form – S/MIME added security enhancements • have S/MIME support in various modern mail agents: MS Outlook, Netscape etc
  24. S/MIME Functions • enveloped data – encrypted content and associated keys • signed data – encoded message + signed digest • clear-signed data – cleartext message + encoded signed digest • signed & enveloped data – nesting of signed & encrypted entities
  25. S/MIME Cryptographic Algorithms • hash functions: SHA-1 & MD5 • digital signatures: DSS & RSA • session key encryption: ElGamal & RSA • message encryption: Triple-DES, RC2/40 and others • have a procedure to decide which algorithms to use
  26. S/MIME Certificate Processing • S/MIME uses X.509 v3 certificates • managed using a hybrid of a strict X.509 CA hierarchy & PGP’s web of trust • each client has a list of trusted CA’s certs • and own public/private key pairs & certs • certificates must be signed by trusted CA’s
  27. IP Security • have a range of application specific security mechanisms – eg. S/MIME, PGP,Kerberos, SSL/HTTPS • however there are security concerns that cut across protocol layers • would like security implemented by the network for all applications
  28. • general IP Security mechanisms • provides – authentication – confidentiality – key management • applicable to use over LANs, across public & private WANs, & for the Internet • need identified in 1994 report – need authentication, encryption in IPv4 & IPv6
  29. IP Security Uses
  30. Benefits of IPSec • in a firewall/router provides strong security to all traffic crossing the perimeter • in a firewall/router is resistant to bypass • is below transport layer, hence transparent to applications • can be transparent to end users • can provide security for individual users • secures routing architecture
  31. IPSecurity Specification The IPSec specification has become quite complex. key management. The totality of the IPsec specification is scattered across dozens of RFCs and draft IETF documents, making this the most complex and difficult to grasp of all IETF specifications. The best way to keep track of and get a handle on this body of work is to consult the latest version of the IPsec document roadmap. The documents can be categorized into the following groups: • Architecture: Covers the general concepts, security requirements, definitions, and mechanisms defining IPsec technology, RFC 4301, Security Architecture for the Internet Protocol. • Authentication Header (AH): AH is an extension header for message authentication, now deprecated. • Encapsulating Security Payload (ESP): ESP consists of an encapsulating header and trailer used to provide encryption or combined encryption/authentication. . • Internet Key Exchange (IKE): a collection of documents describing the key management schemes for use with IPsec • Cryptographic algorithms: a large set of documents that define and describe cryptographic algorithms for encryption, message authentication, pseudorandom functions (PRFs), and cryptographic key exchange. • Other: There are a variety of other IPsec-related RFCs, including those dealing with security policy and management information base (MIB) content.
  32. IPSec Services • Access control • Connectionless integrity • Data origin authentication • Rejection of replayed packets – a form of partial sequence integrity • Confidentiality (encryption) • Limited traffic flow confidentiality
  33. Transport and Tunnel Modes • Transport Mode – to encrypt & optionally authenticate IP data – can do traffic analysis but is efficient – good for ESP host to host traffic • Tunnel Mode – encrypts entire IP packet – add new header for next hop – no routers on way can examine inner IP header – good for VPNs, gateway to gateway security
  34. Transport and Tunnel Modes
  35. Transport and Tunnel Mode Protocols
  36. Security Associations • a one-way relationship between sender & receiver that affords security for traffic flow • defined by 3 parameters: – Security Parameters Index (SPI) – IP Destination Address – Security Protocol Identifier • has a number of other parameters – seq no, AH & EH info, lifetime etc • have a database of Security Associations
  37. Security Policy Database • relates IP traffic to specific SAs – match subset of IP traffic to relevant SA – use selectors to filter outgoing traffic to map – based on: local & remote IP addresses, next layer protocol, name, local & remote ports
  38. Transport Mode SA Tunnel Mode SA AH Authenticates IP payload and selected portions of IP header and IPv6 extension headers Authenticates entire inner IP packet plus selected portions of outer IP header ESP Encrypts IP payload and any IPv6 extesion header Encrypts inner IPpacket ESP with authentication Encrypts IP payload and any IPv6 extesion header. Authenticates IPpayload but no IP header Encrypts inner IPpacket. Authenticates innerIP packet.
  39. Before applying AH Transport Mode (AH Authentication
  40. Tunnel Mode (AH Authentication
  41. Encapsulating Security Payload
  42. Encryption & Authentication Algorithms & Padding • ESP can encrypt payload data, padding, pad length, and next header fields – if needed have IV at start of payload data • ESP can have optional ICV for integrity – is computed after encryption is performed • ESP uses padding – to expand plaintext to required length – to align pad length and next header fields – to provide partial traffic flow confidentiality
  43. Anti-Replay Service • replay is when attacker resends a copy of an authenticated packet • use sequence number to thwart this attack • sender initializes sequence number to 0 when a new SA is established – increment for each packet – must not exceed limit of 232 – 1 • receiver then accepts packets with seq no within window of (N –W+1)
  44. IPSec Key Management • handles key generation & distribution • typically need 2 pairs of keys – 2 per direction for AH & ESP • manual key management – Sys-admin manually configures every system • automated key management – automated system for on demand creation of keys for SA’s in large systems – has Oakley & ISAKMP elements
  45. • a key exchange protocol • based on Diffie-Hellman key exchange • adds features to address weaknesses – no info on parties, man-in-middle attack, cost – so adds cookies, groups (global params), nonces, DH key exchange with authentication • can use arithmetic in prime fields or elliptic curve fields
  46. ISAKMP •Internet Security Association and Key Management Protocol •provides framework for key management defines procedures and packet formats to establish, negotiate, modify, & delete SAs •independent of key exchange protocol, encryption alg, & authentication method •IKEv2 no longer uses Oakley& ISAKMP terms, but basic functionality is same
  47. CASE STUDIES ON CRYPTOGRAPY AND SECURITY
  48. Secure Inter-branch Payment Transactions  Points for classroom discussions 1.What is the technology to achieve non-repudiation? How is this guaranteed? 2.How is the problem of key distribution resolved in PKI? 3.Why are cryptographic toolkits required? 4.How can smart cards be used in cryptography? General Bank Of India (GBI) has implemented an Electronic Payment System called as EPS in about 1200 branches across the country. This system transfers payment instructions between two computerized branches of GBI. A central server is maintained at the EPS office located in Mumbai. The branch offices connect to the Local VSAT of a private network by using dial-up connection. The local VSAT has a connectivity established with the EPS office. GBI utilizes its proprietary messaging service called as GBI-Transfer to exchange payment instructions. Currently, EPS has minimal data security. As the system operates in a closed network, the current security infrastructure may suffice the need. The data moving across the network is in encrypted format.
  49. • Current EPS Architecture EPS is used to transmit payment details from the payer branch to the payee branch via the central server in Mumbai which is also described stepby- step. • A data-entry person in the Payer Branch enters transaction details through the EPS interface. • A Bank Officer checks the validity of the transaction through the EPS interface. • After validating the transaction, the Bank Officer authorizes the transaction. Authorized transaction is stored in a local Payment Master (PM) database. • Once the transaction is stored in PM, a copy of the same is encrypted and stored in a file. This transaction file is stored in OUT directory. The GBI- Transfer application looks for any pending transactions (i.e. for the presence of any files in the OUT directory) by a polling mechanism and if it finds such
  50. • transactions, it sends all these files one-by-one to the EPS central office located in Mumbai by dialing the local VSAT.  The local VSAT gets connectivity to the EPS central office and the transaction is transferred and • stored in the IN directory at the EPS central office.  The interface program at the EPS central office collects the file pending in the IN directory and sends it to the PM application at that office.  In order to send the Credit Request to PM, the transaction headers are changed. The transaction with changed headers in encrypted format is then placed in OUT directory of the EPS central office.  The GBI-Transfer application at the EPS central office collects the transactions pending in the OUT directory and sends them to the Payee Bank through the VSAT.  The transaction is transferred and stored in the IN directory of the Payee Branch.  The interface program at the Payee Branch collects the transaction and posts it in PM.  PM marks the credit entry and returns back an acknowledgement of the same. The acknowledgement is placed in OUT directory of the Payee Branch.  The acknowledgement is picked by GBI-Transfer at the Payee Branch and sent to the EPS central office through the VSAT.  The EPS central office receives the credit acknowledgement and forwards it to Payer Branch.  The Payer Branch receives the credit acknowledgement receipt. This completes the transaction.
  51. • Requirements to Enhance EPS As GBI is in the process of complete automation and setting up connectivity over the Internet or a private network, they need to ensure stringent security measures, which demand the usage of a Public Key Infrastructure (PKI) framework. • As a part of implementing security, GBI wants the following aspects to be ensured: •Non-repudiation (Digital Signatures) •Encryption – 128-bit (Upgrade to the current 56-bit encryption) •Smart card support for storing sensitive data & on-card digital signing
  52. •Closed loop Public Key Infrastructure : • Proposed Solution Since providing cryptographic functionalities require the usage of a • cryptographic toolkit, it is assumed that GBI will implement an appropriate Certification Authority (CA) infrastructure and a PKI infrastructure offering.
  53. • The transaction will be digitally signed and encrypted/decrypted at the Payer and Payee branches, as well as at the EPS central office. The signing operation can be performed on the system or on external hardware like a smart card. On the server side, a provision of automated signing without any manual intervention will be provided. • The transaction flow described earlier would now be split into two legs: • The Payer Leg (Payer Branch to the EPS central office) • The Payee Leg (EPS central office to the Payee Branch)
  54. Cross Site Scripting Vulnerability (CSSV)
  55. Points for classroom discussions • What is the purpose of scripting technologies on the Internet? • What can prevent CSSV attacks? • What sort of testing can the creators of a Web site perform in order to guard against possible CSSV attacks? • Cross Site Scripting Vulnerability (CSSV) is a relatively new form of attacks that exploits inadequate validations on the server-side. The term Cross Server Scripting Vulnerability (CSSV) is actually not completely correct. However, this term was coined when the problem was not completely understood and has stuck ever since. Cross-site scripting happens when malicious tags and/or scripts attack a Web browser via another site’s dynamically generated Web pages. The attacker’s target is not a Website, but rather its users (i.e. clients or browsers). • The idea of CSSV is quite simple to understand and is based on exploiting the scripting • technologies, such as JavaScript, VBScript or JScript. Let us understand how this works. Consider the following Web page containing a form as shown in Fig. 10.9, in which the user is expected to enter her postal address. Suppose that the URL of the site sending this page is www.test.com and when the user submits this form, it would be processed by a server-side program called as address.asp.
  56. • We would typically expect the user to enter the house number, street name, city, postal code and country, etc. However, imagine that the user enters the following weird string, instead: • <SCRIPT>Hello World</SCRIPT> • As a result, the URL submitted would be something like www.test.com/address.asp?address= • <SCRIPT>Hello World </SCRIPT>. • Now suppose that the server-side program address.asp does not validate the input sent by the user and simply sends the value of the field address to the next Web page. What would this translate to? It would mean that the next Web page would receive the value of address as • <SCRIPT>Hello World</ SCRIPT>. • As we know, this would most likely treat the value of the address field as a script, which would be executed as if it is written in a scripting language, such as JavaScript etc on the Web browser. Therefore, the user would get to see Hello World.
  57. Virtual Elections • Points for classroom discussions • Is it technically possible to have elections on the Internet? How? What sort of infrastructure would be needed for this? • What would be the main concerns in such a virtual election? • What would be the use of digital signatures and encryption in virtual elections? • Another situation where cryptography is useful is virtual elections. Computerized voting would become quite common in the next few decades. As such, it is important that the protocol for ritual
  58. They must come together; combine their respective secrets (S and R) to generate the original secret (P). Bob gets only R Alice gets only S Combine d secret R XOR Random Number ≈ Origina l secret P S Fig:Secret splitting
  59. • elections should protect individual privacy and should also disallow cheating. Consider the following protocol in order that voters can send their votes electronically to the Election authority (EA).
  60. • Each voter casts the vote and encrypts it with the public key of the EA. • Each voter sends the encrypted vote to the EA. • The EA decrypts all the votes to retrieve the original vote, tabulates all the votes and announces the result of the election. • Is this protocol secure and does it provide comfort both to the voters as well as to the EA? Not at all! • There are following problems in this scheme: • The EA does not know whether the authorized voters have voted or it has received fake (bogus) votes. • Secondly, there is no mechanism to prevent duplicate voting. • What is the advantage of this protocol? Clearly, no one would be able to change another voter’s vote, because it is first encrypted with the EA’s public key and is then sent to the EA. • However, if we observe this scheme carefully, an attacker need not change someone’s vote at all. The attacker can simply send duplicate votes! • How can we improve upon this protocol to make it more robust? Let us rewrite it, as follows: • Each voter casts the vote and signs it with her private key.
  61. • Each voter then encrypts the signed vote with the public key of the EA. • Each voter sends the vote to the EA. • The EA decrypts the voter with its private key and verifies the signature of the voter with the help of the voter’s public key. • The EA then tabulates all the votes and announces the result of the election. This protocol would now ensure that duplicate voting is disallowed. Because the voter has signed the vote (with her private key) in Step 1, this can be checked. Similarly, no one can change another voter’s vote. This is because a vote is digitally signed and any changes to it will be detected and exposed in the signature verification process.
  62. • Although this protocol is a lot better, the trouble with this scheme is that the EA would come to • know who voted for whom, leading to privacy concerns. We shall leave it to the reader to figure out how this problem can be solved.
  63. Thank you
Publicité