KEMBAR78
Ch11 Basic Cryptography | PPT
Chapter 11 Basic Cryptography Security+ Guide to Network Security Fundamentals, Third Edition
Defining Cryptography
Objectives Define cryptography Describe hashing List the basic symmetric cryptographic algorithms Describe how asymmetric cryptography works List types of file and file system cryptography Explain how whole disk encryption works
What Is Cryptography? Cryptography - scrambles data The science of transforming information into an unintelligible form while it is being transmitted or stored so that unauthorized users cannot access it Steganography - hides data Hides the existence of the data What appears to be a harmless image can contain hidden data embedded within the image Can use image files, audio files, or even video files to contain hidden information
Steganography
Caesar Cipher Used by Julius Caesar Caesar shifted each letter of his messages to his generals three places down in the alphabet So  BURN THE BRIDGE becomes EXUQ WKH EUKFIG A    D B    E C    F D    G E    H F    I G   J H    K
Encryption and Decryption Encryption Changing the original text to a secret message using cryptography Decryption Change the secret message back to its original form
 
Cryptography and Security Cryptography can provide:  Confidentiality  of information Integrity  of the information Availability  of the data  To users with the key Guarantee  Authenticity  of the sender Enforce  Non-repudiation Sender cannot deny sending the message
Information Protection by Cryptography
Cryptographic Algorithms
Cryptographic Algorithms There are three categories of cryptographic algorithms: Hashing  algorithms Symmetric   encryption  algorithms Asymmetric   encryption  algorithms
Hashing Algorithms
Hashing Algorithms Hashing is a  one-way  process Converting a hash back to the original data is difficult or impossible A hash is a unique “signature” for a set of data This signature, called a  hash  or  digest , represents the contents Hashing is used only for  integrity  to ensure that: Information is in its original form No unauthorized person or malicious software has altered the data Common hash algorithms MD5, SHA-1
Hashing Algorithms (continued)
Link Ch 11a
Hashing Algorithm Security A hashing algorithm is considered secure if: The ciphertext hash is a fixed size Two different sets of data cannot produce the same hash, which is known as a  collision It should be impossible to produce a data set that has a desired or predefined hash The resulting hash ciphertext cannot be reversed to find the original data
Preventing a Man-in-the-Middle Attack with Hashing
Hashing Algorithms (continued) Hash values are often posted on Internet sites In order to verify the file integrity of files that can be downloaded
Hashing Algorithms Only Ensure Integrity
Message Digest (MD) Message Digest (MD)  algorithm One common hash algorithm Three versions Message Digest 2 (MD2) Message Digest 4 (MD4) Message Digest 5 (MD5) Suffer from collisions Not secure See links Ch 11b, c, d
Secure Hash Algorithm (SHA) More secure than MD A family of hashes SHA-1 Patterned after MD4, but creates a hash that is 160 bits in length instead of 128 bits SHA-2 Comprised of four variations, known as SHA-224, SHA-256, SHA-384, and SHA-512 Considered to be a secure hash
SHA-3 is Being Chosen Now Link Ch 11d
Whirlpool A relatively recent cryptographic hash function Has received international recognition and adoption by standards organizations Creates a hash of 512 bits
Password Hashes Another use for hashes is in storing passwords When a password for an account is created, the password is hashed and stored The Microsoft NT family of Windows operating systems hashes passwords in two different forms LM (LAN Manager) hash NTLM (New Technology LAN Manager) hash Most Linux systems use password-hashing algorithms such as MD5 Apple Mac OS X uses SHA-1 hashes
Symmetric Cryptographic Algorithms
Symmetric Cryptographic Algorithms Symmetric cryptographic algorithms   Use the same single key to encrypt and decrypt a message Also called private key cryptography Stream cipher Takes one character and replaces it with one character WEP (Wired Equivalent Protocol) is a stream cipher Substitution cipher The simplest type of stream cipher Simply substitutes one letter or character for another
 
Substitution Cipher
XOR (eXclusive OR) With most symmetric ciphers, the final step is to combine the cipher stream with the plaintext to create the ciphertext The process is accomplished through the exclusive OR (XOR) binary logic operation One-time pad (OTP) Combines a truly random key with the plaintext
XOR
Block Cipher Manipulates an entire block of plaintext at one time Plaintext message is divided into separate blocks of 8 to 16 bytes And then each block is encrypted independently Stream cipher advantages and disadvantages Fast when the plaintext is short More prone to attack because the engine that generates the stream does not vary Block   ciphers  are more secure than  stream   ciphers
Information Protections by Symmetric Cryptography
DES and 3DES Data Encryption Standard (DES) Declared as a standard by the U.S Government DES is a block cipher and encrypts data in 64-bit blocks Uses 56-bit key, very insecure Has been broken many times Triple Data Encryption Standard (3DES) Uses three rounds of DES encryption  Effective key length 112 bits Considered secure
 
Advanced Encryption Standard (AES) Approved by the NIST in late 2000 as a replacement for DES Official standard for U.S. Government Considered secure--has not been cracked
Animation of AES Algorithm Link Ch 11e
Other Algorithms Several other symmetric cryptographic algorithms are also used: Rivest Cipher (RC) family from RC1 to RC6 International Data Encryption Algorithm (IDEA) Blowfish Twofish
Asymmetric Cryptographic Algorithms
Asymmetric Cryptographic Algorithms Asymmetric cryptographic algorithms Also known as  public key cryptography Uses two keys instead of one The  public key  is known to everyone and can be freely distributed The  private key  is known only to the recipient of the message Asymmetric cryptography can also be used to create a  digital signature
 
Digital Signature  A digital signature can: Verify the sender Prove the integrity of the message Prevent the sender from disowning the message ( non-repudiation ) A digital signature does not encrypt the message, it only signs it
 
Information Protections by Asymmetric Cryptography
RSA The most common asymmetric cryptography algorithm RSA makes the public and private keys by  multiplying two large prime numbers  p  and  q To compute their product ( n=pq ) It is very difficult to  factor  the number  n  to find  p  and  q Finding the private key from the public key would require a factoring operation RSA is complex and slow, but secure 100 times slower than  DES
Diffie-Hellman A key exchange algorithm, not an encryption algorithm Allows two users to share a secret key securely over a public network Once the key has been shared Then both parties can use it to encrypt and decrypt messages using symmetric cryptography
HTTPS Secure Web Pages typically use RSA, Diffie-Hellman, and a symmetric algorithm like RC4 RSA is used to send the private key for the symmetric encryption
RSA Used by eBay
RC4 Used by eBay
Elliptic Curve Cryptography An elliptic curve is a function drawn on an X-Y axis as a gently curved line By adding the values of two points on the curve, you can arrive at a third point on the curve The public aspect of an elliptic curve cryptosystem is that users share an elliptic curve and one point on the curve Not common, but may one day replace RSA
Using Cryptography on Files and Disks
Encrypting Files: PGP and GPG Pretty Good Privacy (PGP) One of the most widely used asymmetric cryptography system for files and e-mail messages on Windows systems GNU Privacy Guard (GPG) A similar open-source program PGP and GPG use both asymmetric and symmetric cryptography
Encrypting Files: Encrypting File System (EFS)  Part of Windows Uses the Windows NTFS file system Because EFS is tightly integrated with the file system, file encryption and decryption are transparent to the user EFS encrypts the data as it is written to disk On Macs,  Filevault  encrypts a user's home folder
Whole Disk Encryption Windows BitLocker A hardware-enabled data encryption feature Can encrypt the entire Windows volume Includes Windows system files as well as all user files Encrypts the entire system volume, including the Windows Registry and any temporary files that might hold confidential information TrueCrypt Open-source, free, and can encrypt folders or files
Trusted Platform Module (TPM) A chip on the motherboard of the computer that provides cryptographic services If the computer does not support hardware-based TPM then the encryption keys for securing the data on the hard drive can be stored by BitLocker on a USB flash drive
Cold Boot Attack Can defeat all currently available whole disk encryption techniques (link Ch 11i)

Ch11 Basic Cryptography

  • 1.
    Chapter 11 BasicCryptography Security+ Guide to Network Security Fundamentals, Third Edition
  • 2.
  • 3.
    Objectives Define cryptographyDescribe hashing List the basic symmetric cryptographic algorithms Describe how asymmetric cryptography works List types of file and file system cryptography Explain how whole disk encryption works
  • 4.
    What Is Cryptography?Cryptography - scrambles data The science of transforming information into an unintelligible form while it is being transmitted or stored so that unauthorized users cannot access it Steganography - hides data Hides the existence of the data What appears to be a harmless image can contain hidden data embedded within the image Can use image files, audio files, or even video files to contain hidden information
  • 5.
  • 6.
    Caesar Cipher Usedby Julius Caesar Caesar shifted each letter of his messages to his generals three places down in the alphabet So BURN THE BRIDGE becomes EXUQ WKH EUKFIG A  D B  E C  F D  G E  H F  I G  J H  K
  • 7.
    Encryption and DecryptionEncryption Changing the original text to a secret message using cryptography Decryption Change the secret message back to its original form
  • 8.
  • 9.
    Cryptography and SecurityCryptography can provide: Confidentiality of information Integrity of the information Availability of the data To users with the key Guarantee Authenticity of the sender Enforce Non-repudiation Sender cannot deny sending the message
  • 10.
  • 11.
  • 12.
    Cryptographic Algorithms Thereare three categories of cryptographic algorithms: Hashing algorithms Symmetric encryption algorithms Asymmetric encryption algorithms
  • 13.
  • 14.
    Hashing Algorithms Hashingis a one-way process Converting a hash back to the original data is difficult or impossible A hash is a unique “signature” for a set of data This signature, called a hash or digest , represents the contents Hashing is used only for integrity to ensure that: Information is in its original form No unauthorized person or malicious software has altered the data Common hash algorithms MD5, SHA-1
  • 15.
  • 16.
  • 17.
    Hashing Algorithm SecurityA hashing algorithm is considered secure if: The ciphertext hash is a fixed size Two different sets of data cannot produce the same hash, which is known as a collision It should be impossible to produce a data set that has a desired or predefined hash The resulting hash ciphertext cannot be reversed to find the original data
  • 18.
    Preventing a Man-in-the-MiddleAttack with Hashing
  • 19.
    Hashing Algorithms (continued)Hash values are often posted on Internet sites In order to verify the file integrity of files that can be downloaded
  • 20.
    Hashing Algorithms OnlyEnsure Integrity
  • 21.
    Message Digest (MD)Message Digest (MD) algorithm One common hash algorithm Three versions Message Digest 2 (MD2) Message Digest 4 (MD4) Message Digest 5 (MD5) Suffer from collisions Not secure See links Ch 11b, c, d
  • 22.
    Secure Hash Algorithm(SHA) More secure than MD A family of hashes SHA-1 Patterned after MD4, but creates a hash that is 160 bits in length instead of 128 bits SHA-2 Comprised of four variations, known as SHA-224, SHA-256, SHA-384, and SHA-512 Considered to be a secure hash
  • 23.
    SHA-3 is BeingChosen Now Link Ch 11d
  • 24.
    Whirlpool A relativelyrecent cryptographic hash function Has received international recognition and adoption by standards organizations Creates a hash of 512 bits
  • 25.
    Password Hashes Anotheruse for hashes is in storing passwords When a password for an account is created, the password is hashed and stored The Microsoft NT family of Windows operating systems hashes passwords in two different forms LM (LAN Manager) hash NTLM (New Technology LAN Manager) hash Most Linux systems use password-hashing algorithms such as MD5 Apple Mac OS X uses SHA-1 hashes
  • 26.
  • 27.
    Symmetric Cryptographic AlgorithmsSymmetric cryptographic algorithms Use the same single key to encrypt and decrypt a message Also called private key cryptography Stream cipher Takes one character and replaces it with one character WEP (Wired Equivalent Protocol) is a stream cipher Substitution cipher The simplest type of stream cipher Simply substitutes one letter or character for another
  • 28.
  • 29.
  • 30.
    XOR (eXclusive OR)With most symmetric ciphers, the final step is to combine the cipher stream with the plaintext to create the ciphertext The process is accomplished through the exclusive OR (XOR) binary logic operation One-time pad (OTP) Combines a truly random key with the plaintext
  • 31.
  • 32.
    Block Cipher Manipulatesan entire block of plaintext at one time Plaintext message is divided into separate blocks of 8 to 16 bytes And then each block is encrypted independently Stream cipher advantages and disadvantages Fast when the plaintext is short More prone to attack because the engine that generates the stream does not vary Block ciphers are more secure than stream ciphers
  • 33.
    Information Protections bySymmetric Cryptography
  • 34.
    DES and 3DESData Encryption Standard (DES) Declared as a standard by the U.S Government DES is a block cipher and encrypts data in 64-bit blocks Uses 56-bit key, very insecure Has been broken many times Triple Data Encryption Standard (3DES) Uses three rounds of DES encryption Effective key length 112 bits Considered secure
  • 35.
  • 36.
    Advanced Encryption Standard(AES) Approved by the NIST in late 2000 as a replacement for DES Official standard for U.S. Government Considered secure--has not been cracked
  • 37.
    Animation of AESAlgorithm Link Ch 11e
  • 38.
    Other Algorithms Severalother symmetric cryptographic algorithms are also used: Rivest Cipher (RC) family from RC1 to RC6 International Data Encryption Algorithm (IDEA) Blowfish Twofish
  • 39.
  • 40.
    Asymmetric Cryptographic AlgorithmsAsymmetric cryptographic algorithms Also known as public key cryptography Uses two keys instead of one The public key is known to everyone and can be freely distributed The private key is known only to the recipient of the message Asymmetric cryptography can also be used to create a digital signature
  • 41.
  • 42.
    Digital Signature A digital signature can: Verify the sender Prove the integrity of the message Prevent the sender from disowning the message ( non-repudiation ) A digital signature does not encrypt the message, it only signs it
  • 43.
  • 44.
    Information Protections byAsymmetric Cryptography
  • 45.
    RSA The mostcommon asymmetric cryptography algorithm RSA makes the public and private keys by multiplying two large prime numbers p and q To compute their product ( n=pq ) It is very difficult to factor the number n to find p and q Finding the private key from the public key would require a factoring operation RSA is complex and slow, but secure 100 times slower than DES
  • 46.
    Diffie-Hellman A keyexchange algorithm, not an encryption algorithm Allows two users to share a secret key securely over a public network Once the key has been shared Then both parties can use it to encrypt and decrypt messages using symmetric cryptography
  • 47.
    HTTPS Secure WebPages typically use RSA, Diffie-Hellman, and a symmetric algorithm like RC4 RSA is used to send the private key for the symmetric encryption
  • 48.
  • 49.
  • 50.
    Elliptic Curve CryptographyAn elliptic curve is a function drawn on an X-Y axis as a gently curved line By adding the values of two points on the curve, you can arrive at a third point on the curve The public aspect of an elliptic curve cryptosystem is that users share an elliptic curve and one point on the curve Not common, but may one day replace RSA
  • 51.
    Using Cryptography onFiles and Disks
  • 52.
    Encrypting Files: PGPand GPG Pretty Good Privacy (PGP) One of the most widely used asymmetric cryptography system for files and e-mail messages on Windows systems GNU Privacy Guard (GPG) A similar open-source program PGP and GPG use both asymmetric and symmetric cryptography
  • 53.
    Encrypting Files: EncryptingFile System (EFS) Part of Windows Uses the Windows NTFS file system Because EFS is tightly integrated with the file system, file encryption and decryption are transparent to the user EFS encrypts the data as it is written to disk On Macs, Filevault encrypts a user's home folder
  • 54.
    Whole Disk EncryptionWindows BitLocker A hardware-enabled data encryption feature Can encrypt the entire Windows volume Includes Windows system files as well as all user files Encrypts the entire system volume, including the Windows Registry and any temporary files that might hold confidential information TrueCrypt Open-source, free, and can encrypt folders or files
  • 55.
    Trusted Platform Module(TPM) A chip on the motherboard of the computer that provides cryptographic services If the computer does not support hardware-based TPM then the encryption keys for securing the data on the hard drive can be stored by BitLocker on a USB flash drive
  • 56.
    Cold Boot AttackCan defeat all currently available whole disk encryption techniques (link Ch 11i)