Lost Password?

Go Back   CodeCall Programming Forum > Software Development > General Programming > Programming Theory

Programming Theory Discuss programming theory, algorithm efficiency, logic, and other any other category where math and computer science overlap.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-31-2007, 07:36 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,748
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default Encryption using Random!?

Ok so last night I was thinking... if in encryption we use random integers.. won't it be safer?

I'm just going to show a simple thing.. just so people can understand..so:

Let's encrypt:

A -> (ASCII*66)+random number

I know what you are thinking.. is it's random.. it's useless, not an encryption.. NO keep on reading....

So let's transform that into numbers

(65*66)+125=4415

Now what if we store that random number, 125, into the 4415 it's self for example inserting in the 1st,3rd and last digits, like this:
1454152

The bold numbers will be the stored random number I know it's 1,5,2 and then we swap the 2nd with the 3rd to bring it back to 125

And then we just reverse the algorithm

4415-125 = 4290/66 = 65->A


Of course we can make it more secure by for example adding a fixed number to the random number and store it... there are many.. many methods..

But what I mean is that in this way every encrypted string will be unique and it will have endless possibilities because for example A can be 4415 or maybe it can be 4790 (if the random number is 500) and of course we just insert the random number. so the same string.. will be different each time.

What do you think? Is this practical? Are there any algorithms that already use this? Is this safer?

Thanks for your comments.
__________________
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-31-2007, 11:31 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Mod
 
Join Date: Jul 2006
Age: 35
Posts: 1,758
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

At that point, you put the key directly into the encrypted message, making it relatively easy to decrypt. You are better off using random numbers to "bulk" the message with non-sense data that can be scrubbed out.
__________________
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
  #3 (permalink)  
Old 12-31-2007, 12:06 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,748
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default

What do you mean?
__________________
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-31-2007, 02:16 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,364
Last Blog:
PHPUnit
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

Your method seems similar to be getting at Public Key Encryption, but a poor implementation.
__________________
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
  #5 (permalink)  
Old 01-01-2008, 02:49 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,748
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default

Hmm what is a Public Key Encryption exactly? And As I said.. this was just a simple example.. of course it can be much improved.
__________________
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 01-02-2008, 11:04 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Mod
 
Join Date: Jul 2006
Age: 35
Posts: 1,758
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

If your Random Number is 125, and your cipher text (by other means) is 'abcdef' make new cipher text '1ab2cd5ef' with the 125 as garbage data.
__________________
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 01-02-2008, 12:22 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,748
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default

So you encrypt and then just insert nonsense numbers and stuff.. right? but that nonsense does not a make a part of the algorithm as in my example.
__________________
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 01-03-2008, 11:07 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Mod
 
Join Date: Jul 2006
Age: 35
Posts: 1,758
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

Right. Unfortunately, I have yet to see a method of including random data in the encryption algorithm without exposing that data, reducing the value of having random data in the first place.
__________________
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
  #9 (permalink)  
Old 01-03-2008, 05:26 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,748
Rep Power: 47
TcM is a jewel in the roughTcM is a jewel in the roughTcM is a jewel in the rough
Default

Quote:
Originally Posted by WingedPanther View Post
without exposing that data
What do you mean?
__________________
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
  #10 (permalink)  
Old 01-03-2008, 07:40 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,364
Last Blog:
PHPUnit
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

Quote:
Originally Posted by TheComputerMaster View Post
Hmm what is a Public Key Encryption exactly?
With public key encryption there are two "keys." A public key and a private key. The public key that is know to everyone, and is usually a large *prime* number which is used to encrypt the data.

Then there is a private key that is mathematically related to the public key, but is cannot be practically derived from the public key which is used to decrypted the message.

To create a poor analogy, in your example, the random number may be the public key, and 66 may be the private key.
__________________
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

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
Encryption – The Basics TcM Security Tutorials 14 06-07-2008 09:41 AM
PHP Code: Simple Encryption Algorithm Void PHP Tutorials 4 04-19-2008 09:52 AM
Return random numbers without duplicates Paradine PHP Tutorials 0 08-26-2007 02:07 PM
Software to implement encryption trust General Programming 2 02-21-2007 05:18 PM
Code:PHP Random Functions John PHP Tutorials 2 12-03-2006 10:04 AM


All times are GMT -5. The time now is 01:27 AM.

Contest Stats

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

Contest Rules

Ads