AUTHENTICATION AUTHENTICATION Authentication is the process by - - PowerPoint PPT Presentation

authentication authentication
SMART_READER_LITE
LIVE PREVIEW

AUTHENTICATION AUTHENTICATION Authentication is the process by - - PowerPoint PPT Presentation

SECURITY TOPICS PART 2 AUTHENTICATION AUTHENTICATION Authentication is the process by which you decide that someone is who they say they are and therefore permitted to access the requested resources: getting entrance to a computer lab


slide-1
SLIDE 1

AUTHENTICATION

SECURITY TOPICS PART 2

slide-2
SLIDE 2

AUTHENTICATION

Authentication is the process by which you decide that someone is who they say they are and therefore permitted to access the requested resources:

  • getting entrance to a computer lab
  • getting past the bouncer at the bar
  • logging into your web application
slide-3
SLIDE 3

AUTHORIZATION

Authorization defines what rights and privileges a user has

  • nce they are authenticated.
  • Authentication grants access
  • Authorization defines what the user with access can (and

cannot) do. The principle of least privilege is a helpful rule of thumb that tells you to give users and software only the privileges required to accomplish their work.

slide-4
SLIDE 4

AUTHENTICATION FACTORS

Authentication factors are the things you can ask someone for in an effort to validate that they are who they claim to be:

slide-5
SLIDE 5

AUTHENTICATION FACTORS

  • Knowledge factors are the things you know

Passwords, PIN, Challenge Question

  • Ownership factors are the things that you possess

Key, FOB, Card, Mobile Phone

  • Inheritance factors are the things you are

Fingerprint, signature, DNA, gait

slide-6
SLIDE 6

SINGLE FACTOR AUTHENTICATION

Single-factor authentication is the weakest and most common category of authentication system where you ask for only one of the three factors.

  • Know a password
  • Posses an access card
  • Fingerprint access on your mobile phone

When better authentication confidence is required, more than one authentication factor should be considered

slide-7
SLIDE 7

MULTI FACTOR AUTHENTICATION

Multifactor authentication is where two distinct factors of authentication must pass before you are granted access. The way we all access an ATM machine is an example of two-factor authentication:

  • you must have both the knowledge factor (PIN) and
  • the ownership factor(card)

Multifactor authentication is becoming prevalent in consumer products as well:

  • your cell phone is used as the ownership factor alongside
  • your pin as a knowledge factor.
slide-8
SLIDE 8

THIRD PARTY AUTHENTICATION

Let someone else worry about it…

Many popular services allow you to use their system to authenticate the user and provide you with enough data to manage your application. Third-party authentication schemes like OpenID and oAuth are popular with developers and are used under the hood by many major websites including Amazon, Facebook, Microsoft, and Twitter, to name but a few.

slide-9
SLIDE 9

OAUTH

OAuth uses four user roles:

  • The client is the application making requests on behalf of the

resource owner (e.g. Spotify).

  • The resource server is the place storing the user's information (e.g.

Facebook)

  • The resource owner is normally the end user who can gain access to

the resource (e.g. you).

  • The authorization server asks the user to approve or deny the
  • request. (e.g. also Facebook, but a separate service handling

authorization)

  • Once the user logs in to the authorization server and approves the

client, an access token is returned to the client

slide-10
SLIDE 10

OAUTH

slide-11
SLIDE 11

SECURE AUTHENTICATION

When a browser makes an initial attempt to communicate with a server over a secure connection, the server authenticates itself by providing a digital secure certificate. If the digital secure certificate is registered with the browser, the browser won’t display the certificate by

  • default. However, the user still has the option to view the

certificate.

slide-12
SLIDE 12

HTTP

  • With a regular HTTP connection, all data is sent as unencrypted

pain text.

  • If a hacker intercepts the data, it is easy to read.
  • To transmit data over a secure connection, an additional layer must

be used.

Secure Sockets Layer (SSL)

  • An older Internet protocol that allows for data transmission

between server and client through a secure connection

Transport Layer Security (TLS)

  • A newer protocol for transferring data via a secure connection.
  • Often referred to as SSL
slide-13
SLIDE 13

HTTPS

HTTPS is the HTTP protocol running on top of the Transport Layer Security (TLS). It’s easy to see from a client’s perspective that a site is secured by the little padlock icons in the URL bar used by most modern browsers. The browser encrypts data being sent to the server and the server then decrypts it The server encrypts data being sent to the browser and the browser then decrypts it

slide-14
SLIDE 14

HTTPS

slide-15
SLIDE 15

HTTPS

The certificate that is transmitted during the handshake is actually an X.509 certificate, which contains many details including the algorithms used, the domain it was issued for, and some public key information.

slide-16
SLIDE 16

A DIGITAL SECURE CERTIFICATE

slide-17
SLIDE 17

CERTIFICATE AUTHORITIES

A Certificate Authority (CA) allows users to place their trust in the certificate since a trusted, independent third-party signs it.

slide-18
SLIDE 18

CERTIFICATE AUTHORITIES

A W3Techs survey early 2020

SSL Strengths

  • Refers to the length of the

generated key that is created during encryption

  • Stronger security costs more

▪ 40-bit ▪ 56-bit ▪ 128-bit (typical SSL strength for collecting personal information) ▪ 256-bit

slide-19
SLIDE 19

HTTPS

Self-signed certificates provide the same level of encryption, but the validity of the server is not confirmed.

slide-20
SLIDE 20

URLS FOR SECURE CONNECTIONS

Request a secure connection: https://satoshi.cis.uncw.edu Return to a regular connection http:// satoshi.cis.uncw.edu

  • Requests must be full URLs
  • Once a secure connection is established, it will remain in

that mode until it is reverted.

slide-21
SLIDE 21

HTTPS

To use a secure connection on a page, redirect it by using the $_SERVER array. The $_SERVER array contains information about headers and paths, and its values are set by the web server.

Index Description HTTPS Returns a non-empty value if the current request is using HTTPS HTTP_HOST Returns the host for the current request REQUEST_URI Returns the Uniform Resource Identifier for the current page.

slide-22
SLIDE 22

THE $_SERVER ARRAY

A utility file to build an absolute URL using the $_SERVER array: $_SERVER['HTTP_HOST']= satoshi.cis.uncw.edu $_SERVER['REQUEST_URI']=/~abc1234/file.php

slide-23
SLIDE 23

REQUIRING A SECURE CONNECTION

require_once 'secure_conn.php';

  • Use on any pages that contain sensitive information

particularly registration and login

slide-24
SLIDE 24

REVERTING TO HTTP

require_once 'reg_conn.php';

  • After a user has logged out for example
  • Note: There is no $_SERVER['HTTP'] value
slide-25
SLIDE 25

<?php // make sure the page uses a secure connection $https = filter_input(INPUT_SERVER, 'HTTPS'); if (!$https) { $host = filter_input(INPUT_SERVER, 'HTTP_HOST'); $uri = filter_input(INPUT_SERVER, 'REQUEST_URI'); $url = 'https://' . $host . $uri; header("Location: " . $url); exit(); } ?>

THE $_SERVER ARRAY

A utility file to build an absolute URL using the $_SERVER array:

$_SERVER['HTTP_HOST']=webdev.cislabs.uncw.edu $_SERVER['REQUEST_URI']=/~abc1234/file.php

slide-26
SLIDE 26

The Remaining Slides Contain Additional Optional Information about Cryptography

IN CASE YOU ARE INTERESTED...

slide-27
SLIDE 27

CRYPTOGRAPHY

Being able to send a secure message has been an important tool in warfare and affairs of state for centuries. At a basic level we are trying to get a message from one actor (we will call her Alice), to another (Bob), without an eavesdropper (Eve) intercepting the message. Since a single packet of data is routed through any number of intermediate locations on its way to the destination, getting your data (and passwords) is as simple as reading the data during one

  • f the hops unless you use cryptography.
slide-28
SLIDE 28

CRYPTOGRAPHY

The problem

slide-29
SLIDE 29

CRYPTOGRAPHY

The goal

slide-30
SLIDE 30

CRYPTOGRAPHY

A cipher is a message that is scrambled so that it cannot easily be read, unless one has some secret key. The key can be a number, a phrase, or a page from a book. What is important in both ancient and modern cryptography is to keep the key a secret between the sender and the receiver.

Some key terms

slide-31
SLIDE 31

CRYPTOGRAPHY

A substitution cipher is one where each character of the

  • riginal message is replaced with another character

according to the encryption algorithm and key.

  • Caesar
  • Vigenère
  • One Time Pad
  • Modern Block Ciphers

Substitution ciphers

slide-32
SLIDE 32

CAESAR

The Caesar cipher, named for and used by the Roman Emperor, is a substitution cipher where every letter of a message is replaced with another letter, by shifting the alphabet over an agreed number (from 1 to 25). The message HELLO, for example, becomes KHOOR when a shift value of 3 is used

Substitution ciphers

slide-33
SLIDE 33

THE PROBLEM WITH LOUSY CIPHERS

The frequency of letters (and sets of two and three letters) is well known If you noticed the letter J occurring most frequently, it might well be the letter E

Letter distribution is not flat

slide-34
SLIDE 34

THE PROBLEM WITH LOUSY CIPHERS

Any good cipher must therefore try to make the resulting cipher text letter distribution relatively flat so as to remove any trace of the telltale pattern of letter distributions. Simply swapping one letter for another does not do that, necessitating other techniques.

Letter distribution is not flat

slide-35
SLIDE 35

VIGENÈRE

The Vigenère cipher, named for the sixteenth-century cryptographer, uses a keyword to encode a message. The key phrase is written below the message and the letters are added together to form the cipher text as illustrated.

Early attempt to flatten letter distribution of ciphers

slide-36
SLIDE 36

ONE TIME PAD

The one-time pad refers to a perfect technique of cryptography where Alice and Bob both have identical copies

  • f a very long sheet of numbers, randomly created

Claude Shannon famously proved that the one-time pad is impossible to crack However, it is impractical to implement on a large scale and remains a theoretical benchmark that is rarely applied in practice.

Vigenère with an infinitely long key

slide-37
SLIDE 37

MODERN BLOCK CIPHERS

Block ciphers encrypt and decrypt messages using an iterative replacing of a message with another scrambled message using 64 or 128 bits at a time.

  • The Data Encryption Standard (DES) and its replacement,
  • The Advanced Encryption Standard (AES)

are two-block ciphers still used in web encryption today.

Ciphers in the computer age

slide-38
SLIDE 38

DES ILLUSTRATION

Pretty simple, no?

slide-39
SLIDE 39

SYMMETRIC KEY PROBLEM

All of the ciphers covered thus far use the same key to encode and decode, so we call them symmetric ciphers. The problem is that we have to have a shared private key. How?

  • Over the phone?
  • In an email?
  • Through the regular mail?
  • In person?

How to exchange the key?

slide-40
SLIDE 40

PUBLIC KEY CRYPTOGRAPHY

Public key cryptography (or asymmetric cryptography) solves the problem of the secret key by using two distinct keys:

  • a public one, widely distributed
  • another one, kept private

Algorithms like the Diffie-Hellman key exchange allow a shared secret to be created out in the open, despite the presence of an eavesdropper

Solves the problem of key exchange

slide-41
SLIDE 41

PUBLIC KEY ENCRYPTION

A good explanation:

https://medium.com/@vrypan/explaining-public-key-cryptography-to-non- geeks-f0994b3c2d5

slide-42
SLIDE 42

DIGITAL SIGNATURES

A digital signature (not to be confused with a digital certificate) is a mathematically secure way of validating that a particular digital document was

  • created by the person claiming to create it (authenticity),
  • Was not modified in transit (integrity),
  • and cannot be denied (non-repudiation).

Confirming the sender is authentic

slide-43
SLIDE 43

DIGITAL SIGNATURES

A digital signature is a mathematically secure way of validating that a particular digital document was

  • created by the person claiming to create it (authenticity),
  • Was not modified in transit (integrity),
  • and cannot be denied (non-repudiation).

The process of signing a digital document can be as simple as encrypting a hash of the transmitted message.

Confirming the sender is authentic

slide-44
SLIDE 44

DIGITAL SIGNATURES

Confirming the sender is authentic