Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 18 in printed book and digital formats -- plus a one-year subscription (beginning with 19.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 19.4 ('SpeedTest')
Instant purchase and download via GumRoad!

FEATURE

Exploring Cryptography, Part 2

Introducing the MonoAlphabetic Substitution Cipher

Issue: 19.4 (July/August 2021)
Author: Eugene Dakin
Author Bio: Eugene works as a Senior Oilfield Technical Specialist. He has university degrees in the disciplines of Engineering, Chemistry, Biology, Business, and a Ph.D. in Chemical Engineering. He is the author of dozens of books on Xojo available on the xdevlibrary.com website.
Article Description: No description available.
Article Length (in bytes): 16,679
Starting Page Number: 56
Article Number: 19405
Resource File(s):

Download Icon project 19405.zip Updated: 2021-07-01 11:16:22

Related Web Link(s):

http://xdevmag.com/browse/19.3/19306/

Excerpt of article text...

My previous article discussed the use of the simple Caesar Cipher (http://xdevmag.com/browse/19.3/19306/). This article explores a more secure method of encrypting and decrypting information which is called the MonoAlphabetic Cipher. All of the code has portable methods that can be copied and pasted for your program to use.

For a quick review, a cipher is a method to encrypt the original message, such as shifting the alphabet by a certain number of letters. The Key then determines how to rearrange the message. In the previous Caesar example, the key was 4, which means to shift the alphabet by 4 as in the Cipher Ring shown in Figure 1.

The problem with the Caesar Cipher is that it is easier to decipher, break, or hack. There are only 25 possible combinations since there are 26 letters of the alphabet. (The 26th key is the original set of alphabet letters, which isn't encrypted at all.)

There is no such thing as an unbreakable cipher code, although the Monoalphabetic Cipher makes it much more difficult to decipher the encoded content. With increased computing power, someone can usually uncover the rules used in any encryption.

If you wanted to send a secret message to another in school, you could use cryptography to make the message difficult to read if someone had access to your message and was not the intended audience. A loose definition of cryptography is to protect secret messages, as is commonly performed by the military.

Using a Monoalphabetic Cipher the number of ways to encrypt and decrypt the code becomes significantly more difficult. Instead of shifting all of the alphabet by 4, we randomly scramble each letter of the alphabet as shown in this table:

...End of Excerpt. Please purchase the magazine to read the full article.