9/21/2015B.Ramamurthy1 Security Chapter 7. 9/21/2015B.Ramamurthy2 Introduction What is the security model of your system? There are many issues: 1. Security.

Slides:



Advertisements
Similar presentations
Distributed Systems Security Overview Douglas C. Sicker Assistant Professor Department of Computer Science and Interdisciplinary Telecommunications Program.
Advertisements

Public Key Infrastructure A Quick Look Inside PKI Technology Investigation Center 3/27/2002.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Cryptography and Network Security
Transport Layer Security (TLS) Protocol Introduction to networks and communications(CS555) Prof : Dr Kurt maly Student:Abhinav y.
Topic 8: Secure communication in mobile devices. Choice of secure communication protocols, leveraging SSL for remote authentication and using HTTPS for.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Security Steve Ko Computer Sciences and Engineering University at Buffalo.
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
Security Chapters 14,15. The Security Environment Threats Security goals and threats.
Security Chapters 14,15. The Security Environment Threats Security goals and threats.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
Cryptography Basic (cont)
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Security Chapter The security environment 9.2 Basics of cryptography 9.3 User authentication 9.4 Attacks from inside the system 9.5 Attacks from.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Cryptography April 20, 2010 MIS 4600 – MBA © Abdou Illia.
TCP/IP Protocol Suite 1 Chapter 28 Upon completion you will be able to: Security Differentiate between two categories of cryptography schemes Understand.
Security 2 Distributed Systems Lecture# 15. Overview Cryptography Symmetric Assymeteric Digital Signature Secure Digest Functions Authentication.
Chapter 8 Web Security.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
BR1 Protection and Security B. Ramamurthy Chapters 18 and 19.
Introduction to Public Key Cryptography
1 Fluency with Information Technology Lawrence Snyder Chapter 17 Privacy & Digital Security Encryption.
How HTTPS Works J. David Giese. Hyper Text Transfer Protocol BrowserHTTP Server GET / HTTP/1.1 HOST: edge-effect.github.io HEADERS BODY HTTP/ OK.
SYSTEM ADMINISTRATION Chapter 13 Security Protocols.
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
Cryptography  Why Cryptography  Symmetric Encryption  Key exchange  Public-Key Cryptography  Key exchange  Certification.
Cryptography, Authentication and Digital Signatures
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 29 Internet Security.
Slides for Chapter 7: Security From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
SECURITY Chapter 7.3 – 7.5 Presentation by Deepthi Reddy.
Cryptography and Network Security (CS435) Part Fourteen (Web Security)
Web Security : Secure Socket Layer Secure Electronic Transaction.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 11: Security.
Cryptography (2) University of Palestine Eng. Wisam Zaqoot April 2010 ITSS 4201 Internet Insurance and Information Hiding.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Lecture 16: Security CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9.
TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.
Group 9 Chapter 8.3 – 8.6. Public Key Algorithms  Symmetric Key Algorithms face an inherent problem  Keys must be distributed to all parties but kept.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
Mar 28, 2003Mårten Trolin1 This lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
Cryptographic Security Aveek Chakraborty CS5204 – Operating Systems1.
Slides for Chapter 7: Security From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4 © Pearson Education
Secure Sockets Layer (SSL)
Chapter 9 Security 9.1 The security environment
Chapters 14,15 Security.
Fundamental Concepts in Security and its Application Cloud Computing
Slides for Chapter 11: Security
Security Chapter 7 11/21/2018 B.Ramamurthy.
Enabling Technology1: Cryptography
CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9
The Secure Sockets Layer (SSL) Protocol
Security Chapter 7 1/14/2019 B.Ramamurthy.
Security Chapter 11 2/16/2019 B.Ramamurthy.
Security Chapter 7 2/22/2019 B.Ramamurthy.
Chapters 14,15 Security.
Security Chapter 7 2/28/2019 B.Ramamurthy.
Protection and Security
CDK: Chapter 7 TvS: Chapter 9
Security Chapter 7 4/8/2019 B.Ramamurthy.
Security Chapter 7 4/29/2019 B.Ramamurthy.
Presentation transcript:

9/21/2015B.Ramamurthy1 Security Chapter 7

9/21/2015B.Ramamurthy2 Introduction What is the security model of your system? There are many issues: 1. Security 2. Authentication 3. Authorization 4. Privacy of data 5. Integrity of data and communications Authentication: is validating the user and the messages sent by the authenticated user. Biometrics; Private-public key pair Authorization: refers to access control of resources after a user/message has been authenticated. Privacy and integrity through encryption These are especially critical for cloud-hosted systems: issues (1,4,5) above are hot research issues in the context of cloud computing.

9/21/2015B.Ramamurthy3 Encryption Most schemes include algorithms for encrypting and decrypting messages based on secret codes called keys. Two common models: Shared secret keys Public/private key pairs: A message encrypted with the public key of the receiver can be decrypted only by the private key of the recipient.

9/21/2015B.Ramamurthy4 Cryptographic Algorithms Plain text  cipher text  Decipher text E(K,M) = {M} K where E is the encryption function, M is the message and K is the key. Decryption: D(K,E(K,M)) = M When same key is used in encrypting and decrypting, it is called symmetric cryptography.

9/21/2015B.Ramamurthy5 Stream cipher XOR E(K, M) number generator n+3n+2n+1 plaintext stream ciphertext stream buffer keystream

9/21/2015B.Ramamurthy6 Cryptographic algorithms Shannon’s principles of cryptography: introduce “confusion” (XORing, bit shifting etc.) and “diffusion” (adding noise bits to diffuse the information) We will look at Tiny Encryption Algorithm (TEA) as an example of symmetric algorithm and Rivest, Shamir and Adelman (RSA) an an example for asymmetric algorithms.

9/21/2015B.Ramamurthy7 TEA Encryption Function void encrypt(unsigned long k[], unsigned long text[]) { unsigned long y = text[0], z = text[1]; unsigned long delta = 0x9e3779b9, sum = 0; int n; for (n= 0; n < 32; n++) { sum += delta; y += ((z > 5) + k[1]); z += ((y > 5) + k[3]); } text[0] = y; text[1] = z; }

9/21/2015B.Ramamurthy8 TEA decryption function void decrypt(unsigned long k[], unsigned long text[]) { unsigned long y = text[0], z = text[1]; unsigned long delta = 0x9e3779b9, sum = delta << 5; int n; for (n= 0; n < 32; n++) { z -= ((y > 5) + k[3]); y -= ((z > 5) + k[1]); sum -= delta; } text[0] = y; text[1] = z; }

9/21/2015B.Ramamurthy9 TEA in use void tea(char mode, FILE *infile, FILE *outfile, unsigned long k[]) { /* mode is ’e’ for encrypt, ’d’ for decrypt, k[] is the key.*/ char ch, Text[8]; int i; while(!feof(infile)) { i = fread(Text, 1, 8, infile);/* read 8 bytes from infile into Text */ if (i <= 0) break; while (i < 8) { Text[i++] = ' ';}/* pad last block with spaces */ switch (mode) { case 'e': encrypt(k, (unsigned long*) Text); break; case 'd': decrypt(k, (unsigned long*) Text); break; } fwrite(Text, 1, 8, outfile);/* write 8 bytes from Text to outfile */ }

9/21/2015B.Ramamurthy10 Cryptography Cryptography is the basis for authentication of messages. Selection of cryptographic algorithms and management of keys are critical issues for effectiveness, performance and usefulness of security mechanisms. Public-key cryptography is good for key distribution but inadequate for encryption of bulk data. Secret-key cryptography is suitable for bulk encryption tasks. Hybrid protocols such as SSL (Secure Socket Layer) establish a secure channel using public-key cryptography and then use it exchange secret keys for subsequent data exchanges.

9/21/2015B.Ramamurthy11 Lets look at a use of ssh-keygen Lets ssh to a server and observe what happens To ssh to a system without username/password: A personal private/public key pair is generated using the ssh- keygen command. The public key is then copied onto a remote system’s.ssh/authorized_keys file. You can now SSH to the remote system's account without the use of a password. To control access to a remote system from your client. Generate public-private key-pair with a pass-phrase If anybody else wants to login to a server from your system, it will request pass-phrase. Study man ssh-keygen. Next lets review the underlying principle behind public-key- private-key pair (PKI: public key infrastructure).

9/21/2015B.Ramamurthy12 RSA Encryption To find a key pair e, d: 1. Choose two large prime numbers, P and Q (each greater than 10100), and form: N = P x Q Z = (P–1) x (Q–1) 2. For d choose any number that is relatively prime with Z (that is, such that d has no common factors with Z). We illustrate the computations involved using small integer values for P and Q: P = 13, Q = 17 –> N = 221, Z = 192 d = 5 3.To find e solve the equation: e x d = 1 mod Z That is, e x d is the smallest element divisible by d in the series Z+1, 2Z+1, 3Z+1,.... e x d = 1 mod 192 = 1, 193, 385, is divisible by d e = 385/5 = 77

9/21/2015B.Ramamurthy13 RSA Encryption (contd.) To encrypt text using the RSA method, the plaintext is divided into equal blocks of length k bits where 2 k < N (that is, such that the numerical value of a block is always less than N; in practical applications, k is usually in the range 512 to 1024). k = 7, since 2 7 = 128 The function for encrypting a single block of plaintext M is: (N = P X Q = 13X17 = 221), e = 77, d = 5: E'(e,N,M) = M e mod N for a message M, the ciphertext is M 77 mod 221 The function for decrypting a block of encrypted text c to produce the original plaintext block is: D'(d,N,c) = c d mod N The two parameters e,N can be regarded as a key for the encryption function, and similarly d,N represent a key for the decryption function. So we can write K e = and K d =, and we get the encryption function: E(K e, M) ={M} K (the notation here indicating that the encrypted message can be decrypted only by the holder of the private key K d ) and D(K d, ={M} K ) = M. - public key, d – private key for a station

9/21/2015B.Ramamurthy14 Application of RSA Lets say a person in Atlanta wants to send a message M to a person in Buffalo: Atlanta encrypts message using Buffalo’s public key B  E(M,B) Only Buffalo can read it using it private key b: E(b, E(M,B))  M In other words for any public/private key pair determined as previously shown, the encrypting function holds two properties: E(p, E(M,P))  M E(P, E(M,p))  M

9/21/2015B.Ramamurthy15 How can you authenticate “sender”? (In real life you will use signatures: the concept of signatures is introduced.) Instead of sending just a simple message, Atlanta will send a signed message signed by Atlanta’s private key: E(B,E(M,a)) Buffalo will first decrypt using its private key and use Atlanta’s public key to decrypt the signed message: E(b, E(B,E(M,a))  E(M,a) E(A,E(M,a))  M

9/21/2015B.Ramamurthy16 Digital Signatures Strong digital signatures are essential requirements of a secure system. These are needed to verify that a document is: Authentic : source Not forged : not fake Non-repudiable : The signer cannot credibly deny that the document was signed by them.

9/21/2015B.Ramamurthy17 Digest Functions Are functions generated to serve a signatures. Also called secure hash functions. It is message dependent. Only the digest is encrypted using the private key.

9/21/2015B.Ramamurthy18 Alice’s bank account certificate 1.Certificate type:Account number 2.Name:Alice 3.Account: Certifying authority:Bob’s Bank 5.Signature:{Digest(field 2 + field 3)} K Bpriv

9/21/2015B.Ramamurthy19 Digital signatures with public keys

9/21/2015B.Ramamurthy20 Low-cost signatures with a shared secret key

9/21/2015B.Ramamurthy21 X509 Certificate format Certificates are widely used in e-commerce to authenticate Subjects. A Certificate Authority is a trusted third party, which certifies Public KeyPublic Key's do truly belong to their claimed owners. Certificate Authorities: Verisign, CREN (Corp for EducationalCREN Research Networking), Thawte

9/21/2015B.Ramamurthy22 The Needham–Schroeder secret-key authentication protocol HeaderMessageNotes 1. A->S: A, B, N A A requests S to supply a key for communication with B. 2. S->A:{N A, B, K AB, {K AB, A} K B } K A S returns a message encrypted in A’s secret key, containing a newly generated key K AB and a ‘ticket’ encrypted in B’s secret key. The nonce N A demonstrates that the message was sent in response to the preceding one. A believes that S sent the message because only S knows A’s secret key. 3. A->B: A sends the ‘ticket’ to B. 4. B->A: B decrypts the ticket and uses the new key K AB to encrypt another nonce N B. 5. A->B: A demonstrates to B that it was the sender of the previous message by returning an agreed transformation of N B. {K AB, A} K B {N B } K AB {N B - 1} K AB

9/21/2015B.Ramamurthy23 System architecture of Kerberos Server Client DoOperation Authentication database Login session setup Ticket- granting service T Kerberos Key Distribution Centre Server session setup Authen- tication service A 1. Request for TGS ticket 2. TGS ticket 3. Request for server ticket 4. Server ticket 5. Service request Request encrypted with session key Reply encrypted with session key Service function Step B Step A Step C C S

9/21/2015B.Ramamurthy24 SSL protocol stack SSL Handshake protocol SSL Change Cipher Spec SSL Alert Protocol Transport layer (usually TCP) Network layer (usually IP) SSL Record Protocol HTTPTelnet SSL protocols:Other protocols:

9/21/2015B.Ramamurthy25 SSL handshake protocol

9/21/2015B.Ramamurthy26 SSL handshake configuration options ComponentDescriptionExample Key exchange method the method to be used for exchange of a session key RSA with public-key certificates Cipher for data transfer the block or stream cipher to be used for data IDEA Message digest function for creating message authentication codes (MACs) SHA

9/21/2015B.Ramamurthy27 SSL record protocol Application data abcdefghi abcdefghi Record protocol units Compressed units MAC Encrypted TCP packet Fragment/combine Compress Hash Encrypt Transmit

9/21/2015B.Ramamurthy28 Millicent architecture Vendor ValueScrip IDCustomer IDExpirydatePropertiesCertificate Scrip layout

9/21/2015B.Ramamurthy29 WS-Security Messaging is at the core of WS. WS-Security provides enhancements to SOAP messaging to provide quality of protection through Message integrity Message confidentiality Message authentication The standard allows for wide variety of security models and encryption technologies. A variety of authentication and authorization methods are also supported. Binary security tokens can be attached to SOAP messages (Kerberos tokens, X509 tokens, etc.)

9/21/2015B.Ramamurthy30 WS-Security (contd.) Authentication: X509 certificate associated with a subject. Confidentiality: public key cryptography Integrity: digital signatures (XML signatures) and security tokens can be used to ensure message originated from the appropriate sender.

9/21/2015B.Ramamurthy31 Summary What is your security model? User-password-biometrics authentication? Association of certificate with user? Single-sign on, proxy-certificate for grid computing? PKI encryption for keys? Kerberos for key distribution? Secret-key-symmetric-key encryption of confidentiality and security? Digital signatures + certificates for integrity?