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

Mo nanya nih...

Udah ada aplikasi yang untuk dengerin audiobook di android ga yah ?


biar bisa masukin iPhone ke laci :D

--~--~---------~--~----~------------~-------~--~----~
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group, please visit the following page:
 

2. Aksesoris untuk Magic (Screen protector,dll

Btw, anti glare ama anti grease (minyak) sama ngga sih? Soale sukanya ama
yang anti grease.





sabar brothers, nanti pas kiriman sudah datang akan di kabar kabari



tidak mengurangi sensi...
~...@herodroid

--~--~---------~--~----~------------~-------~--~----~ Google Groups
"Indonesian Android Community ...

--~--~---------~--~----~------------~-------~--~----~
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group, please visit the following page:
 

3. how to enumerate all character sets supported by android platform?

4. How to..

5. Empty EditText Causing force closes

6. Treoroid - cupcake on Treo650

7. Building launcher.apk from source code