Click here to Skip to main content
13,355,335 members (72,503 online)
Rate this:
Please Sign up or sign in to vote.
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
Posted 27-Dec-12 2:33am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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?
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

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.
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?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.180111.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100