Hashing

Hashing (Hash function): A type of function or operation that takes in an arbitrary data input and maps it to an output of a fixed size, called a hash or a digest

  • ​The output size is usually specified in bits of ​data and is often included in the hashing function name. ​
  • What this means exactly is that ​you feed in any amount of data ​into a hash function and ​the resulting output will always be the same size, ​but the output should be unique to the input, ​such that two different inputs ​should never yield the same output Pasted image 20260702130422  ​Hashing can also be used to identify ​duplicate datasets and databases or ​archives to speed up searching of tables ​or to remove duplicate data to save space

Cryptographic hashing: It is distinctly different from encryption because cryptographic hash functions should be one directional

  •  used for various applications ​like authentication, ​message integrity, fingerprinting, ​data corruption detection, and digital signatures
  • The ideal cryptographic hash function ​should be deterministic, ​meaning that the same input value should ​always return the same hash value.
  • ​The function should be quick to compute and be efficient, ​it should be infeasible to reverse the function ​and recover the plain text from the hash digest. ​
  • A small change in the input should ​result in a change in the output so that there ​is no correlation between the change in ​the input and the resulting change in the output. ​
  • Finally, the function should ​not allow for Hash collisions: Two different inputs mapping to the same output
  • Cryptographic hash functions are ​very similar to symmetric ​key block ciphers in that they operate on blocks of data. Pasted image 20260702130805 Pasted image 20260702130821