Hashing and Compression

Compression

  • Reduce size of files

  • Reduce download times

  • Reduce storage requirements

  • Make best use of bandwidth

  • Reduce transmit times

Lossy Compression

  • Used for images, audio and video

  • Unnoticeable reduction in quality

  • Canot be restored to original

  • Permanently deletes part of the file

Lossless Compression

  • Fully able to restore the image to original quality when uncompressed

  • Only useful on images with large areas of continuous colours

  • Useful for vector-like images

  • Used for executable files and documents

Hashing

Transforms a string of characters into a fixed length value that represents the original input string

Popular choices are SHA-1 and MD5

It is a one-way process; you cannot set original value from hashed value even if you have access to the original hashing algorithm

Ideal for preventing passwords and PINs being read by a hacker (and understanding it)

To verify the user’s password; the system needs to:

  • Apply hashing factor to password entered

  • Compare hashed value to the one stored

Can be used for quick searching, insertion, deletion of data