Encrypt with Android using AES, decrypt with PHP...

by Raymond C. Rodgers » Mon, 19 Jul 2010 20:45:58 GMT


Sponsored Links
 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:





Encrypt with Android using AES, decrypt with PHP...

by Raymond C. Rodgers » Tue, 20 Jul 2010 00:26:21 GMT


 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.




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"<raym...@badlucksoft.com>
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:


Sponsored Links


Other Threads

1. data access

Hi,

How do I access the data of an intent that has already been performed.
For example, I sent a text message and now I want to retrieve the
contents
of that message (subject, body, recipient) or the time the message
was sent, or similar....

any suggestion is appreciated

thx in advance

--~--~---------~--~----~------------~-------~--~----~

2. Detecting Noise

Hi everyone.
I am trying to develop a program which detects noise level of
outside.Is it loud or silent? How loud?

Where should I start? Is there any example ? Any comment will be
greatly appreciated...

--~--~---------~--~----~------------~-------~--~----~

3. When to setResult for onActivityResult

4. Can I add a custom qualifier to resource directory?

5. aapt ERROR

6. Need an on-device exception viewer

7. Other payment mechanisms for apps