Encrypt

Updated: 12/30/2021 by Computer Hope
Encrypt

The term encrypt describes making data unreadable to other humans or computers that should not be seeing the contents. Encrypted data is generated using an encryption program such as PGP, encryption machine, or a simple cipher key, and appears as garbage until it is decrypted. To read or use the data, it must be decrypted, and only those who have the correct password or decryption key can make the data readable again.

Tip

Unencrypted data is called plaintext; encrypted or scrambled data is called ciphertext.

There are two basic types of encryption in use today. The first type is private-key encryption (symmetric-key encryption), where both people know the secret key to encrypt and decrypt the data. The second type is public-key encryption (asymmetric-key encryption), where the encryption software creates a public and private key. See our public-key cryptography definition for further information about this type of encryption.

Why is encryption needed?

You use encryption every day and are even using it now as you read this page. Encryption helps keep your information and actions private from everyone but the recipient of your information. For example, when you enter your credit card information on a web page, you only want to share that information with one company website. Suppose it was not encrypted; as you transmit that information, it could be intercepted and read by a man-in-the-middle attack. However, when the information is encrypted, if it were intercepted, it would be extremely difficult to read because of encryption. Encryption also helps keep stored information safe. For example, if you choose to save your credit card on a website, it's encrypted to prevent any employee or attacker from easily reading the information.

Is encryption bad?

No. Encryption is a very good thing, and without encryption, the Internet could not exist as it does today. However, like any technology, encryption can be used by bad people. Some argue that encryption helps protect bad people by preventing authorities from intercepting and reading their communications. However, allowing authorities or governments to bypass encryption to help monitor bad people also breaks encryption for everyone else at the same time. There is no method of only allowing a select few to bypass encryption. Creating a backdoor or other method to bypass encryption breaks the whole concept of secure data. Without that trust in knowing your data is secure, no one would use that method of encryption.

But I'm not doing anything bad, why would I care?

A common argument to allowing authorities the ability to bypass encryption is you're doing nothing bad and have nothing to hide. While it's great you're doing nothing bad, someone with the capability of monitoring you without encryption could be doing something bad intentionally or unintentionally. For example, even if you are okay with authorities reading all your private messages, you probably wouldn't want a stalker to have that same ability. When a method for breaking encryption is created, it can be exploited by anyone.

Encryption algorithms

There are many algorithms used to encrypt data. For example, a basic cipher known as simple substitution, substitution cipher, or Caesar cipher (named after Julius Caesar) shifts the alphabet letters over a few characters. Below is an example of the alphabet shifted over four characters.

Encrypt key: a=e, b=f, c=g, d=h, e=i, f=j, g=k, h=l, i=m, j=n, k=o, l=p, m=q, n=r, o=s, p=t, q=u, r=v, s=w, t=x, u=y, v=z, w=a, x=b, y=c, and z=d.

Decrypt key: a=w, b=x, c=y, d=z, e=a, f=b, g=c, h=d, i=e, j=f, k=g, l=h, m=i, n=j, o=k, p=l, q=m, r=n, s=o, t=p, u=q, v=r, w=s, x=t, y=u, and z=v

Using this technique, a user could encrypt the message: computer hope free help for everyone to: gsqtyxiv lsti jvii lipt jsv izivcsri. Below is an example of how this could be done using the Perl programming language.

my (%key, $new);
my $alpha = "abcdefghijklmnopqrstuvwxyz";
my $message = "computer hope free help for everyone";
@alpha = split(//, $alpha);
my $i=1;
foreach $alpha (@alpha) {
 if ($i >= 23) {
  $i = -3;
 }
 $key{$alpha} = $alpha[$i+3];
 $i++;
}
@message = split(//,$message);
foreach $message (@message) {
if ($message =~/[a-z]/i) {
 $new .= "$key{$message}";
}
else {
 $new .= "$message"; }
}
print "Old: $message\nEncrypted: $new\n";

Conversion tool

A version of the code above is also available online to encrypt and convert your text.


Below are some other examples of simple encryption algorithms.

  • Transposition encryption - adjacent characters are swapped.
  • Expansion encryption - additional characters are added between the data characters.
  • Compaction encryption - characters in the data are removed and stored elsewhere.

How do I decrypt or remove encryption?

To decrypt encrypted data, you must have the key that tells the computer or encryption program how to decrypt the data. Without the key, the information cannot be read or decrypted.

If encryption could be broken without a key, it would be considered insecure, and it would no longer be used.

How do governments bypass encryption?

Those who study cryptography may decrypt weak ciphers using cryptanalysis where the encrypted data is studied, and various methods are used to decrypt the data. However, weak methods like these are avoided because they are known to be insecure.

To break stronger encryption, you need access to a supercomputer capable of performing brute force attacks or using various algorithms in an attempt to break the encryption. However, some of the strongest encryption still cannot be cracked, even with the fastest supercomputer spending over a hundred years attempting to crack one message.

Because of this difficulty, most strong encryption is broken after a government subpoenas a company to assist in breaking or bypassing the encryption. Some governments may also request backdoor access through an encryption algorithm. However, all experts agree that once a backdoor is created, the encryption algorithm is no longer considered safe to use because it can be circumvented.

Can encrypted data be deleted?

Encrypted data is not protected data; it can be deleted, edited, overwritten, and even infected. Encrypted data could even be encrypted again using another encryption algorithm. If you have encrypted data you cannot access and want to recover the space it occupies, it can be deleted like all other files and doesn't require a key. If you have a full hard drive or operating system protected by encryption, it can also be formatted.

Note

Deleting encrypted data or formatting an encrypted drive does not recover the data that was encrypted; it removes the encryption and the data. In other words, all encrypted data is lost.

Note

If the encrypted data was caused by ransomware, deleting the encrypted files does not remove the ransomware. However, formatting the hard drive to erase everything and start over would remove the ransomware. Additionally, removing ransomware from a computer does not decrypt the data. The password or decryption key is still required to decrypt the data.

AES, Certificate authority, Cleartext, Cryptanalysis, Cryptography, Decryption, DES, Differential cryptanalysis, Digital signature, IDEA, Key, MDC, Node encryption, PGP, Public-key cryptography, Rijndael encryption, Security terms, SSL, Truecrypt