<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
FileVeda logo
Resources & Guides

File Encryption and Checksums Explained: AES-256, Passwords and SHA-256

Fi FileVeda Team
November 11, 20264 Min Read

Two small habits solve a large share of everyday file security problems. Encrypting a file keeps its contents private. Checking a checksum confirms a file has not been changed or damaged. They are often confused, so this guide covers both, with the technical terms explained as we go.

Encryption and hashing are different things

EncryptionHashing (checksum)
PurposeKeep contents secretDetect any change
ReversibleYes, with the passwordNo
OutputA file about the same sizeA short fixed-length string
ExampleAES-256-GCMSHA-256

When to encrypt a file

  • Before putting sensitive documents in cloud storage.
  • Before sending a file through a channel you do not fully trust, such as email.
  • Before copying files to a USB drive that could be lost.

How password-based encryption works

FileVeda's File Encrypt tool uses the Web Crypto API built into your browser. Three ideas are involved:

1. Turning a password into a key (PBKDF2)

AES needs a 256-bit key, and a password is not one. PBKDF2 converts your password into a key by running it through 100,000 rounds of HMAC-SHA-256 together with a random 16-byte value called a salt. The repetition makes each password guess slow for an attacker. The salt ensures that the same password produces a different key for every file.

2. Encrypting the data (AES-256-GCM)

AES-256 is the encryption standard used by governments and banks. GCM is a mode of operation that uses a random 12-byte value, the IV, so that encrypting the same file twice gives different output.

3. Detecting tampering (the authentication tag)

GCM also produces a 128-bit authentication tag. If even one byte of the encrypted file is changed or corrupted, decryption fails instead of producing silently damaged output. A wrong password fails the same way.

How to encrypt and decrypt

  1. Open File Encrypt and add a file.
  2. Enter a strong password and download the resulting .enc file.
  3. To decrypt, add the .enc file to the same tool and enter the password.

Everything runs on your device. The file and the password are not sent anywhere.

Three rules that matter more than the algorithm

  • There is no password recovery. Nobody, including FileVeda, can open the file without the password. If you lose it, the data is gone. Store the password in a password manager.
  • Use a long passphrase. Strong encryption with the password "123456" is not strong.
  • Share the password separately from the file, through a different app or by voice.

What a checksum is

A hash function reads a file and produces a fixed-length fingerprint, for example 64 hexadecimal characters for SHA-256. Change a single bit of the file and the fingerprint changes completely. Two uses are common:

  • Verifying downloads. Software publishers often list a SHA-256 value next to the download link. If your copy produces the same value, it arrived complete and unaltered.
  • Confirming a transfer. After sending a large file, the sender and receiver can compare hashes to confirm both copies are identical.

How to verify a file

  1. Open File Hash and add the file.
  2. Compare the SHA-256 value shown with the one the publisher lists. Every character must match.

One caution: a checksum only proves the file matches the published value. If an attacker controls the web page and replaces both the file and the listed checksum, they will still match. Get the checksum from the publisher's official site.

Which hash algorithm to use

  • SHA-256 or SHA-512: the right choice today.
  • SHA-1 and MD5: no longer safe against deliberate tampering, because researchers have produced different files with the same hash. They are still acceptable for spotting accidental corruption, and you will see them on older download pages.

Putting it together

A sensible routine for a sensitive file: encrypt it, note the SHA-256 of the encrypted file, send the file one way and the password another, and have the receiver confirm the hash before decrypting. For PDFs specifically, built-in protection may be more convenient. See PDF passwords explained.

Share this article
FileVeda Web Utilities

Optimize and Convert Files Safely

Need to compress high-res photos, transform formats locally, or style your typography? All of our utilities run completely client-side in your web browser—your documents never touch the cloud.