Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Dear everyone,
I have a some data in byte array but don't know its algorithm and how to encrypt/decrypt it.

For example:
array of bytes { 128, 12, 229, 248 } => Data
array of bytes { 128, 12 } => Da
array of bytes { 128, 12, 229 } => Dat
array of bytes { 128, 229 } => ..WRONG DECRYPT STRING
array of bytes { 165, 15, 242, 253, 164, 177, 2, 30, 166, 14, 40, 121, 40, 88, 61, 189, 61, 181, 15, 166, 162 } => abcdefgh1234567890ABC

Note: if I change position of some bytes, it'll go wrong

Please help
Thanks.
Posted

I have been restore my iphone, but I cannot restore SMS, so I found a application that allow restore SMS from itune. I have not backup SMS on I itune except cvs files. So I have to type message one by one to import to my iphone.
I found a database sqlite inside that application, but each sms store content in byte, so I have to know how to encrypt my message to byte in order to import to my phone. That's is my reason.

WRONG DECRYPT STRING mean the that bytes are convert to incorrect string. For example: array of bytes { 128, 229 } => D
I know the result by change body byte and get result string in my phone.
 
Share this answer
 
Comments
Philippe Mori 3-Jan-13 10:31am    
If the data was encrypted, then the application probably has a key that is used with an encryption algorithm. You don't now either so It might be almost impossible to decrypt the data or it might take very long time to you or a computer to figure it out...

Instead of importing SMS from the cvs file using the database, why not write those message in an email for example?
How have you found the answer for your sample ?

Usually encrypring algorithm should give data that is hard to decrypt otherwise it would be almost pointless to encrypt the data. The harder is it to decrypt, better is the security.

Looking at your sample, it seems that the number of bytes matches the number of characters and that one can trucate a string one side and get a truncated string the other side of the same length.

However, the same character can have different values depending on the position.

When you say WRONG DECRYPT STRING, what do you mean? Do you expect something and get something else? How do you now it is wrong. What did you get? What did you expect?

Do you have the source code for the encryption and decryption? If not, is it legal for you to try to decrypt that data or you are trying to steal some encoded informations you should not have access?
 
Share this answer
 
The question doesn't make sense.

What algorithm??

Are you asking how to decrypt the data? Without knowning how it was encrypted you're not going to be able to decrypt it.

Are you asking what the meaning of the data is? Without the documentation on it, it's just a bunch of giberrish.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900