© Seth James Nielson, Christopher K. Monson 2019
S. J. Nielson, C. K. MonsonPractical Cryptography in Pythonhttps://doi.org/10.1007/978-1-4842-4900-0_2

2. Hashing

Seth James Nielson1  and Christopher K. Monson2
(1)
Austin, TX, USA
(2)
Hampstead, MD, USA
 
Hashing is a cornerstone of cryptographic security. It involves the concept of a one-way function or fingerprint. Hash functions only work well when a couple of things are true about them:
  • They produce repeatable, unique values for every input.

  • The output value provides no clues about the input that produced it.

Some hashing functions are better at satisfying these requirements than others, and we’ll talk about some good ones (SHA-256) and some not-so-good ones (MD5, SHA-1) to demonstrate both how they ...

Get Practical Cryptography in Python: Learning Correct Cryptography by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.