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. can we give margin in percentage instead of pixel??

Hi All,

I am facing a problem on UI creation for example
(android:layout_marginLeft="100px") when i switch to portrait to
landscape then left margin is fix but i want same left margin like we
mentioned in percentage.. Here in android dev how i mention left
margin in percentage??

- Jitu
--~--~---------~--~----~------------~-------~--~----~

2. msm_i2c_poll_notbusy fail in i2c_msm.c

Hi, all.
I am trying to implement the i2c driver for camera driver in msm7xxx.
msm_i2c_probe( ) is ok but when I try to call msm_i2c_xfer( ) in
i2c_msm.c by using i2c_transfer( ) in i2c_core.c then the
msm_i2c_poll_notbusy( ) function always returns fail.
when I read the status of i2c(e.g. readl(dev->base+I2C_STATUS)), that
value is 0x2100, so the bit mask I2C_STATUS_BUS_ACTIVE is set.
How can I avoid this time-out in msm_i2c_poll_notbusy( )?

thank you.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Automating application update listings

4. Does android provide SMP multicore support ?

5. Logcat View fails with "Could not create the view: For input string: "our" "

6. ViewGroup#onInterceptTouchEvent is only called once

7. Doc and Samples typos and suggestions?