Your IPv4 address:
Operating system:

What is encryption? Keys, hashes and checksums

Encryption turns readable data into ciphertext that only someone with the right key can turn back. It keeps information confidential while it is sent or stored. Hashes and checksums do a different job: their output is never decrypted to recover the original. Mixing these up is how people end up “protecting” a file with something anyone can reverse.

What the key does

An encryption algorithm combines the plaintext with a key and produces ciphertext. In symmetric encryption both parties share one secret key. In asymmetric systems there is a pair: a public key that can be handed out, and a matching private key that stays with its owner, each with a different role.

Knowing that a file is “encrypted” tells you little about how safe it is. The algorithm, the operating mode, the quality of the key and the way the key is stored all matter. A strong algorithm does not help if the password is easy to guess or the key travels in the same unprotected message as the file. Applications should rely on established protocols and on authenticated encryption, which also detects tampering, and not on an improvised series of text conversions.

Hashes and checksums are not encryption

A cryptographic hash produces a fixed-size digest of the data. It is not an encrypted copy of the input, and there is no key that turns it back. A SHA-256 digest lets you compare a downloaded file with the digest stated by a trustworthy publisher. That comparison checks that the two are equal. It does not hide the file.

Other tools in the family have narrower uses. CRC32 detects accidental transmission errors, but it does not authenticate anything against deliberate changes. MD5 and SHA-1 are unsuitable for new uses that need collision resistance, meaning assurance that nobody can construct two different inputs with the same digest; NIST describes its transition away from SHA-1. Password storage needs specialised password-hashing methods with salts and an adjustable computational cost, so that guessing stays slow. If you want to see what a digest looks like, the 2ip hash generator computes hashes and checksums for text.

Base64 is neither

Encoding only changes how data is written. If a website shows you Base64 text, anyone can decode it without a secret key. Encoding is not encryption, however scrambled the result looks.

Sending a document versus checking a download

To share a confidential document, choose a trusted application that both encrypts and authenticates the file, and pass the passphrase through a separate protected channel. The recipient recovers the content with the right key.

To check a downloaded archive, calculate its hash and compare it with the value on an authentic publisher page. This is a different workflow with a different goal: the hash does not stop anyone from reading the archive. It only tells you whether your copy matches the published one.

How HTTPS uses encryption

With HTTPS, encryption is one part of a wider protocol. TLS negotiates parameters, establishes keys and authenticates the server certificate. TLS 1.3 removed several legacy choices and simplified the normal handshake; the TLS 1.3 handshake guide explains the sequence in more detail.

TLS protects data in transit to the named peer. It does not guarantee that either endpoint is trustworthy, and it does not by itself establish that a website is honest.

Where sound cryptography still fails

Malware on a device, a disclosed key or a weak account-recovery process can defeat cryptography that is otherwise sound. The same caution applies to online text tools. Before using one, work out whether the operation you selected encrypts, hashes or merely encodes. Do not paste private documents or credentials into an unfamiliar service just because its button says “secure”. Find out how the data is processed and how long it is kept first.