• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

A Fun Algorithm For Scrambling Data With the Option to recover It

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't put it all on here because it is at least 60 lines of code. However, I can give you the gist via pseudo-code. This is the recovery algorithm. To make the cipher, it is really just the reverse of this, with the need to fill in the holes with garbage data. You can make ciphers with as many passes as you like. Just reverse the string and encode again. Each time the data gets more scrambled (but you need a new terminating character each time you do).

Is this useful? Yes and No. By itself, it is no substitute for RSA encryption. However, you can use something like this to scramble the message before it is encrypted with RSA to make it even MORE difficult to reverse for potential hackers. With this you can force the need for an entire piece of data to arrive and be deciphered with RSA before you can unscramble it. That means that a hacker who gets a partial piece of data can get nothing from it even if they break the RSA (which is unlikely). Good times.

RF

 
Sheriff
Posts: 17356
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know, that seems to me like saying "Don't worry, if the thief breaks the lock at least you still have that piece of string I tied to the door knob to keep him out."
 
Rooks Forgenal
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot prevent theft/hacking. You can only make it prohibitively difficult to succeed at theft/hacking.

RF
 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rooks Forgenal wrote:You cannot prevent theft/hacking. You can only make it prohibitively difficult to succeed at theft/hacking.



True. However, if you don't believe that an encryption algorithm is sufficiently strong enough, possible solutions are... (1) use a different (stronger) encryption algorithm, (2) use a longer key with the current encryption algorithm, or (3) use another encryption algorithm in addition to the current encryption algorithm.

Algorithms that munge the text, while does confuse hackers, doesn't really make the overall algorithm stronger -- as relatively, it is in a different order of magnitude.

Henry
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rooks Forgenal wrote:You cannot prevent theft/hacking. You can only make it prohibitively difficult to succeed at theft/hacking.


Sure, but I'm not sure that your code adds much difficulty. As I recall (and I'm sure I'll be flamed if I'm wrong), plain old XOR with a passphrase is moderately tough to crack.

Winston
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An XOR with a one-time-pad is impossible to crack but then you have the problem of protecting the one-time-pad.

Bill
 
Marshal
Posts: 76879
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You use dice to make the one time pad
reply
    Bookmark Topic Watch Topic
  • New Topic