hima 4160 fall 2009 privacy, confidentiality and security cryptography public key infrastructure ...

46
HIMA 4160 Fall 2009

Upload: ginger-oneal

Post on 16-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

HIMA 4160Fall 2009

Page 2: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Privacy, Confidentiality and Security Cryptography Public Key Infrastructure PKI application

Page 3: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application
Page 4: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

vs

Page 5: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Authentication

Authorization

Access Control

Audit

Page 6: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Authentication

Authorization Audit Access

Control

Page 7: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Authentication

Authorization Audit Access

Control

Page 8: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Privacy Rules◦ Rules for protecting patients privacy

Security Rules◦ Measures for enforce security of patients

information◦ Only for electronic health information

Page 9: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Source: HIPAA Academy

Page 10: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application
Page 11: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Cryptology: the science concerned with data communication and storage in secure and usually secret form. It encompasses both cryptography and cryptanalysis

Cryptography: the science of transforming information into a form that is impossible or infeasible le to duplicate or undo without knowledge of a secret key

Cryptanalysis: the science (and art) of recovering or forging cryptographically secured information without knowledge of the key.

Page 12: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Encryption

Decryption

Cryptography

Page 13: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application
Page 14: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Algorithm using

keysPlain Text Ciphertext

IBM 1 HAL

Page 15: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Algorithm using keys

Plain Text Ciphertext

IBM 1 HAL

Page 16: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Keys are just mathematically large number

Symmetric -- use the same key for both encryption and decryption

Page 17: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Transposition

Algorithm – computing methods to combine keys and plain text to make it indecipherable

for people without the key

Substitution

Page 18: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Encryption

Decryption

Pla

inte

xt

Cip

hert

ext

Keyand encryption algorithm

Page 19: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

The adventure of the dancing men http://www.citsoft.com/holmes/return/dancing.men.txt

Page 20: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Example using the Data Encryption Standard (DES)

On a computer…

$> des -e “Mary had a little lamb” output.desEnter key: oucskeyEnter key again: oucskey$>

The result:$> cat output.des!¢ðuýåćßÞf 謶׀ עжТφẸỆ≈∞▪ري$>

Page 21: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Example using the Data Encryption Standard (DES) continued…

$> des -d output.des text.desEnter key: oucskeyEnter key again: oucskey$>cat text.desMary had a little lamb$>

To decrypt:

Page 22: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Example using the Data Encryption Standard (DES) continued…

$> des -d output.des text.desEnter key: oucsquayEnter key again: oucsquay

Corrupted file or wrong key$>cat text.desuýåćß#¬`謶׀ φẸỆעжТ עжТ$>

Trying to decrypt with the wrong key:

Page 23: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

How safe are encryption algorithms anyway?

Example using (DES) continued…

Attacking a cipher

What about a ‘brute force’ attack?i.e. ‘guessing’ at the key “oucskey”DES algorithm has a 56-bit key. Therefore, there are 256 = 72,057,594,037,900,000 different keys834 days at a billion keys per secondBut for a typed key, effectively 83 days

Page 24: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

How safe are encryption algorithms anyway?◦Established algorithms should remain

sound

◦Safety is dependent on key length, the longer, the safer

Attacking a cipher

Page 25: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application
Page 26: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

So you have to have the same key as your correspondent – is that a problem?

◦How do you send the key safely?

◦Do I try to exchange keys before I communicate?

How many keys will I need to communicate with everyone?

◦You need a key for everyone!

Some issues

Page 27: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Whitfield Diffie and Martin Hellman (1975)

Ellis and Cox (1973) A key pair is constructed using some

complicated maths (the keys are not the same)

Each party has two keys (public and private)

Anything encrypted with key1 can only be decrypted with key2

Page 28: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Decryption

Pla

inte

xt

Cip

hert

ext

Encryption

Key 1 andencryption algorithm

Page 29: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Pla

inte

xt

Cip

hert

ext

Encryption

Key 1 andencryption algorithm

If Key 1 = private, Key2 must be corresponding publicIf Key 1 = public, Key2 must be corresponding private

Key 2 andencryption algorithm

Decryption

Page 30: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Keys exist in pairs◦Keep one private (very secret) and 'publish'

one

◦Public keys can exist on certificates

Encryption can be done by either key◦If it is your key pair, you can use the private

key

◦Anyone else can use the public key to encrypt something

Page 31: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Demonstration

Public key

Private key

22

Complexmaths!

Page 32: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Extremely secret! If you send something encrypted by a

private key, it can be read by everyone, but they know it came from you.◦Authentication

Page 33: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Not at all secret!◦Widely available, but must be trusted

◦May be supplied as part of a certificate If you send something using a public

key, it can only be read by the entity to which it is addressed.◦Secure communications

e.g. SSL

Page 34: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Someone can use a public key to prove their identity to me◦but only if I trust that public key

So if someone I trusted endorsed (signed) that public key◦hold that thought for a moment - we’ll come

back to this...

Page 35: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application
Page 36: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Asymmetric keys can be used to sign things◦encrypt a bit of text with your private key

(can be attached 'securely' to the 'document')

◦people can de-crypt it with the public key and know that it was signed by you

What?…

Page 37: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

You need to know something about hashes…

Message digests or one way hash functions distil the information contained in a file (very small or very large) into a single large number (usually between 128 and 256 bits in length)

So, you can actually add the hash value to the file somehow and then sign (or encrypt) that hash value with your private key.

Page 38: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

HASH

Append

Page 39: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

=

Page 40: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Put that public key on a certificate

Get someone you trust to sign the certificate◦If the certificate is tampered with, the

signature is broken

Organizations who sign public keys/certificates are called Certification Authorities (CA)

Page 41: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

You create a key pair Put one key of the pair on a certificate

(which one?) Send the certificate (request) to the CA Present yourself or identify yourself to

the Registration Authority (RA) The RA tells the CA that you are OK The CA sends you the signed certificate

Page 42: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Now you have a signed certificate, people and services can trust that you are who you say you are

Present your certificate to a service

Tell them something encrypted by your private key

They like your certificate and know it is you

Page 43: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

You keep your private key very secret◦Obey the rules for this!

Your public key is on the certificate

Services must trust the CA

Your certificate will have an expiry date◦after which you may have to re-visit the RA

Your certificate can be revoked at any time

Page 44: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application
Page 45: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Asymmetric encryption = public/private keys

Symmetric encryption is faster◦but how do you deliver the keys

Asymmetric encryption is used widely in internet communications◦Secure Sockets Layer, very common

Also used in client authentication(less common, at the moment)

Page 46: HIMA 4160 Fall 2009  Privacy, Confidentiality and Security  Cryptography  Public Key Infrastructure  PKI application

Use PGP to Send Encrypted File