Well, I'm not talking security wise, just compatibility wise, nor did I say that this was Android specific. However, what I did say was that you do have to do this in order to get PHP-Android encryption working. Android to PHP encryption with AES will not "just work" without adding the null padding or some other mutually recognized padding, so I'd say that yes this is slightly special as I stated before.

On 7/19/2010 11:32 AM, Bob Kerns wrote:
That's not something special. That's actually what the algorithms are
specified to require, and the APIs reflect that. They're not even
Android-specific APIs, they're Java APIs, and the algorithms are
standards and not tied to language or platform.

Ideally, you'd pad with random bytes, instead of null bytes, which
probably weaken the encryption significantly -- any time an attacker
knows part of the message, it makes his job simpler.

So I'd say PHP's behavior is a special case, and even a design flaw
(both a convenience AND a design flaw, viewed from the standpoint of
conflicting requirements).

On Jul 19, 5:45 am, "Raymond C. Rodgers"<[email protected]>
wrote:
There is slightly. You need to null pad the data being encrypted to make
sure it's evenly divisible by 16 on Android. PHP does it automatically
and silently. See my posts in this thread:

http://groups.google.com/group/android-developers/browse_thread/threa...

Raymond

On 7/19/2010 7:58 AM, DanH wrote:



Maybe it's because there's nothing special you need to do.
On Jul 19, 6:10 am, sblantipodi<[email protected]>    wrote:
it's quite incredible, no article on internet talks about cypher with
android and php or servlet...
On Jul 18, 8:46 pm, sblantipodi<[email protected]>    wrote:
Hi,
is there some code snippet that show how to encrypt a password with
Android
and then decrypt it with php?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to