Email Security Email Security Email is one of

  • Slides: 48
Download presentation
Email Security

Email Security

Email Security • Email is one of the most widely used and regarded network

Email Security • Email is one of the most widely used and regarded network services • Currently message contents are not secure – May be inspected either in transit – Or by suitably privileged users on destination system

Email Security Services • Privacy – Keep anyone but the recipient from reading the

Email Security Services • Privacy – Keep anyone but the recipient from reading the message. • Authentication – Receiver is reassured of the identity of the sender. • Integrity – Receiver is reassured that the message has not been altered since transmission by sender.

Email Security Services • Non-repudiation – Ability of recipient to prove (to a third

Email Security Services • Non-repudiation – Ability of recipient to prove (to a third party) that the sender really did send this message. – A. k. a. third party authentication.

Email Security Services • Proof of submission – Verification given to the sender that

Email Security Services • Proof of submission – Verification given to the sender that the message was handed to the mail delivery system. – Not the same as a receipt by recipient / proof of delivery. – Possible to prove the identity of the message.

Email Security Services • Proof of Delivery – Verification given to the sender that

Email Security Services • Proof of Delivery – Verification given to the sender that the message was handed to the UA of the recipient. – Not the same as proof of submission. – Possible to prove the identity of the message.

Email Security Services • Message flow confidentiality. – Third party cannot tell whether email

Email Security Services • Message flow confidentiality. – Third party cannot tell whether email is exchanged between sender and recipient. • Anonymity – The ability to send a message so that the receiver cannot tell the identity of the recipient.

Email Security Services • Containment – Ability of the network to keep security levels

Email Security Services • Containment – Ability of the network to keep security levels of information from leaking out of a particular region. • Audit – Capacity to log security relevant events. • Accounting – Capacity to maintain system usage statistics and charge individual users.

Email Security Services • Self Destruct – User should not be capable of forwarding

Email Security Services • Self Destruct – User should not be capable of forwarding or storing the message. • Message Sequence Integrity – Reassurance that an entire sequence of messages arrived in the order transmitted and without losses.

Key Establishments • Establishing Public Keys: – Out-of-band transmission • PGP public key hash

Key Establishments • Establishing Public Keys: – Out-of-band transmission • PGP public key hash on business card. – PKI – Piggy-backing of certificates on email messages. • Establishing Secret Keys – Out-of-band transmission – Ticket via KDC. • Alice would obtain a ticket for Bob and attach it to her message to him.

Privacy • Threats – Eavesdropping. – Relay nodes might store messages. • In fact,

Privacy • Threats – Eavesdropping. – Relay nodes might store messages. • In fact, many relay nodes log messages completely. – Fundamentally, at sender and receiver’s machine. • Email there is not in transit and not protected by the Electronic Communications Privacy Act.

Privacy • End-to-End Privacy – Sender and recipient use encryption. – Complicated by multiple

Privacy • End-to-End Privacy – Sender and recipient use encryption. – Complicated by multiple recipients. – Keys should be only used sparingly to avoid cipher attacks. • Alice chooses a secret key S. • Alice encrypts S with the key she shares with each recipient. To: Bob, Carol, Dexter From: Alice Key-info: Bob 98932472138, Carol 129834298732, Dexter 100231098432 Message: qewroiu 3219087 v 90(87 sdh 32198 y*&97 slknseiahfusdfiu 39587(*

Privacy • With Distribution List Exploders – Remote exploding: • Alice chooses a secret

Privacy • With Distribution List Exploders – Remote exploding: • Alice chooses a secret key S and encodes her message. • Alice attaches S encrypted to all recipients. • Distribution list exploder decodes S and attaches it encrypted to all recipients. – Remote exploder knows the contents. – Local exploding: • Alice needs to exchange keys with all people on the list.

Source Authentication • With Public Key Technology – Alice can sign a message to

Source Authentication • With Public Key Technology – Alice can sign a message to Bob • By encrypting the whole message with her private key. – Then Bob would have to know Alice’s public key. – Alice could embed her public key in the message together with a certificate or certificate chain. • By calculating a hash (MD 5) of the message and encrypting it with her private key. – Then Bob does not need to know Alice’s public key to read the mail.

Source Authentication • With secret key technology – Alice and Bob share a secret

Source Authentication • With secret key technology – Alice and Bob share a secret S. – She can prove her identity by performing a computation on the message using S. – Result called • MIC – Message Integrity Code • MAC – Message Authentication Code. – Various methods: • MAC is the CBC residue of the message encrypted with S. • MAC is the encryption of the MD 5 of message. – Then Alice only needs to repeat the encryption for various recipients.

Source Authentication • With Distribution Lists – Public Keys: Easy. • Anyone can get

Source Authentication • With Distribution Lists – Public Keys: Easy. • Anyone can get Alice’s public key. – Secret Keys: Hard. • Alice needs to share a key with the distribution list exploder. • Exploder will have to recalculate authentication data. • E. g. recalculate the encrypted hash with the recipients key.

Message Integrity • Without Source Authentication – Why? • With Source Authentication – Included

Message Integrity • Without Source Authentication – Why? • With Source Authentication – Included if we calculate the authenticator from the complete message.

Repudiation • Repudiation = Act of denying that a message was sent. • Public

Repudiation • Repudiation = Act of denying that a message was sent. • Public Key Technology • Alice signs with her private key. • Bob can prove that Alice signed it. – Hence non-repudiation. – Alice picks secret key S. – She encrypts S with Bob’s public key: {S}Bob. – She signs {S}Bob with her private key: [{S}Bob]Alice – She uses S to compute a MAC for the message. – She sends the message, the MAC, and [{S}Bob]Alice to Bob. • Bob knows that the message came from Alice because of Alice’s private key. • Bob can create any other message with S, therefore, he cannot prove that Alice send him that particular message. – Hence repudiation.

Repudiation • Secret Key Technology with non-repudiation – Needs a notary N. • Alice

Repudiation • Secret Key Technology with non-repudiation – Needs a notary N. • Alice sends message to Bob first to N with source authentication. • Notary creates a seal. – Seal is something based on the message and Alice’s name with a secret key that N does not share. » For example, encryption of message digest and Alice’s name. • Bob needs to be able to verify the seal. – If Bob and N share a key, then N could verify the seal by sending an encryption of the message digest, Alice’s name, and the seal. – Bob asks N to verify the seal. • Bob can prove that Alice sent this message. – Hence non-repudiation.

Proof of Submission / Delivery • Email system can generate proof of receiving a

Proof of Submission / Delivery • Email system can generate proof of receiving a message at any way station. – By handing out “seals” of sent messages.

Message Flow Confidentiality • • Needs an intermediary. Alice sends her email to Ivy,

Message Flow Confidentiality • • Needs an intermediary. Alice sends her email to Ivy, who forwards it to Bob. Alice periodically sends fake messages to Ivy periodically sends fake messages to random recipients.

Anonymity • Needs anonymity server. • Freely available, but have difficulty with business model.

Anonymity • Needs anonymity server. • Freely available, but have difficulty with business model.

Containment • Partition network into pieces that are capable of handling security classes. •

Containment • Partition network into pieces that are capable of handling security classes. • Mark each message with its security classification. • Routers honor security rules. – I. e. , refuse to forward to parts of a network not cleared for the security class of the message.

Text Formatting Issues • No canonical text format – RFC 822 provides one format

Text Formatting Issues • No canonical text format – RFC 822 provides one format with <cr><lf> characters to separate lines. • But only works with SMTP. – Some mail servers remove white space at the end of lines, add line breaks to lines that are too long, etc. – This can break hashes and other MACs • Data needs to be disguised as text. – uuencode • Uses 64 safe characters. • Data is encoded in these 64 characters – 6 bits encoded in 8 bits – S/MIME, PEM, PGP do something similar • The result is not readable by humans.

Verifying dates • Preventing Backdating – Use a notary to verify messages. • •

Verifying dates • Preventing Backdating – Use a notary to verify messages. • • Calculate MD 5 of received message. Send MD 5 to notary. Notary creates an encryption of MD 5 and date. Can include certificates used to establish sender’s identity. • Preventing Postdating – Include something in the message that you could only have known at the time that the message was sent.

Email Security Enhancements • Confidentiality – Protection from disclosure • Authentication – Of sender

Email Security Enhancements • Confidentiality – Protection from disclosure • Authentication – Of sender of message • Message integrity – Protection from modification • Non-repudiation of origin – Protection from denial by sender

Pretty Good Privacy (PGP) • • • Widely used to secure email Developed by

Pretty Good Privacy (PGP) • • • Widely used to secure email Developed by phil zimmermann Selected best available crypto algorithms to use Integrated into a single program On unix, PC, macintosh and other systems Originally free, now also have commercial versions available

PGP Operation–Authentication 1. Sender creates message 2. Use SHA-1 to generate 160 -bit hash

PGP Operation–Authentication 1. Sender creates message 2. Use SHA-1 to generate 160 -bit hash of message 3. Signed hash with RSA using sender's private key, and is attached to message 4. Receiver uses RSA with sender's public key to decrypt and recover hash code 5. Receiver verifies received message using hash of it and compares with decrypted hash code

PGP Operation–confidentiality 1. Sender generates message and 128 -bit random number as session key

PGP Operation–confidentiality 1. Sender generates message and 128 -bit random number as session key for it 2. Encrypt message using CAST-128 / IDEA / 3 DES in CBC mode with session key 3. Session key encrypted using RSA with recipient's public key, & attached to msg 4. Receiver uses RSA with private key to decrypt and recover session key 5. Session key is used to decrypt message

PGP Operation–Confidentiality & Authentication • Can use both services on same message – Create

PGP Operation–Confidentiality & Authentication • Can use both services on same message – Create signature & attach to message – Encrypt both message & signature – Attach RSA/elgamal encrypted session key

PGP Operation – Compression • By default PGP compresses message after signing but before

PGP Operation – Compression • By default PGP compresses message after signing but before encrypting – So can store uncompressed message & signature for later verification – & Because compression is non deterministic • Uses ZIP compression algorithm

PGP Operation – Email Compatibility • When using PGP will have binary data to

PGP Operation – Email Compatibility • When using PGP will have binary data to send (encrypted message etc) • However email was designed only for text • Hence PGP must encode raw binary data into printable ASCII characters • Uses radix-64 algorithm – Maps 3 bytes to 4 printable chars – Also appends a CRC • PGP also segments messages if too big

PGP Operation – Summary

PGP Operation – Summary

PGP Session Keys • Need a session key for each message – Of varying

PGP Session Keys • Need a session key for each message – Of varying sizes: 56 -bit DES, 128 -bit CAST or IDEA, 168 -bit triple-des • Generated using ANSI X 12. 17 mode • Uses random inputs taken from previous uses and from keystroke timing of user

PGP Public & Private Keys • Since many public/private keys may be in use,

PGP Public & Private Keys • Since many public/private keys may be in use, need to identify which is actually used to encrypt session key in a message – Could send full public-key with every message – But this is inefficient • Rather use a key identifier based on key – Is least significant 64 -bits of the key – Will very likely be unique • Also use key ID in signatures

PGP Message Format

PGP Message Format

PGP Key Rings • Each PGP user has a pair of keyrings: – Public-key

PGP Key Rings • Each PGP user has a pair of keyrings: – Public-key ring contains all the public-keys of other PGP users known to this user, indexed by key ID – Private-key ring contains the public/private key pair(s) for this user, indexed by key ID & encrypted keyed from a hashed passphrase • Security of private keys thus depends on the passphrase security

PGP Message Generation

PGP Message Generation

PGP Message Reception

PGP Message Reception

PGP Key Management • Rather than relying on certificate authorities • In PGP every

PGP Key Management • Rather than relying on certificate authorities • In PGP every user is own CA – Can sign keys for users they know directly • Forms a “web of trust” – Trust keys have signed – Can trust keys others have signed if have a chain of signatures to them • Key ring includes trust indicators • Users can also revoke their keys

Web Reference • https: //www. youtube. com/watch? v=4 ba 0 K-Dho. Go

Web Reference • https: //www. youtube. com/watch? v=4 ba 0 K-Dho. Go

S/MIME (Secure/Multipurpose Internet Mail Extensions) • RFC 822 defines format for text messages sent

S/MIME (Secure/Multipurpose Internet Mail Extensions) • RFC 822 defines format for text messages sent using e-mail • MIME deals with shortcomings. – SMTP cannot transmit executable or other binary data. (But UNIX users can use uuencode / uudecode. ) – SMTP text is confined to the 128 7 -bit ASCII characters. – SMTP servers can limit the size of email. – Not all SMTP implementations adhere completely to the SMTP standard. Problems are with the treatment of carriage return and linefeeds, truncating or wrapping lines longer than 76 characters, padding lines, and conversion of tab characters. • Have S/MIME support in many mail agents • Eg MS outlook, mozilla, mac mail etc

S/MIME • Mime introduces five new headers: – MIME-Version: • – Content-Type: • –

S/MIME • Mime introduces five new headers: – MIME-Version: • – Content-Type: • – Indicates the type of transformation that has been used to represent the body of the message in order to render it amenable to the mail tranport. Content-ID: • – Describes the data contained in the body so that the receiver can pick the appropriate application to represent the data to the user. Content-Transfer-Encoding: • – This field must have a parameters value of 1. 0 to indicate that the message conforms to RFC 2045 and 2046. Used to identify MIME entities. Content-Description: • A text description of the object within the body, e. g. audio-data.

S/MIME Functions • Enveloped data – Encrypted content and associated keys • Signed data

S/MIME Functions • Enveloped data – Encrypted content and associated keys • Signed data – Encoded message + signed digest • Clear-signed data – Cleartext message + encoded signed digest • Signed & enveloped data – Nesting of signed & encrypted entities

S/MIME Cryptographic Algorithms • • Digital signatures: DSS & RSA Hash functions: SHA-1 &

S/MIME Cryptographic Algorithms • • Digital signatures: DSS & RSA Hash functions: SHA-1 & MD 5 Session key encryption: elgamal & RSA Message encryption: AES, triple-des, RC 2/40 and others • MAC: HMAC with SHA-1 • Have process to decide which algs to use

S/MIME Messages • S/MIME secures a MIME entity with a signature, encryption, or both

S/MIME Messages • S/MIME secures a MIME entity with a signature, encryption, or both • Forming a MIME wrapped PKCS object • Have a range of content-types: – Enveloped data – Signed data – Clear-signed data – Registration request – Certificate only message

S/MIME Certificate Processing • S/MIME uses X. 509 v 3 certificates • Managed using

S/MIME Certificate Processing • S/MIME uses X. 509 v 3 certificates • Managed using a hybrid of a strict X. 509 CA hierarchy & pgp’s web of trust • Each client has a list of trusted ca’s certs • And own public/private key pairs & certs • Certificates must be signed by trusted ca’s

Certificate Authorities • • Have several well-known ca’s Verisign one of most widely used

Certificate Authorities • • Have several well-known ca’s Verisign one of most widely used Verisign issues several types of digital ids Increasing levels of checks & hence trust Class 1 2 3 identity checks name/email check + enroll/addr check + ID documents usage web browsing/email, subs, s/w validate e-banking/service access