Problem resolved:
http://stackoverflow.com/questions/8885261/is-it-possible-for-android-application-to-implement-rsa-none-pkcs1padding-rsa

Jan Burse schrieb:
Dear All,

I see a strange cipher result. I am using the
following code with a public RSA key:

System.err.println("res = " + toHex(res, p, RSA_OUTPUT));
byte[] temp = cipher.doFinal(res, p, RSA_OUTPUT);
System.err.println("temp = " + toHex(temp, 0, temp.length));

When I run the code on Java SE, I get:

res = XXXX - cipher 64 bytes - XXXX
temp = YYYY - plain 32 bytes - YYYY

When I run the code on Android, I get:

res = XXXX - cipher 64 bytes - XXXX
temp = 01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
YYYY - plain 32 bytes - YYYY

Where does the 01ff...ff00 come from? Can I get rid of it?

Bye



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

Reply via email to