Revise Computingrevisecomputing.co.uk
Free student revisionSee questionsFor schoolsSchool enquiry
Free revisionSee questionsFor schoolsSchool enquiry
Knowledge/A Level/H446/01 Computer systems/Compression, Encryption and Hashing/Different uses of hashing

Different uses of hashing

1.3.1 Compression, Encryption and Hashing

Compression, Encryption and Hashing — Note 4 of 4

Candidates should understand the need for and purpose of using hashing algorithms to store data. Candidates should be aware of different uses for hashing, such as the storing of passwords.

What you need to know

Hashing applies a hash function to data to produce a fixed-size value. Unlike encryption, hashing is one-way: the original data cannot be worked out from the hash. Hashing is used for storing passwords, checking data integrity and locating data quickly.

What to know

  • A good hash function is quick to calculate, produces very different hashes for similar inputs, and makes collisions (two inputs giving the same hash) rare.
  • Hashing is ONE-WAY: it cannot be reversed to get the original data, unlike encryption, which is designed to be decrypted.
  • Use — storing passwords: only the hash of a password is stored. At login, the entered password is hashed and compared with the stored hash. If the database is stolen, the passwords themselves are not revealed.
  • Use — hash tables: the hash of a key gives the location where a record is stored, so data can be found directly without searching.
  • Use — data integrity: a hash (checksum) of a file is sent with it; the receiver recalculates the hash to check the file has not been changed or corrupted.
  • Use — digital signatures: the hash of a message is encrypted to prove its origin and that it has not been altered.

Key terms

Hash function

An algorithm that converts input data of any size into a fixed-size output (the hash or digest).

Exam technique

  • Tip:Explain why hashing suits passwords: even the system administrator cannot see users' passwords, and stolen hashes cannot be reversed.
  • Mistake:Calling hashing a type of encryption. Encryption is two-way; hashing is one-way.
← Previous noteSymmetric and asymmetric encryption1.3.1 Compression, Encryption and HashingNext topic →Relational databases, flat files, keys, entity relationship modelling, normalisation and indexing1.3.2 Databases

Back to Compression, Encryption and Hashing

Compression, Encryption and Hashing

Note 4 of 4

  1. 1Lossy vs lossless compression
  2. 2Run length encoding and dictionary coding for lossless compression
  3. 3Symmetric and asymmetric encryption
  4. 4Different uses of hashing
Topic overview