Main menu
Definition

One-way encryption

One-way encryption turns plaintext into ciphertext and stores it scrambled, in a form that cannot be unscrambled even if the cipher key is known. The only way to match plaintext to the stored value is to guess the input and compare. Learn how one-way encryption works and why it is used for passwords.

DTDevolutions Team·November 12, 2026·2 min read

What is one-way encryption?

One-way encryption is a transformation that is easy to compute in one direction and practically impossible to reverse. In practice, it is usually done with a cryptographic hash function, which turns input of any length into a fixed-length value called a hash or digest. The same input always produces the same output, but the output does not reveal the input.

It is most often used to store passwords so that a system can check them without ever keeping the passwords themselves.

How does one-way encryption work?

For password storage, the process works like this:

  1. When a user sets a password, the system adds a random value called a salt and runs both through a slow, purpose-built function such as bcrypt, scrypt, Argon2, or PBKDF2.
  2. The system stores only the salt and the resulting hash.
  3. At sign-in, the system repeats the calculation with the entered password and the stored salt.
  4. If the new result matches the stored hash, the password is correct.

The salt makes each stored hash unique, so identical passwords look different, and precomputed tables of hashes become useless. The deliberate slowness makes large-scale guessing expensive.

One-way encryption vs. two-way encryption

Two-way (reversible) encryption, such as AES, is designed to be decrypted by anyone holding the key; it is used when the original data must be read again. One-way encryption is used when you only need to verify data, never recover it. Strictly speaking, hashing is not encryption, but the term "one-way encryption" is often used for it.

Why does one-way encryption matter?

If a database of passwords is stolen, properly salted and slow hashes force attackers to guess each password individually. Weak, unique, or fast hashes, such as unsalted MD5, can be cracked quickly. Strong one-way storage, combined with long unique passwords and multifactor authentication, keeps stolen hashes from turning into working credentials.

Frequently asked questions

What is one-way encryption?

One-way encryption scrambles plaintext into a stored value that cannot be unscrambled, even if the key is known. A match can only be found by guessing the input and comparing.

Is one-way encryption the same as hashing?

In practice, yes. One-way encryption is usually done with cryptographic hash functions, which are designed to be irreversible.

What is a salt?

A salt is a random value added to each password before hashing, so that identical passwords produce different hashes and precomputed attack tables do not work.

Store passwords the right way

Generate and save strong, unique passwords as you work.

Explore Devolutions Password Manager

Related terms

Plaintext

Plaintext is unencrypted or decrypted alphanumeric words and messages.

Read now →

Password cracking

Password cracking is the act or process of ascertaining a password by various means.

Read now →

Encryption

Encryption is the conversion of plaintext into ciphertext to safeguard the confidentiality of data during storage or transfer.

Read now →