- Slides: 38
COMP 2113 E-business Richard Henson University of Worcester April 2008
Week 8: Encryption n Objectives: Ø Explain the legal position as regards reading other people’s email Ø Describe a simple mathematical operation that could encrypt a text message Ø Explain the differences between symmetric and asymmetric encryption Ø Apply public-private key encryption to the sending of Internet email Ø Explain why digital signatures are necessary in the real world, and how they can be implemented n Definition: “The translation of data into a secret code”
Why is it necessary to change email data into Secret Codes? The Internet is an “open” system” n Data on the Internet could be intercepted by: n Øsomeone with a good knowledge of TCP/IP Øany IT literate person with the appropriate software n This person could be anywhere in the world!
Privacy of Electronic Mail – The Law n n n When people send mail (Her Majesty’s mail), it is assumed that no-one will look at it “en route” It is a criminal offence to do so Like “snail mail”, email communications should be treated as private or confidential It is a criminal act to look at a person’s private email without permission (Computer Misuse Act, 1990) Email messages at work are more of a grey area, but considered to be the property of the employer… and therefore NOT so private…
Privacy of Electronic Mail – Crime Prevention n n Just because something is illegal, doesn’t mean that people will not try to do it! Especially if they don’t think they will get caught! If the email data is “scrambled” in some way before sending, it doesn’t matter who gets hold of it – they will not be able to understand the message unless they can “unscramble” it Scrambling the data is encryption Recovering the scrambled data is decryption
How does Encryption work? n Data sent over the Internet is generally a sequence of ASCII codes Ø An ASCII code is simply a way of converting a keyboard character into a binary number n n Encryption works by further coding each ASCII character in some reversible way before it is sent Encryption normally uses: Ø a coding method (often a mathematical operation) Ø a numerical value used with the coding method n The ASCII codes can always be recovered by someone who knows the encryption method
Simple Encryption Example algorithm based on a mathematical operation such as ADD operating n key based on a numerical digit (e. g 5) n Data represented by an ASCII code n Algorithm + key produce encrypted data n
Encryption Keys The key must be kept secret – anyone with access to the key and the algorithm can decrypt any encrypted data produced with that combination n The coding method and the key used to produce cipher text must be known in order to get back the plain text n
Simple example of an Encryption Method n n Method of encryption – add 5 to each ASCII code (this would be the key) e. g. if plain text = HELLO (ASCII codes 48 45 4 B 4 B 4 F) Cipher text would be MJQQT (ASCII codes 4 D 4 A 50 50 54) Getting the original data back would mean subtracting 5 from each ASCII character – very easy to anyone with access to the key
Diagram – single key encryption server Message is decoded Message is coded key User sends message via server Message is received Data is transmitted to another server
Effectiveness of Encryption n During WWII, most countries communicated with their armed forces by radio. Ø To avoid being intercepted, they used single key encryption Ø However… encryption can only be effective if: » either the key remains secret » Or the algorithm remains secret n The Germans thought they had an encryption method that had a key so complex it was impossible to decipher
Alan Turing and Bletchley Park n n Alan Turing was a tragic genius who did more than most to win the war With the efforts of fellow mathematicians, Colossus, the worlds first computer and 10000 support staff at Bletchley Park, now Milton Keynes… Ø the key and algorithm were deciphered Ø all of the German messages were decrypted so all their troop movements were known
Encryption Techniques n n Many techniques have been developed since the 1960 s to enable digital data to be efficiently encrypted and decrypted Examples: Ø DES (Data Encryption Standard) Ø IDEA Ø RSA Ø Diffie-Hellmann n Encryption types can be classified into two types: Ø Symmetric Key Ø Asymmetric Key
Symmetric Encryption n n Sender and receiver share a single, common key – known as a symmetric key Used both to encrypt and decrypt the message Advantages: simpler and faster than other systems Disadvantages: Ø the two parties must need to exchange the key in a secure way Ø the sender cannot easily be authenticated
DES – an example of symmetric encryption n n The most popular symmetric key system is the Data Encryption Standard – US gov, 1977 DES uses 56 -bit encryption working on 64 -bit blocks of data In view of recent research, this is clearly inadequate for really secure encryption Until relatively recently, however, it served a useful purpose
Making Encryption as Effective as Possible n The more complex the key, the more difficult the encryption method is to decipher ØA single 40 -digit key can be mathematically deduced very quickly using a computer ØAn equivalent 128 -digit key would take much longer to “crack” n It therefore makes sense to use 128 -digit key encryption….
Breaking an Encryption Technique n n Usually achieved with the aid of very powerful computers The more powerful the computer, the more likely that the key can be mathematically deduced Until fairly recently, a 128 -bit encryption key would have been considered to be secure However, a research team have now succeeded in breaking 128 bit encryption in seconds, using a supercomputer…
Secure Keys for Today and Tomorrow… n 256 -bit encryption is probably now a minimum for single key encryption Ø but only a matter of time… n 512 -bit encryption is currently used by financial institutions to transfer funds electronically via the Internet Ø again, only a matter of time before even this can be cracked… Ø Solution - 1024 bit keys?
Asymmetric Encryption n This technique uses TWO keys, one of which remains private, and a digital certificate to authenticate the sender The other key is public – hence the term Public Key (PKE) This system was actually first invented by some British scientists working at GCHQ Ø but it was top secret Ø And wasn’t published… Ø and in 1976 someone else got the fame…
What is Public Key Encryption (PKE) n n Announced to the world in 1976 by two Americans: Diffie and Hellman… Uses two keys: Ø public key - known to everyone Ø private or secret key - known only to the recipient of the message n Example: John wants to send a secure message to Jane… Ø He uses Jane's public key to encrypt the message Ø Jane then uses her private key to decrypt it
Public Key Encryption can work in two ways: • private key encryption, public key decryption • public key encryption, private key decryption Unencrypted data Private key on sender’s computer Encrypted data Data sent through the Internet Encrypted data Received by recipient’s computer Public key on recipient computer Decrypted data
Public Key Encryption n The public and private keys must be related in such a way that Ø only the public key can be used to encrypt messages Ø only the corresponding private key can be used to decrypt them. n n In theory it is virtually impossible to deduce the private key if you know the public key PKE is also called asymmetric encryption because of the two quite different keys that need to be used
PGP (Pretty Good Privacy) n System of PKE developed by Philip Zimmerman Ø official repository held at the Massachusetts Institute of Technology n PGP became one of the most common ways to protect messages on the Internet: Ø effective Ø easy to use Ø free… n To encrypt a message using PGP, a software encryption package was required Ø Zimmerman made it available for free download from a number of Internet sources…
PGP and US Govt PGP was so effective as an encryption tool that the U. S. government actually brought a lawsuit against Zimmerman! n Case n Øhe had made PGP public and hence made it available to enemies of the U. S. n After a public outcry, U. S. lawsuit was dropped Østill illegal to use PGP in many countries
Public Key Infrastructure (PKI) n Developed for the Internet as a series of RFCs Øresponse to concern about security of data on the Internet n Concerned with authentication as well as security Øintended to be simple to use… n Provided a system for storage and display of message recipient's public key Øthis was essential to decrypt a message sent and received using PKE
The Public Key Repository n What was needed: Ø central registry of public keys and digital signatures Ø must be readily accessible via the Internet Ø must provide authentication, otherwise ANYONE could have sent that message… n Achieved through LDAP (Lightweight Directory Access Protocol) Ø enables public key lookup to occur completely transparently (without any intervention from any user…)
Lightweight Directory Access Protocol (X 509 standard) n n n Based on International X 500 communications standard Supports TCP/IP Allows almost any application running on any computer platform to obtain on-line or downloaded directory information: Ø e-mail addresses Ø public keys
Authentication n About verifying that the person sending a message or web form really is who he or she claims to be It may also provide the receiver with the means to encode a reply In paper correspondence, authentication is provided by a signature Ø In digital correspondence it needs to be a series of 000’s and 111’s (abbreviated to hexadecimal)
Digital Certificates n Attachments to electronic messages used for security purposes ØThe “digital signature” authenticates the sender n Anyone wishing to send an encrypted message applies for a digital certificate from a Certificate Authority (CA) Øe. g. Verisign
Good/Bad things about Digital Signatures/Digital-Ids… n The digital certificate that provides the identification information must be kept very safe… Ø usually kept carefully hidden as a unique 'security code‘ Ø appended to an electronic document for the purpose of establishing the authenticity of that document Ø can even be used for tax returns & legal documents… n BUT…. once someone has acquired another person’s digital identity, they can masquerade as that person all over the Internet…
Certificate Authorities n Trusted third-party organizations that issues the digital certificates used to create public-private key pairs n The role of the CA is to guarantee that the individual granted the unique certificate is, in fact, who he or she claims to be.
Certificate Authorities (cont…) n n n Usually, this means that the CA has an arrangement with a financial institution, such as a credit card company The finance company provides it with information to confirm an individual's claimed identity CAs are a critical component in data security and e-commerce because they guarantee that the two parties exchanging information really are who they claim to be
SOME Certificate Authorities in the UK BT Trustwise (Verisign International Affiliate) n The Global Trust Register n Inter Clear n True. Trust (Salford University) n Globalsign UK (Globalsign Network) n Viacode (Royal Mail CA) n Mondex International n
Supplying Digital Certificates n n On request, a CA can produce an encrypted digital certificate for any applicant Digital certificates contain: Ø the applicant's private key Ø a digital signature n n The CA makes its own public key readily available on the Internet The recipient of the encrypted message can use the CA's public key to decode the digital certificate attached to the message
Digital Certificate (continued) n The recipient: Øverifies the digital signature as issued by the CA Øobtains the sender's public key and digital signature held within the certificate With this information, the recipient can send an encrypted reply n This procedure relies on the integrity of the CA, and the user must be able to trust them n
Digital Signatures – the future? n Digital signatures already have a legal definition: Ø “an electronic rather than a written signature that can be used by someone to authenticate the identity of the sender of a message or of the signer of a document” n Online delivery of traditionally paper based correspondence has been a reality for some time… Ø the Electronic Signatures Regulations 2002 http: //www. opsi. gov. uk/SI/si 2002/20020318. htm
Encryption in Client-Server Systems n n Much more about this in COMP 3123 Depend on the use of Ø SSL (Secure Sockets Layer) » invented by Netscape » Became part of the PKI Ø https (secure http) » also specified to become part of the PKI n Together, SSL and https make Server Certificates possible
Why Server Certificates? n Anyone can set up a web server and put it on the Internet Ø an Internet user on the other side of the world doesn’t have a clue whether they are crooked!!! Ø not good for on-line selling & buying! n Server certificates can give an Internet vendor respectability Ø Certificates only supplied to “honest” organisations Ø But… how can the certificate authorities tell? ? ?