Security Issues

Web Architecture [./]
Fall 2008 — INFO 290-03 (CCN 42584)

Erik Wilde, UC Berkeley School of Information
2008-09-11

Creative Commons License [http://creativecommons.org/licenses/by/3.0/]

This work is licensed under a CC
Attribution 3.0 Unported License
[http://creativecommons.org/licenses/by/3.0/]

Contents E. Wilde: Security Issues

Contents

E. Wilde: Security Issues

(2) Abstract

TCP and thus HTTP are clear-text protocols, which make no attempt to hide the data being transmitted. For secure data transfers, it thus is necessary to use additional technologies for providing secure data transfers. This lecture looks briefly into the foundations of cryptographic primitives (such as one-way functions and encryption) and cryptographic protocols. For the Web, the most interesting security feature are secure HTTP interactions, which are provided by HTTP over SSL (HTTPS), a protocol that layers an encryption layer (SSL or TLS) between TCP and HTTP.



Security 101

Outline (Security 101)

  1. Security 101 [8]
    1. One-Way Function [2]
    2. Secret-Key Cryptography [2]
    3. Public-Key Cryptography [3]
  2. Cryptographic Protocols [6]
    1. Digital Signature [4]
    2. Secure Communications [1]
  3. HTTP over SSL (HTTPS) [4]
  4. Conclusions [1]
Security 101 E. Wilde: Security Issues

(4) Cryptography



One-Way Function

One-Way Function E. Wilde: Security Issues

(6) Essence of Data

  • Hashes (or message digests) are a well-known principle in computer science
    • fast to compute (the goal is to make data handling more efficient)
    • few collisions (there are always collisions because of the smaller size)
    • checksums and Cyclic Redundancy Check (CRC) are popular hashes
  • One-way functions are cryptographically safe hashes
    • not just for detecting errors, but also for preventing tampering
    • often referred to as cryptographic hash or digital fingerprint
  • One-way functions must satisfy some additional criteria
    • it must be very hard to find an input producing a given output
    • it must be very hard to find two inputs producing the same output (collision)


One-Way Function E. Wilde: Security Issues

(7) Reducing Data

Hash

Secret-Key Cryptography

Secret-Key Cryptography E. Wilde: Security Issues

(9) Plausible Encryption

  • Secret-Key is was most people think of when thing of encryption
    • symmetric cryptography is another popular term
  • One key for encryption and decryption
  • Losing the key makes encrypted data openly readable
    • there must be a secure channel to transport keys
  • Good for long-term relationships with few partners
    • exchange secret keys as part of the initial setup of a relationships
    • adding partners requires a secure channel for key exchange
    • changing keys requires a secure channel for key exchange
  • Almost impractical in an environment with many ad-hoc partners


Secret-Key Cryptography E. Wilde: Security Issues

(10) Notice the Arrow

Secret-Key Cryptography

Public-Key Cryptography

Public-Key Cryptography E. Wilde: Security Issues

(12) Implausible Encryption

  • Public-Key intuitively is hard to accept as a concept
    • asymmetric cryptography is another popular term
  • Key pairs of one public and one secret key
    • key generation is the process of generating these key pairs
  • The public key can be made available to the public
    • only the secret key can do the inverse operation of the public key
  • Good for short-term relationships with many partners
    • publish your public key so that it can be used worldwide
    • everybody can encrypt data using the public key
    • only the owner of the secret can can decrypt the message and read it
  • Computationally expensive and not good for a large amounts of data


Public-Key Cryptography E. Wilde: Security Issues

(13) No Arrow Here …

Public-Key Cryptography (Encrypting with Public Key)

Public-Key Cryptography E. Wilde: Security Issues

(14) And No Arrow Here …

Public-Key Cryptography (Encrypting with Secret Key)

Cryptographic Protocols

Outline (Cryptographic Protocols)

  1. Security 101 [8]
    1. One-Way Function [2]
    2. Secret-Key Cryptography [2]
    3. Public-Key Cryptography [3]
  2. Cryptographic Protocols [6]
    1. Digital Signature [4]
    2. Secure Communications [1]
  3. HTTP over SSL (HTTPS) [4]
  4. Conclusions [1]
Cryptographic Protocols E. Wilde: Security Issues

(16) Building Secure Applications



Digital Signature

Digital Signature E. Wilde: Security Issues

(18) Encrypted Fingerprints

  • Hashes are used to check data integrity
  • One-Way Function [One-Way Function (1)]s are used to check data integrity securely
    • it is not possible to reverse engineer data for a given hash
  • Signed hashes can be used to ensure data authenticity
    • if the hash sum is signed, it cannot be changed
    • if the data is changed, its hash will not match the signed hash
  • Digital signatures work as long as the hash can be securely signed
    • there must be a trusted public key for checking the hash signature


Digital Signature E. Wilde: Security Issues

(19) Creating a Digital Signature

signature-sign.jpg

Digital Signature E. Wilde: Security Issues

(20) Verifying a Digital Signature

signature-verify.jpg

Digital Signature E. Wilde: Security Issues

(21) Certificate

  • Certificates are digital signatures issued by a trusted party
    • most digital signatures are created with certified public keys
    • this means the digital signature is created based on a digitally signed key
  • Who can you trust on the Web?
    • trust can only start to grow based on initial trust in something
    • many systems come with pre-installed trust (root certificates)
    • certificates from other issuers will cause browsers to complain [https://katapultmedia.com/]
  • Certificates (like domain names) are a very easy way to make money
    • in theory there are different levels of certificates with different levels of identity checking
    • in practice most sites choose the cheapest one that does not give an error message


Secure Communications

Secure Communications E. Wilde: Security Issues

(23) Encrypted Keys

  • Public-Key cryptography is computationally expensive
    • it is possible to encrypt all traffic using asymmetric key pairs
    • this generates considerably more load on the server side
  • Combining public- and secret-key cryptography
    1. check the public key for authenticity (using a Certificate [Certificate (1)])
    2. generate a key for a secret-key encryption scheme
    3. use the public key to securely transmit the secret key
    4. use the secret key for securely transmitting the payload
  • Combines the advantages of both methods
    • the lower complexity of secret-key algorithms
    • the ability of public-key algorithms to work without a secure channel


HTTP over SSL (HTTPS)

Outline (HTTP over SSL (HTTPS))

  1. Security 101 [8]
    1. One-Way Function [2]
    2. Secret-Key Cryptography [2]
    3. Public-Key Cryptography [3]
  2. Cryptographic Protocols [6]
    1. Digital Signature [4]
    2. Secure Communications [1]
  3. HTTP over SSL (HTTPS) [4]
  4. Conclusions [1]
HTTP over SSL (HTTPS) E. Wilde: Security Issues

(25) HTTP and Security



HTTP over SSL (HTTPS) E. Wilde: Security Issues

(26) HTTPS vs. S-HTTP



HTTP over SSL (HTTPS) E. Wilde: Security Issues

(27) HTTP and SSL

HTTP and SSL

HTTP over SSL (HTTPS) E. Wilde: Security Issues

(28) TLS vs. IPsec

TLS vs. IPsec

Conclusions

Outline (Conclusions)

  1. Security 101 [8]
    1. One-Way Function [2]
    2. Secret-Key Cryptography [2]
    3. Public-Key Cryptography [3]
  2. Cryptographic Protocols [6]
    1. Digital Signature [4]
    2. Secure Communications [1]
  3. HTTP over SSL (HTTPS) [4]
  4. Conclusions [1]
Conclusions E. Wilde: Security Issues

(30) Internet Security



2008-09-11 Web Architecture [./]
Fall 2008 — INFO 290-03 (CCN 42584)