Alright, this is one of my firsts tut's...I did my best....Feed-back would be amazing....
um, Hope you like it...
In ths tutorial I will try to demonstrate the many different ways one can use Encryption and how widely spread they are...I will stick to mainly
basic and simple implementations of encryption to maximize the learing potential. I hope that this will help some of you understand more about encryption and that you enjoy reading this as much as I enjoyed writing it :D
Simple Alfabet Sunbstitution:
This method of encryption has been used for up to thousands of years, how ever it isn't very secure because a simple algorithme can be writen to crack it.... it is how ever very easy to impliment, and thus some times used when trying to keep simple messages private in a public area.
The data is read down, the letter you are trying to encrypt would be substituted with the one below it, when decrypting, you simply run the cycle in reverse.
It is important to notice that each letter only occurs ONCE on each line, and that EVERY letter has a counter cipher, if this was not true, then the encryption would yeald corrupted data.
Let's try it:
SAM HAS TWO HATS - Normal Text.
TRV XRT KCM XRKT - Encrypted text.
This isn't very hard and I'm sure every one has done something like this during school at one point, so I will move on quickly.
-=-Alphabetic Encryption usinc a Matrix:
This is where it starts getting a little bit more difficult, although You should all be able to follow.
In this Matrix, the X-axis deals with the Letter in question, the Y-axis deals with it's possition in the string.
If the string is Longer than then length of the Y-Axis, then we simply sart at the top again...
So, let's try to encrypt the same string as last time with this Matrix, I have intentionaly left the fist line identical to the one used last one so
SAM HAS TWO HATS - Text to be Encrypted
TQP OVK NRJ VRNW - Encrypted Text, only digit 1 and 11 are equal to that of the simpler encryption.
-=-Adding a whole new Dimension to it Matrix Encryption:
A now we are going to add a new Dimantion to this, a third dimention...I'm only gona take the Z dimention to two levels because ten yould be very big. the idea of a third dimention simply means you use a more matrecies and swap between them.
| MATRIX |||
| DATA ||
Now, if you where going to encrypt some text, you woul have to keep track of where you where in the text and weather or not the current you where on Matrix 1 or 2, this is simply done by counting and simple math's, for a high end Encryption matrix you would use 256 Matrecies all 256x256, this means that you can cover every character in the ASCII character set, this means that you can use the X as the Pure text variable, the Y as the possition in the Text, and the Z as a character in a password, thus if you where encrypting the Character A in possition 3 using the Password-Character in possition 3 you will get an answer that is near impossible to crack without the Key-Matrix which can acctualy be called a cube, sice it has three dimention's now.
XOR is a Binary Level of Data manipulation, it stands for Exclusive OR gate, and works very much like an OR gate, with the exception that once both input A and B are 1(on) the Q(out put) will be 0(off) where as in an OR gate it would be 1
XOR can be used to encrypt because if you input A as a singel Character or pure text and B a singel character of Password-text, then the out put will be encrypted A XOR B, the whole process is a triangle, input two parts, and the third will come out, no matter which way you do it.
This means that:
A XOR B = C
B XOR C = A
A XOR C = B
XOR is simple to implement because all you need to do is go along the password and the pure-text and XOR them one by one respectivly, how ever, a false message can emerge simply by altering the Key, this means that false key's can be sent that will decrypt the data in a false way. One thing that is important to keep in mind is that the password needs to be shorter or equal to the Pure-text or the trailing Parts of the Password will be useless.
One Implementation of XOR will allow you to make almost un-crackable messages...
Take Plaintext A and encrypt it with Password B to give you Cipher C
Then you have a fake Message (F) that you want C to decrypt as well, then to find the False Key (D) you would Encrypt F and C to give you D, now, when you Decrypt C with D you get F, thus you have generated two messages within the same text, this means that you can hide Cipherd text inside already cipherd text.
I hope this helps to shed some light on the simple encryption out there....
- Noia 3/1/2003
Due to some probs with the ASCII-art I'v made this tut available for Download.
Very interesting tutorial. I really didn't know what an encryption was but now i understand the basics. Thanks for the tutorial Noia.
noia >> nice tutorial, itd been cool if you would have went over md5 though (military grade and non-decryptable once encrypted back to the original message) Interesting stuff. /me likes Matrix encryption. heres some good stuff on md5 for others that are interested: http://infocenter.cramsession.com/te...ml.asp?ID=1662
anyway nice work noia.
I really don't know any thing about MD5, but I'm interested....I'll read up on it and try to make a tut in this series, if I can :)
tanx for the feed back :D
Great, noia. really interesting and comprehensive.
About MD5, I think you may find this RFC interesting: http://www.rfc-editor.org/rfc/rfc1321.txt . Enjoy!
cool, that's a Nice tut on MD5, I'm also trying to read up on DES and such, though they have a website. I'll be back soon with a more in-depth look at Encryption....tanx guys.