Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
Member Login
Site Notices
Posted: 8/24/2004 4:50:26 PM EST
I have no idea what my pal is talking about and I'd like to help him---he's a contractor in iraq.

TIA

TimJ, who is not in Iraq, sadly.
Link Posted: 8/24/2004 4:58:01 PM EST
Link Posted: 8/24/2004 5:07:11 PM EST
No, his e-mail said CAT code. Something to do with pay.....I work for a bank, but I'm in investments...I can call around at work, but I hoped the brain trust that is ARFCOM would know tonight!

Regards,

Tim
Link Posted: 8/24/2004 5:15:19 PM EST
A CAT (letter 1, space, letter 3 , letter 1, letter 19) becomes:

C ECV

This is also called the Caesar cipher, as it was used by ceasers in ancient rome. The problem with this method is that certain letters and phrases appear with certain frequency in any given language. It would not take a particularly insightful cryptologist to deduce that the letter C is actually A and in short time he would have your message completely decoded. As you might also guess, since it has been around since the time of Roman Caesers, it has long since been broken, and is merely useful for educational purposes now.

A variation on this theme is the multi substitution alphabet. In this scheme you set up a series of alphabet shifts. For example you might have three alphabets the first being +1, the second –1, the third + 3. The first letter is adjusted according to the first encryption code, the second letter by the second code, etc. When you reach your last substitution alphabet you start over. In this case the above phrase:

A CAT encodes to

B B DU

This means that there will be no regular frequency of letters since a letter may be encrypted to differing values at different points in the message.The more substitutions you use the better. Also remember to use the ASCII codes for your blanks and punctuation marks as well. If you encrypt them it will make the code even harder to
break.

Now usually the alphabets consist of shifting a letter forward or backwards a given number of spaces. However you can use any mathematical function you like.


My Algorithm

My encryption algorithm is just a simple variation on the traditional multi-alphabet encryption. What I do is simply use the following steps:

Convert the character to its ASCII equivalent.
Adjust that value according to the first substitution alphabet.
Convert that value to hexadecimal.
Adjust that value according to the first substitution alphabet.
If the result is less than two characters append a zero to the beginning of the character.
Repeat the process for each character using each successive substitution scheme.


The essence of this method is simply applying a multi alphabet encryption technique,
multiple times.

NOTE This method also is simply for educational purposes and not meant for use in truly secure communications. If you want Visual Basic source code that implements this then click here VB Simple Encryption


Another way to encrypt is to simply use the bitwise XOR to exclusively OR
your ascii codes with some key (usually a randomly generated number). That same key can be XOR'ed back to the encrypted text to get back the original message.
The longer the key you use the better. Thus a 128 bit key is better than a 40 bit key

Let me illustrate how this works. If you type in
A CAT is first converted to ASCII codes and becomes
65 32 67 84 Those are then converted to binary numbers

01000001 00100000 01000101 01010100
Now you do an exclusive OR with some randomly generrated key
11001010 11010101 10101010 11111000
10001011 11110101 11101111 00101100 In order to decrypt it you just XOR the encypted version with they key again and you get back The original text. This is a simple example of single key encryption. Notice that we also got
the ASCII code for the blank space and encrypted it as well

Yet another encryption method involves public and private keys. In public and private keys
very large prime numbers are multipled together (and often put through some additional mathematical
steps) to generate two keys. The public key is one you give to anyone, and it encrypts messages
The private key you keep for yourself, and it decrypts messages that have been encrypted with your
public key.

Link Posted: 8/24/2004 5:20:57 PM EST
Great post ar50troll, thanks!
Link Posted: 8/24/2004 5:44:24 PM EST
ar50troll, I am indeed indebted to you.
Many thanks!

Tim
Top Top