Uvlio

Command Palette

Search for a command to run...

Back to articles
Technical Article

Encryption Basics in the Browser: Hashing, Symmetric Keys and What Stays Local

Browser crypto tools make serious algorithms easy to run, which is useful and dangerous at the same time. The algorithms are rarely the weak point. The weak points are key handling, threat models, and the fact that anything the browser can encrypt the browser can also be tricked into decrypting. The practical habit is to verify outputs under the same conditions your users will face, then keep a short record of what you checked.
Uvlio editorial team by limitcool2026-05-177 min read
Topic coverDeveloperAES / DES Encryption ToolRSA Key Tool

Encryption Basics in the Browser: Hashing, Symmetric Keys and What Stays Local

Hashing is not encryption. Symmetric encryption needs a secret both sides share. What browser-side crypto can and cannot protect.

Guide subject preview
Understand
Check
Apply
Tool stack
AES / DES Encryption ToolRSA Key Tool
Reading focus
1Understand
2Check
3Apply

Original workflow visual

Encryption Basics in the Browser: Hashing, Symmetric Keys and What Stays Local

This original Uvlio visual summarizes the practical path from input inspection to output review for this workflow.
1

Understand

Review before moving forward

2

Check

Review before moving forward

3

Apply

Review before moving forward

Maintainer and review note
Maintained by limitcool. Use it to understand the technical model, processing boundaries, privacy risks, and verifiable behavior.
Hashing is one-way; encryption is two-way

A hash such as SHA-256 maps input to a fixed-length digest and is designed not to be reversed. Encryption maps plaintext to ciphertext that can be reversed with the correct key. If a tool offers to encrypt a password and returns a short fixed string with no key, it is hashing, not encrypting. Use hashes for integrity checks and password storage only with a proper password-hashing scheme, not raw SHA alone.

Symmetric encryption needs a shared secret

AES and similar algorithms use the same key to encrypt and decrypt. That key must reach the other party without being intercepted, which is the hard part. Putting the key in the same email as the ciphertext, or hard-coding it into front-end JavaScript, cancels the protection. Browser tools are excellent for local experiments and for encrypting data before upload when you alone hold the key; they are not a substitute for a full key-exchange protocol.

Asymmetric encryption separates public and private keys

RSA and elliptic-curve schemes use a public key anyone can encrypt with and a private key only the recipient should hold. That removes the need to ship a shared secret, but it introduces certificate and key-management problems instead. Never paste a private key into a random web form unless you generated it locally and trust the page completely.

What the browser can see, an attacker on the page can see

Client-side encryption runs in JavaScript controlled by the page. A compromised script, a malicious extension, or an injected third-party library can read the plaintext before encryption or the key after generation. Local processing reduces server exposure; it does not create a trusted computing base. Treat the page origin as part of your threat model.

Authenticated encryption and why modes matter

Encryption without integrity checking can still be manipulated. Modern practice prefers authenticated modes such as AES-GCM that detect tampering. A tool that only offers legacy modes without authentication is fine for learning demos and a poor default for real secrets. Prefer libraries and tools that make the safe mode the obvious mode.

Passwords are not keys

Human passwords have low entropy and must be stretched with a password-based key derivation function before they become encryption keys. Feeding a short password directly into AES is a common mistake in homemade schemes. If a browser tool accepts a password, check whether it derives a key properly or just uses the password bytes as-is.

A practical rule of thumb

Use browser hashing for checksums and demos. Use browser symmetric encryption when you generate and keep the key yourself for local files. Use established end-to-end systems for messaging and collaboration. Do not invent a new protocol in a form field and then store the only copy of the key in the same browser profile.

Threat models beat algorithm names

Choosing AES-256 sounds strong until the key is in localStorage next to the ciphertext, or the page loads a third-party script that can read form fields. Write down who you are defending against: a curious sibling, a stolen laptop, a hostile server operator, or a network eavesdropper. Each adversary implies different controls. Algorithm choice is only one line in that list, and rarely the first line that fails.

Local demos versus production systems

A browser form that encrypts a note with a password is a fine teaching tool and a poor password manager. Production systems need key rotation, device sync, recovery paths and abuse monitoring. If you outgrow a local demo, migrate to a maintained application instead of bolting features onto a page that was never designed to hold long-lived secrets.

Common Questions

Is hashing the same as encryption?

No. Hashes are one-way digests. Encryption is reversible with a key.

Is client-side encryption safe from the website operator?

Only if you trust the page code. The operator ships the JavaScript that handles your plaintext and keys.

Can I email an AES key with the ciphertext?

That removes the confidentiality the encryption was supposed to provide. Exchange keys on a separate channel.

Why is raw SHA-256 a bad password store?

It is fast to brute force and has no per-user salt by default. Use a dedicated password hashing scheme.