• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Rooks Forgenal
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • 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

 
Junilu Lacar
Sheriff
Posts: 11435
176
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
You cannot prevent theft/hacking. You can only make it prohibitively difficult to succeed at theft/hacking.

RF
 
Henry Wong
author
Sheriff
Posts: 23292
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • 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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • 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
 
Campbell Ritchie
Marshal
Posts: 56227
171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You use dice to make the one time pad
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!