views:

73

answers:

2

Suppose there is a string containing 255 characters. And there is a fixed length assume 64-128 bytes a kind of byte pattern. I want to "dissolve" that string with 255 characters, byte by byte into the other fixed length byte pattern. The byte pattern is like a formula based "hash" or something similar into which a formula based algorithm dissolves the bytes into it. Later, when I am required to extract the dissolved bytes from that fixed length pattern, I would use the same algorithm's reverse, or extract function. The algorithm works through special keys or passwords and uses them to dissolve the bytes into the pattern, the same keys are used to extract the bytes in their original value from the pattern. I ask for help from the coders here. Please also guide me with steps so that I be able to understand what steps are to be taken, what to do. I only know VB .NET and C#.

For instance:

I have this three characters: "A", "B", "C"

The formula based fixed length super pattern (works like a whirlpool) is: AJE83HDL389SB4VS9L3

Now I wish to "dissolve", "submerge" the characters "A", "B", "C", one by one into the above pattern to change it completely. After dissolving the characters, the super pattern changes drastically, just like the hash:

EJS83HDLG89DB2G9L47

I would be able to extract the characters from the last dissolved character to the first by using an extraction algorhythm and the original keys which were used to dissolve the characters into this super pattern. After the extraction of all the characters, the super pattern resets to the original initial state. Each character insert and remove has a unique pattern state.

After extraction of all characters, the super pattern goes back to the original state. This happens upon the removal of the character by the extraction algo:

AJE83HDL389SB4VS9L3

+1  A: 

If you're happy having the 'keys' for the individual bits of data being determined for you, this can be done similarly to a one-time-pad (though it's not one-time!) - generate a random string as your 'base', then xor your data strings with it. Each output is the 'key' to get the original data back, and the 'base' doesn't change. This doesn't result in output data that's any smaller than the input, however (and this is impossible in the general case anyway), if that's what you're going for.

Like your previous question, you're not really being clear about what you want. Why not just ask a question about how to achieve your end goals, and let people provide answers describing how, or tell you why it's not possible.

Nick Johnson
I am having feelings that in this way, if this can happen, super compression would be possible. For this purpose I was asking help from others to solve problems regarding this.
Tush
What is "super compression"? If you mean something that compresses all inputs to a smaller length, that's provably impossible.
Nick Johnson
A: 

Here are 2 cases

  • Lossless compression (exact bytes are decoded from compressed info)

In this case Shannon Entropy

clearly states that there can't be any algorithm which could compress data to rates greater than information entropy predicts.

  • Loosy compression (some original bytes are lost forever in compression scheme,- such as used in JPG image files (Do you remember setting of 'image quality' ??))

In this type of compression, you however can make better and better compression scheme with penalty that you loose more and more original bytes. (Down to example of compression to zero bytes, where zero bytes are restored after, but this compression is invented either - magical button DELETE - moves information to black hole (sorry for sarcasm );)

0x69