Skip to main content
Tech Talk

A Closer Look at Encryption

I created this basic encryption program that converts a line of text into their ordinal numbers (i.e. A=97, space= 32) then runs a mathematical function on the numbers to scramble the data. In this simple example the program adds 2 to each of the ordinal numbers.

Write what you would like to encrypt: a b c d

[‘a’, ‘ ‘, ‘b’, ‘ ‘, ‘c’, ‘ ‘, ‘d’]

 

This is the unencrypted ordinal numbers

[97, 32, 98, 32, 99, 32, 100]

 

This is the encrypted ordinal numbers

[99, 34, 100, 34, 101, 34, 102]

 

This is the encrypted data

[‘c’, ‘”‘, ‘d’, ‘”‘, ‘e’, ‘”‘, ‘f’]

 

In this case it is very easy to see how the algorithm works, abcd became cdef  and instead of spaces, they were replaced with quotation marks. So this would be an easy encryption algorithm to break. Let’s see how it works with a complete sentence:

 

Write what you would like to encrypt: The quick brown fox jumps over the lazy dog

[‘T’, ‘h’, ‘e’, ‘ ‘, ‘q’, ‘u’, ‘i’, ‘c’, ‘k’, ‘ ‘, ‘b’, ‘r’, ‘o’, ‘w’, ‘n’, ‘ ‘, ‘f’, ‘o’, ‘x’, ‘ ‘, ‘j’, ‘u’, ‘m’, ‘p’, ‘s’, ‘ ‘, ‘o’, ‘v’, ‘e’, ‘r’, ‘ ‘, ‘t’, ‘h’, ‘e’, ‘ ‘, ‘l’, ‘a’, ‘z’, ‘y’, ‘ ‘, ‘d’, ‘o’, ‘g’]

 

This is the unencrypted ordinal numbers

[84, 104, 101, 32, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, 110, 32, 102, 111, 120, 32, 106, 117, 109, 112, 115, 32, 111, 118, 101, 114, 32, 116, 104, 101, 32, 108, 97, 122, 121, 32, 100, 111, 103]

 

This is the encrypted ordinal numbers

[86, 106, 103, 34, 115, 119, 107, 101, 109, 34, 100, 116, 113, 121, 112, 34, 104, 113, 122, 34, 108, 119, 111, 114, 117, 34, 113, 120, 103, 116, 34, 118, 106, 103, 34, 110, 99, 124, 123, 34, 102, 113, 105]

 

This is the encrypted data

[‘V’, ‘j’, ‘g’, ‘”‘, ‘s’, ‘w’, ‘k’, ‘e’, ‘m’, ‘”‘, ‘d’, ‘t’, ‘q’, ‘y’, ‘p’, ‘”‘, ‘h’, ‘q’, ‘z’, ‘”‘, ‘l’, ‘w’, ‘o’, ‘r’, ‘u’, ‘”‘, ‘q’, ‘x’, ‘g’, ‘t’, ‘”‘, ‘v’, ‘j’, ‘g’, ‘”‘, ‘n’, ‘c’, ‘|’, ‘{‘, ‘”‘, ‘f’, ‘q’, ‘i’]

 

As we can see, even an algorithm this simple can make the data unreadable, “The quick brown fox jumps over the lazy dog” became “Vjg”swkem”dtqyp”hqz”lworu”qxgt”vjg”nc|{“fql” . All it takes to decrypt this data would be to run it through a decryption program that subtracts two from each ordinal number and outputs the numbers back to letters.

Encryption becomes more secure as the function that scrambles the data gets more complex. There are standards of encryption which are often defined by a bitrate. The bitrate defines the amount of bits that the decryption key uses. The most common form of encryption is AES, it is trusted as the standard by the U.S. government. It ciphers data at 128-bits, 192-bits, or 256-bits. AES Encryption is used in Automated Business Solutions MaxxD backup Solutions powered by Barracuda.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.