Authentication and Authorization Authentication is the process of verifying a principal’s identity (but how to define “identity”?) –Who the person is –Or,

Slides:



Advertisements
Similar presentations
Overview Network security involves protecting a host (or a group of hosts) connected to a network Many of the same problems as with stand-alone computer.
Advertisements

Key distribution and certification In the case of public key encryption model the authenticity of the public key of each partner in the communication must.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
CS470, A.SelcukCryptographic Authentication1 Cryptographic Authentication Protocols CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Digital Signatures and Hash Functions. Digital Signatures.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
COEN 350: Network Security Authentication. Between human and machine Between machine and machine.
Http Web Authentication Web authentication is used to verify a users identity before allowing access to certain web pages On web browsers you get a login.
CMSC 414 Computer and Network Security Lecture 12 Jonathan Katz.
CS426Fall 2010/Lecture 81 Computer Security CS 426 Lecture 8 User Authentication.
 Authorization via symmetric crypto  Key exchange o Using asymmetric crypto o Using symmetric crypto with KDC  KDC shares a key with every participant.
 Public key (asymmetric) cryptography o Modular exponentiation for encryption/decryption  Efficient algorithms for this o Attacker needs to factor large.
Intro To Secure Comm. Exercise 2. Problem  You wish for your users to access a remote server via user and password.  All of the users have modems and.
Security Chapters 14,15. The Security Environment Threats Security goals and threats.
Class on Security Raghu. Current state of Security Cracks appear all the time Band Aid solutions Applications are not designed properly OS designs are.
CMSC 414 Computer and Network Security Lecture 21 Jonathan Katz.
Apr 22, 2003Mårten Trolin1 Agenda Course high-lights – Symmetric and asymmetric cryptography – Digital signatures and MACs – Certificates – Protocols Interactive.
Chap 3: Key exchange protocols In most systems, we distinguish the short term keys from the long term ones: –A short term key (session key) is used to.
CMSC 414 Computer and Network Security Lecture 22 Jonathan Katz.
Chapter 9 Cryptographic Protocol Cryptography-Principles and Practice Harbin Institute of Technology School of Computer Science and Technology Zhijun Li.
Cryptography and Network Security Chapter 10. Chapter 10 – Key Management; Other Public Key Cryptosystems No Singhalese, whether man or woman, would venture.
Introduction to Cryptography
CMSC 414 Computer and Network Security Lecture 13 Jonathan Katz.
Digital Signature Xiaoyan Guo/ Xiaohang Luo/
INTRODUCTION Why Signatures? A uthenticates who created a document Adds formality and finality In many cases, required by law or rule Digital Signatures.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Strong Password Protocols
Computer Security Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
14.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 14 Entity Authentication.
Part Two Network Security Applications Chapter 4 Key Distribution and User Authentication.
Hash Functions A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M) Principal object is.
Lecture 11: Strong Passwords
Public-Key Cryptography CS110 Fall Conventional Encryption.
EE515/IS523 Think Like an Adversary Lecture 4 Crypto in a Nutshell Yongdae Kim.
Chapter 3: Basic Protocols Dulal C. Kar. Key Exchange with Symmetric Cryptography Session key –A separate key for one particular communication session.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Introduction1-1 Data Communications and Computer Networks Chapter 6 CS 3830 Lecture 31 Omar Meqdadi Department of Computer Science and Software Engineering.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
23-1 Last time □ P2P □ Security ♦ Intro ♦ Principles of cryptography.
1 Cryptography NOTES. 2 Secret Key Cryptography Single key used to encrypt and decrypt. Key must be known by both parties. Assuming we live in a hostile.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
The TAOS Authentication System: Reasoning Formally About Security Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
Lecture 16: Security CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9.
14.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 14 Entity Authentication.
Protocols Chapter 2 Protocol: A series of steps, involving two or more parties, designed to accomplish a task. All parties involved must know the protocol.
Lecture 2: Introduction to Cryptography
CPS Computer Security Tutorial on Creating Certificates SSH Kerberos CPS 290Page 1.
Authentication Issues and Solutions CSCI 5857: Encoding and Encryption.
Authentication. Goal: Bob wants Alice to “prove” her identity to him Protocol ap1.0: Alice says “I am Alice” Failure scenario?? “I am Alice”
COEN 350: Network Security Authentication. Between human and machine Between machine and machine.
Chapter 1 – Introduction Part 4 1. Message Authentication Codes Allows for Alice and Bob to have data integrity, if they share a secret key. Given a message.
Private key
CPS Computer Security Tutorial on Creating Certificates SSH Kerberos CPS 290Page 1.
1 Authentication Protocols Rocky K. C. Chang 9 March 2007.
Cryptography in the Real World Diffie-Hellman Key Exchange RSA Analysis RSA Performance SSH Protocol Page 1.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
9.2 SECURE CHANNELS JEJI RAMCHAND VEDULLAPALLI. Content Introduction Authentication Message Integrity and Confidentiality Secure Group Communications.
SECURITY. Security Threats, Policies, and Mechanisms There are four types of security threats to consider 1. Interception 2 Interruption 3. Modification.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Tutorial on Creating Certificates SSH Kerberos
Cryptographic Hash Function
Tutorial on Creating Certificates SSH Kerberos
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9
CDK: Chapter 7 TvS: Chapter 9
Chapter 8 roadmap 8.1 What is network security?
Presentation transcript:

Authentication and Authorization Authentication is the process of verifying a principal’s identity (but how to define “identity”?) –Who the person is –Or, what the person is Authorization is the process of determining whether a principal can perform certain actions –What the person can do –Typically based on authentication result 1

Authentication in Cyber Space Authentication based on what you know. –If you know a secret, then you are linked to an “identity” –The secret needs to be associated with the identity beforehand (authentication state) Authentication protocol is the process of proving that one knows the secret, a.k.a “credential.” 2

Simple Password Authentication User Name, Password /etc/shadow Authentication state 3

Password Verification Hash Function User-entered Password Password hash stored on file e.g. /etc/shadow H1 H1==H2? H2 OK FAIL Y N 4

Hash function and salt A “salt” is used to increase the input space of a hash function –Even though a cryptographic function H is hard to invert, if the number of possible inputs to H is small, a brute-force search can easily find the pre-image from a given hash –If we append the input string with a salt and apply H on the whole string, then the number of possible inputs to the hash function is increased S fold where S is the number of all possible salts. –For password hash, the salt is used to mitigate dictionary attack 5

What is a dictionary attack? Pre-compute the hash of commonly used passwords Looking up a password from the hash takes only constant time if the password falls into the dictionary 6

Password verification with salt Hash Function Password Salt, Hash on file e.g. /etc/shadow H1==H2? H2 OK FAIL Y N S 7 (S, H1)

Challenge-Response Protocol Objective: Bob (prover) convinces Alice (verifier) that he knows the secret, while not leaking the secret to anyone (including Alice) Threat model: insecure communication channel –Cryptographic primitives unbreakable –Attacker can do anything else: Intercept messages Replace messages Inject messages Re-order messages Encrypt/decrypt a message if he knows the keys 8

Challenge-Response Protocol General process –Verifier picks a challenge message and send it to prover. –Prover produces a response using the secret and sends the response back to the verifier –Verifier checks whether the response is valid Requirements –Protect Verifier: if Bob does not know the secret, the protocol shall fail –Protect Prover: the secret shall not be revealed in the process, not even to the verifier (computationally infeasible to infer) 9

Using MAC in authentication protocol Alice Bob Mallory Secret K m, MAC(m,K) m 10

Authentication based on symmetric encryption Alice Bob Mallory Secret key K 11

Authentication based on symmetric encryption Alice Bob Mallory Secret key K 12 m {m} K

Two-party authentication protocol based on public-key crypto Alice Bob Mallory Bob’s private key SK Bob’s public key PK … … 13

SSH public key-based authentication Secure channel {m} K pub H(m) H is a cryptographic hash function ~/.ssh/id_dsa Private key K priv (Passphrase-protected) Client (Bob) ~/.ssh/.authorized_keys Public key K pub Server (Alice) 14

SSH Public Key-based Authentication What is a secure channel? –Messages sent are encrypted by a shared secret key –Messages are authenticated using MAC –The SSH public key-based authentication is used by the server to authenticate the user at the other end of the secure channel –SSH also supports other kinds of authentication, such as password authentication, which needs a secure channel. This challenge-response protocol is better than asking the client to sign a challenge message –Server gains zero knowledge –The hash function is to protect the private key from a chosen-ciphertext attack 15

SSH Agent The private key must be protected by a passphrase. –The passphrase is used to generate a key to encrypt the private key stored in the file system. An SSH agent can load the private key into memory and perform the challenge- response protocol on behalf of the user. 16

Using SSH Agent Server (Alice) SSH Client SSH Agent ~/.ssh/id_dsa Client (Bob) SSH Server ~/.ssh/authorized_keys challenge c response r c r 17

Using SSH Agent SSH agent stores private keys in memory and performs crypto calculation –User only needs to enter passphrase when the agent retrieves the private key Communication between SSH client and agent mediated through file-system protection –An SSH client can only connect to an agent started by the same user, except for user root, who can connect to any user’s agent Advantage: user does not need to type in passphrase to decrypt the private key every time he wants to log in. 18

Agent Forwarding SSH Client SSH Agent ~/.ssh/id_dsa SSH Server r c c r SSH Client c r r c 19 Server (Alice) Client (Bob)

Agent Forwarding Alice can contact the SSH agent on Bob through the SSH channel if Bob allows his agent connection to be forwarded to Alice –SSH client on Alice becomes “man in the middle” –Useful when the user on Bob wants to login to other machines from Alice –root user can always connect to forwarded agents –Bob’s private key never leaves his machine; when Bob tears down the connection with Alice, root on Alice will no longer be able to impersonate Bob 20

Exercise after class Set up public key-based authentication using SSH agent for logging into departmental Linux machines (e.g., grad.csee.usf.edu). –Generate your public/private key pair –Upload your public key to the server –Figure out how to use SSH agent –Find a clever way to start/connect to your SSH agent 21