Encrypt

Updated: 07/12/2017 by Computer Hope

EncryptThe process of making data unreadable by other humans or computers for the purpose of preventing others from gaining access to its contents. Encrypted data is generated using an encryption program such as PGP, encryption machine, or a simple encryption 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.

A very basic encryption technique known as simple substitution, substitution cipher, or Caesar cipher (named after Julius Caesar) that shifts the letters of the alphabet over a few characters. For example, as shown below the alphabet has been 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 Perl.

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 above code is also available online to encrypt and convert your own text.


AES, Asymmetric Encryption, Cleartext, Cryptanalysis, Cryptography, Decryption, DES, Differential cryptanalysis, IDEA, Key, MDC, Node encryption, PGP, Rijndael encryption, Security terms, SSL, Truecrypt