Code
The cryptography of computers: hashes, AES and HMAC, RSA’s weak keys, Diffie–Hellman, certificates, one-time passwords, Shor and Grover, ML-KEM, BB84, Shamir’s shares, time locks, passwords.
Hash Generator
Computes the MD5, SHA-1, SHA-2 and SHA-3 digests of a text, of hex bytes or of a file, compares them with an expected digest, and lists the formats a pasted digest fits; length alone cannot tell SHA-256 from SHA3-256. MD5 is RFC 1321 (1992); SHA-1 and SHA-2 are FIPS 180-4, SHA-3 FIPS 202. MD5 collisions were published in 2004, and RFC 6151 rules it out where collision resistance is needed.
Terms
History, how it works, how it was checked, limits
History
MD5 was published as RFC 1321 in 1992; SHA-1 and SHA-2 are defined in NIST’s Secure Hash Standard, FIPS 180-4 (2015), and SHA-3, built on Keccak, in FIPS 202 (2015). Collisions for MD5 were published in 2004, and RFC 6151 (2011) rules it out wherever collision resistance is needed.
How it works
Generate hashes the bytes of a text (as UTF-8), of hex typed as bytes, or of a file read in the page: MD5 by the site’s own code, written to RFC 1321; SHA-1, SHA-256, SHA-384 and SHA-512 by the browser’s Web Crypto; SHA3-256 and SHA3-512 by the site’s Keccak, written to FIPS 202. An expected digest is compared with all seven, and the one it equals is marked. A list hashes each line by itself into a table saved as CSV, compared with no digest. Identify lists every hash format a pasted digest fits by its length and form; it uses Cipher Identifier’s detector, so the two tools answer alike. One bit flipped hashes the input again with one bit changed, walked by the stepper, and draws the digest’s bits that change in gold as a grid, their count beside the half by which two unrelated digests differ.
How it was checked
The tests run the site’s MD5 on the seven strings of RFC 1321’s Appendix A.5, on every length from 0 to 199 bytes against Node’s own, and on text that is not ASCII. Keccak is checked against OpenSSL in its own tests, and SHA3-256 of “abc” against FIPS 202’s value here. The SHA-1 and SHA-2 digests are the browser’s, not code of the site’s, and are not tested. A test reads the source for the shared detector and for the absence of any claim about password hashing; the file input and the comparison have no test. The grid is held to Node’s SHA-256 of abc and abb: the bits that differ, and only they, are gold.
The tests hold 19 checks of this tool; 3 rest on outside material:
- A standard’s own vectors MD5 (utils/md5.js): the seven strings of RFC 1321 A.5
- A standard’s own vectors SHA3-256 of "abc" (FIPS 202) through utils/keccak.js
- Another’s computation MD5: every length from 0 to 199 bytes equals Node’s, across the block and padding boundaries
Limits
A file is read whole into memory, up to 256 MB. SHA-224, SHA-512/256, SHAKE and BLAKE are not offered, and nothing here is a password hash: a plain fast digest is the wrong tool for storing passwords, which need bcrypt, scrypt or Argon2. Identify knows the forms the shared detector knows; a digest in capitals is recognised only as MD5, SHA-1, NTLM or the old MySQL format, and Base64 digests are not recognised as such.