Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Tutorials, Classes and Code > Security Tutorials

Security Tutorials Tutorials on how to protect your software against crackers.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-03-2007, 11:01 AM
TcM's Avatar   
TcM TcM is offline
Terminator - I'll be back
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 5,718
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default Encryption – The Basics

Encryption – The Basics

What is encryption?
Short answer – Making something unreadable without first decrypting it.
Long answer – Let’s take an example string, ‘Text’ now as it is it is perfectly readable by any program, even your naked eye, now with encrypting it I could apply an algorithm to that string and transform it to virtually anything, for example, ’1548795200 7’ yeah, of course this was just a random number, but with some algorithm you could transform that string to anything. All you need is an algorithm. Might sound simple, yeah let’s just invent a formula, well fellas, when highly sensitive data is in place, and maximal security is needed then it is not so simple. We can virtually encrypt anything, a string, a file, a telephone line, sound, movies, text, internet connection and whatever we need to secure virtually.

When is this used?
This is used when we need security, we need to secure our sensitive documents, our financial information etc. We don’t need to encrypt our mp3 files, I bet you would not want to encrypt and decrypt an mp3 every time you want to listen to some music on your computer.

Why do we use it?
Well, nowadays privacy is a very important thing that every human needs, and we all want to feel safe about our data. We all know about crackers (usually mistaken as hackers) and we don’t want our document to be spread online freely for everyone to see. So that is one of the many reasons, another one would be to secure a software, even a shareware program, so as not to crack it simply by modifying some addresses in the program, if everything is encrypted it will be harder, as before we need to decrypt that, or find a security hole in the algorithm and exploit it, but still that is harder.

How can we do it?
We can achieve this by applying an algorithm to the file/string, in this manner we are actually destroying the original data and storing it as encrypted and the only way to retrieve the data back is not by going into the recycle bin and restoring it lol, but generally by applying the reversal of the encryption algorithm and get our data.

Now what’s next?
Now I made a software, which you can download at the end of this article, which you can experiment with. It contains 3 samples of the simplest string encryption algorithms I could find. These are called:
  1. Flipper
  2. Shifter
  3. Reverser

Now let’s start with the Flipper:
This one is very, very, very, simple. This divides the string into pairs, for example takes this string, ‘Text Here’ and it divides it into pairs of two like this ‘Te’, ‘xt’, ‘ H’, ‘er’, ‘e’ (note that near the H there is a space, that is counted as a character. And it flips each character with the other, it takes the first character and replaces it with the second and replaces the second with the first, so it is something like that ‘eT’, ‘tx’, ‘H ‘, ‘re’, ’e’ so the result will be like this:
‘eTtxH ree’

Now let’s continue with the Shifter:
This one perhaps is not so easily detected, but still is not secure enough, this takes a string, again let’s take ‘Text Here’ and it takes the ASCII of each and every character and it makes the ASCII plus one, for example if the ASCII is 60 this one will return it as 61. Basically the next letter in the alphabet (at least in the English alphabet, but let’s not forget of characters like space and such) so that string would be something like ‘Ufyu!Ifsf’

And last one the Reverser:
This one is basically very simple, it just reverses the string for example ‘Text Here’ would become ‘ereH txeT’

What’s the fun?
You can experiment with that software I made you can even apply more than one encryption on the same string. For example you can use the Reverse, the Shifter and then Flipper, and Shifter again and Reverser and so one. In that way the only method to get your original string back would be to click the buttons again in the reverse order! Or you will never get your original string back! Yeah that’s right, so those algorithms applied several times on the same string would make it a pretty secure encryption.
Attached Files To view attachments your post count must be 1 or greater. Your post count is 0 momentarily.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 12-09-2007, 10:04 PM
John's Avatar   
John John is online now
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,350
Last Blog:
PHP Function Overloadi...
Rep Power: 50
John is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of light
Send a message via AIM to John
Default

Whats the difference between encoding and encrypting?
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-10-2007, 08:17 AM
TcM's Avatar   
TcM TcM is offline
Terminator - I'll be back
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 5,718
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default

Well I am not 100% sure on this one but with 'encode' you can encode a video with a specific codec (like DivX) or transform analog signal into digital form encding can even be used in compression etc... while encrypting is more related to encrypting data.
I think....
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-11-2007, 10:46 AM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,135
Rep Power: 15
Lop is on a distinguished road
Default

Encoding is the process of transforming information from one format into another

Encryption is the conversion of data into a form, called a ciphertext, that cannot be easily understood by unauthorized people
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-11-2007, 12:39 PM
TcM's Avatar   
TcM TcM is offline
Terminator - I'll be back
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 5,718
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default

I think that I was close
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 12-13-2007, 10:55 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Mod
 
Join Date: Jul 2006
Age: 35
Posts: 1,751
Last Blog:
Game software (GURPS)
Rep Power: 24
WingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to all
Default

One thing to be aware of is that all three methods described, while valid examples of encryption, are almost completely useless for protecting data by today's standards. Most of the strong versions of encryption employ algorithms developed by mathematicians to make uncovering the original message extremely difficult.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 12-14-2007, 06:19 AM
TcM's Avatar   
TcM TcM is offline
Terminator - I'll be back
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 5,718
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default

Yeah - As I think that I said in the article its self, these are not recommended for use where sensitive data needs to be secured. There are only the very basics!
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-03-2008, 05:58 AM
Chinmoy's Avatar   
Chinmoy Chinmoy is offline
Programming Professional
 
Join Date: Feb 2008
Location: where heaven meets earth
Posts: 301
Rep Power: 5
Chinmoy has a spectacular aura aboutChinmoy has a spectacular aura about
Default encryption

thats good enough for starting.you can move on to higher ones like rc-64 maybe...but thats where you start.definitely.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-26-2008, 09:09 AM
Kaabi's Avatar   
Kaabi Kaabi is offline
Programming God
 
Join Date: Jul 2006
Posts: 884
Rep Power: 13
Kaabi is on a distinguished road
Default Re: Encryption – The Basics

I like learning about encryption, it is pretty interesting. Use an algorithm to encrypt strings and then use a special key to decrypt it. As you said, starts off simple and gets extremely complicated as you increase security.
__________________
Cheap Airsoft Guns

If you are looking for high-quality, yet cheap, airsoft guns, then check out MrAirsoft.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-26-2008, 11:16 AM
TcM's Avatar   
TcM TcM is offline
Terminator - I'll be back
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 5,718
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default Re: Encryption – The Basics

I totally agree. Besides that it's a very interesting subject, and has an important role in the IT sector.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall


Business Directory | Technology Blog | Windows Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Code: Simple Encryption Algorithm Void PHP Tutorials 4 04-19-2008 09:52 AM
C basics. justin1993 C and C++ 4 07-24-2007 07:56 AM
Software to implement encryption trust General Programming 2 02-21-2007 05:18 PM
Basics Of PHP sn17 PHP Forum 11 09-14-2006 08:26 PM


All times are GMT -5. The time now is 09:27 PM.

Contest Stats

dargueta ........ 93.00000
John ........ 87.50000
Xav ........ 50.00000
MeTh0Dz ........ 20.00000
gaylo565 ........ 18.00000
Johnnyboy ........ 3.00000

Contest Rules

Ads