Hash functions that are used and more popular

I know that the list of all hash functions is too long. I just want to know the most popular ones that are used in everyday IT practical tasks. I know that MD5, SHA1, SHA2 (256 and 512) are really popular. Is there any other hash function that I can add to these 5 algorithms?

I want to develop a hash tool, and I just want to include those algorithms that developers really need.

+4
source share
6 answers

The most widely used (and defined in the standards for SSL / TLS, OpenPGP, SSH):

  • CRC32 is a simple checksum used in ZIP, OpenPGP and a number of other standards.
  • MD2, MD5 - too old and weak MD5 - old and considered weak.
  • SHA1 is the de facto standard used almost everywhere (the DSA algorithm is used only with SHA1, which is also widely used).
  • SHA224 / 256/384/512 - should replace SHA1 and be used with DSA keys of more than 1024 bits and ECDSA signatures
  • RipeMD160 - used in OpenPGP and some X.509 certificates.

There are other hashing algorithms (you can get a complete list on Wikipedia), but most likely you will never meet them in real life.

+2
source
  • MD5, SHA-1 - commonly used, used for security, but not more resistant to collisions.
  • SHA-2 - commonly used, safe. This is a family of functions with different output sizes.
  • SHA-3 - Not yet specified, but likely to become popular after that. Wait for the specification. There will be a family of functions.
  • CRC32 - not protected, but really common as a checksum
  • MD4, RIPEMD160 - Did not see files for hashing, but they still exist in some other contexts. MD4 is broken, some older members of the RIPEMD family are broken, but RIPEMD160 is still safe. Only place where I swirl is TrueCrypt KDF.
  • TTH / TigerTreeHash - Used in some file sharing contexts, it’s still safe, but the security margins are getting worse.
  • ED2K - used in some file sharing contexts based on MD4, broken collision resistance.
  • Skein, Blake2 - Skein is a SHA-3 finalist, Blake2 is derived from one. Relatively fast in software and sometimes used, but not very common. As a contributor to Blake2, I hope it will become more popular :)

In addition to the hashes that you called CRC32, it is very common, and TTH / ED2K are used in the context of file sharing, but rarely elsewhere. Not seen many other hashes in the context of file hashing.

+5
source

bcrypt and scrypt . They are designed to hash passwords.

bcrypt has been bcrypt for quite some time and is considered safe. scrypt is newer, and it uses some intensive memory operations to prevent brute force attacks using the GPU.

+2
source
  • If you just want to add hash functions to your tool, regardless of security, then the finalists of the MD-4 and NIST SHA-1 and SHA-2 contest can be implemented.
  • For newer and more secure hash functions, a SHA-3 (Keccak) winner can be implemented.

NIST hash function contest

SHA-3

0
source

First you need to decide if you want fast, insecure hash functions or slow, reliable ones.

Of these, the best at present:

  • Fast: CRC32 on SSE4.2 / armv7 HW, Murmur3, CityHash, FNV
  • Safety: SHA-3 (Keccak), SHA-2, BLAKE2

See https://code.google.com/p/smhasher/w/list for a framework to test some of the popular ones.

[Edit note: previous had bcrypt, scrypt as safe + slow hash functions, but they are only password hash functions]

0
source

I suggest you study DES and TDES, they are encrypted with a key and will be a good choice for you if you need to encrypt / decrypt data using a public / private key.

-2
source

Source: https://habr.com/ru/post/1479311/


All Articles