Unformatted text preview:

Cryptography OverviewAnnouncement: Homework 1CryptographyBasic Cryptographic ConceptsFive-Minute UniversityExample: network transactionsSecure communicationSecure Sockets Layer / TLSSSL/TLS CryptographyExample cryptosystemsSymmetric EncryptionOne-time padTypes of symmetric encryptionFeistel network: One RoundData Encryption StandardBlock cipher modes (for DES, AES, …)Electronic Code Book (ECB)Cipher Block Chaining (CBC)Comparison (for AES, by Bart Preneel)RC4 stream cipher – “Ron’s Code”RSA Trade SecretEncryption/DecryptionSecurityComplete AlgorithmExample use of stream cipher?Wrong!Public-key CryptosystemComplexity ClassesExample: RSAWhy RSA works (quick sketch)Textbook RSA is insecureOAEP [BR94, Shoup ’01]Problem: IntegrityCryptographic hash functionsApplications of one-way hashIterated hash functionsMAC: Message Authentication CodeBasic CBC-MACHMAC: Keyed Hash-Based MACOrder of Encryption and MACsDigital SignaturesProperties of signaturesRSA Signature SchemePublic-Key Infrastructure (PKI)Public-Key InfrastructureSlide 46Back to SSL/TLSCrypto SummaryLimitations of cryptographySlide 50How well does RSA work?Message integrityCryptography Overview John MitchellCS155 Spring 2008Announcement: Homework 1Posted on webFive problemsDue April 29CryptographyIsA tremendous toolThe basis for many security mechanismsIs notThe solution to all security problemsReliable unless implemented properlyReliable unless used properlySomething you should try to invent yourself unless you spend a lot of time becoming an expertyou subject your design to outside reviewEncryption scheme:functions to encrypt, decrypt data key generation algorithmSymmetric key vs. public keyPublic key: publishing key does not reveal key-1Secret key: more efficient, generally key = key-1 Hash function, MACMap any input to short hash; ideally, no collisionsMAC (keyed hash) used for message integritySignature schemeFunctions to sign data, verify signatureBasic Cryptographic ConceptsFive-Minute UniversityEverything you might remember, five years after taking CS255 … ? This lecture describes basic functions and example constructions. Constructions not needed for CS155.Father Guido SarducciExample: network transactionsAssume attackers can control the networkWe will talk about how they do this in a few weeksAttackers can intercept your packets, tamper with or suppress them, and inject arbitrary packetsSecure communicationBased onCryptographic methodsKey management protocolsSecure Sockets Layer / TLSStandard for Internet securityOriginally designed by NetscapeGoal: “... provide privacy and reliability between two communicating applications”Two main partsHandshake ProtocolEstablish shared secret key using public-key cryptographySigned certificates for authenticationRecord LayerTransmit data using negotiated key, encryption functionSSL/TLS CryptographyPublic-key encryptionKey chosen secretly (handshake protocol)Key material sent encrypted with public keySymmetric encryptionShared (secret) key encryption of data packetsSignature-based authenticationClient can check signed server certificateAnd vice-versa, in principalHash for integrityClient, server check hash of sequence of messagesMAC used in data packets (record protocol)Example cryptosystemsOne-time pad“Theoretical idea,” but leads to stream cipherFeistel construction for symmetric key cryptoIterate a “scrambling function”Examples: DES, Lucifer, FREAL, Khufu, Khafre, LOKI, GOST, CAST, Blowfish, …AES (Rijndael) is also block cipher, but different …Complexity-based public-key cryptographyModular exponentiation is a “one-way” functionExamples: RSA, El Gamal, elliptic curve systems, ...Symmetric EncryptionEncryption keeps communication secretEncryption algorithm has two functions: E and DTo communicate secretly, parties share secret key KGiven a message M, and a key K:M is known as the plaintextE(K,M) → C (C known as the ciphertext)D(K, C) → MAttacker cannot efficiently derive M from C without KNote E and D use same key KReason for the name “symmetric encryption”One-time padShare a random key KEncrypt plaintext by xor with sequence of bitsencrypt(key, text) = key  text (bit-by-bit)Decrypt ciphertext by xor with same bitsdecrypt(key, text) = key  text (bit-by-bit)AdvantagesEasy to compute encrypt, decrypt from key, textThis is an information-theoretically secure cipherDisadvantageKey is as long as the plaintextHow does sender get key to receiver securely? Idea for stream cipher: use pseudo-random generators for key …Types of symmetric encryptionStream ciphers – pseudo-random padGenerate pseudo-random stream of bits from short keyEncrypt/decrypt by XORing as with one-time padBut NOT one-time PAD! (People who claim so are frauds!)Block cipherOperates on fixed-size blocks (e.g., 64 or 128 bits)Maps plaintext blocks to same size ciphertext blocksToday use AES; other algorithms: DES, Blowfish, . . .Feistel network: One RoundScheme requiresFunction f(Ri-1 ,Ki)Computation for Ki e.g., permutation of key KAdvantageSystematic calculationEasy if f is table, etc.Invertible if Ki knownGet Ri-1 from LiCompute f(R i-1 ,Ki)Compute Li-1 by L i-1R i-1R iL ifK iDivide n-bit input in half and repeatData Encryption Standard Developed at IBM, some input from NSA, widely usedFeistel structurePermute input bitsRepeat application of a S-box functionApply inverse permutation to produce output Worked well in practice (but brute-force attacks now)Efficient to encrypt, decrypt Not provably secureImprovementsTriple DES, AES (Rijndael)Block cipher modes (for DES, AES, …)ECB – Electronic Code Book modeDivide plaintext into blocksEncrypt each block independently, with same keyCBC – Cipher Block ChainingXOR each block with encryption of previous blockUse initialization vector IV for first blockOFB – Output Feedback ModeIterate encryption of IV to produce stream cipherCFB – Cipher Feedback ModeOutput block yi = input xi  encyrptK(yi-1)Electronic Code Book (ECB)PlainPlain Text Textt CipCiphe r Tex her TBlock CipherBlock CipherBlock CipherBlock CipherProblem: Identical blocks encrypted identicallyCipher Block Chaining (CBC)PlainPlain Text Textt CipCiphe r Tex her TBlock


View Full Document

Stanford CS 155 - Crytography Overview

Documents in this Course
Lecture 5

Lecture 5

64 pages

Phishing

Phishing

31 pages

Load more
Download Crytography Overview
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Crytography Overview and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Crytography Overview 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?