views:

75

answers:

3

My input string suppose is: 256 Bytes Ascii text. Let's assume I encrypted it with an encryption algo. But when I re-encrypt the same encrypted result string which was output of the first encryption, the size of the second result string from the second encryption from the same encryption algo increases, even doubles!

Dear friends! Is there any way to encrypt with different multiple encryption algos so that My resulted output string does not doubles in size, does not goes on expanding in size? Because I am using only one text string and encrypting it multiple times with only encryption algo. I hope you all understood what I am trying to say. Please answer. I would appreciate the answers as this question can solve my problem.

+3  A: 

Generally, you should not encrypt data more than once. If you need stronger encryption, do it the first time.

Anthony -GISCOE-
+1  A: 

It depends on which encryption scheme you are using. With ordinary symmetric cipher (or asymetric), with predefined keys, the output size will be the same as input (probably, padded to meet cipher block size boundary).

Also, check if you are not using Base64 encoding for output.

Nickolay O.
Tell me about any C# or VB .NET coding, or function, that I may test.
Tush
For instance, check functions from System.Security.Cryptography.*, or what do you mean?
Nickolay O.
I don't know much. You were talking about Symmetric cipher
Tush
You should read wikipedia about symmetric/asymmetric cryptography.Symmetric ones are AES, DES, 3DES and so on, asymmetric - RSA.
Nickolay O.
+1  A: 

If this is for not very secure communications, if you used any of the polyalphabetic substitution methods like vigenère cipher, then the length of the cipher text would not change. Even applying the same substitution over and over will not change the length of the string. Again, this is not for secure communication, but to answer to your question of how one can encrypt data.

Gangadhar
Please provide me hyperlinks, or full functions, or tell me the name of such Encryption Algorithms. I would like to test them. Thanks for the answer. :-)
Tush
You can check this - http://en.wikipedia.org/wiki/Vigenère_cipher and the related contents in the page.
Gangadhar