Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Possible Duplicate:
Which type of encryption algorithms android supports, and which would be better?

I am confused about to use of DES. Triple DES, RSA and AES algorithms, I think I couldn't get more idea about them, so I am not able to think which algo would be better.

My Task :

I am developing an application who sends an encrypted String to PHP server, and PHP server decrypt it, and sends response to my application.

Please explain which algo should be better on Android and PHP both, and why?

share|improve this question
add comment

marked as duplicate by Rory Alsop Aug 5 '11 at 7:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 5 down vote accepted

It depends on what attacks you're worried about.

In general, I'd advise against creating your own scheme even if it uses accepted algorithms. Your case sounds like it is easily served with standard SSL, perhaps with client-side certificates as well as server-side.

If you go and use an encryption algorithn directly, without some widely accepted scheme around it, you're opening up to a whole range of attacks that you can't possibly think of all by yourself.

For instance, say you would just encrypt the string and transmit it over HTTP. An eavesdropper would not be able to decrypt it, but could save it and re-send it at a later time. Also, any scheme that doesn't introduce a freshness property, such as timestamp or nonce, will be susceptible to statistical attacks on those strings, especially if they contain text in a known language.

If there is no reason why normal SSL, perhaps coupled with authentication in the application, would work, the stick to that.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.