Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Encryption using Random!?

  1. #1
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101

    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.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,478
    Blog Entries
    75
    Rep Power
    143
    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.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    What do you mean?

  5. #4
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20
    Your method seems similar to be getting at Public Key Encryption, but a poor implementation.

  6. #5
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    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.

  7. #6
    Join Date
    Jul 2006
    Posts
    16,478
    Blog Entries
    75
    Rep Power
    143
    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.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  8. #7
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    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.

  9. #8
    Join Date
    Jul 2006
    Posts
    16,478
    Blog Entries
    75
    Rep Power
    143
    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.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  10. #9
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    Quote Originally Posted by WingedPanther View Post
    without exposing that data
    What do you mean?

  11. #10
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20
    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.

Closed Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using a random function to generate another random funtion
    By Roger in forum General Programming
    Replies: 11
    Last Post: 08-23-2010, 08:07 AM
  2. "random" number generator is not random?
    By schwza in forum PHP Development
    Replies: 1
    Last Post: 06-04-2010, 01:58 AM
  3. XoR Encryption
    By DanSpd in forum C# Programming
    Replies: 0
    Last Post: 02-13-2010, 10:29 AM
  4. Encryption
    By TALucas in forum Java Tutorials
    Replies: 7
    Last Post: 04-06-2009, 04:19 AM
  5. Wi-Fi Encryption
    By TcM in forum Technology Ramble
    Replies: 6
    Last Post: 02-26-2008, 03:32 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts