id-ilych / as3crypto

Automatically exported from code.google.com/p/as3crypto
0 stars 0 forks source link

Java encrypted content fails to decrypt with Private Key #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate private/public keys using openssl (PEM for private key and DER for 
public key)
2. Use the public key to encrypt a small string in Java, with "RSA" Cipher, and 
loading the public key for encryption 
3. Encrypt the string in Java, and store it in a file with Base64Encoded
4. Goto Flex, load the private key, use Base64 class to decode the encrypted 
string
5. Pass the ByteArray to decrypt method

What is the expected output? What do you see instead?
The expected out should have been the original string
Actual: Caught error displaying the following
"Decrypt error - padding function returned null!-50-Error
null"

What version of the product are you using? On what operating system?
Built from the source, 1.3, using on Windows XP.

Please provide any additional information below.

Original issue reported on code.google.com by misrapan...@gmail.com on 14 Sep 2010 at 7:44

GoogleCodeExporter commented 9 years ago

Original comment by misrapan...@gmail.com on 14 Sep 2010 at 7:57

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by misrapan...@gmail.com on 14 Sep 2010 at 7:59

Attachments:

GoogleCodeExporter commented 9 years ago
I verified the decryption using openssl, and it works fine, it is just not 
working with RSAKey decrypt function. 

Original comment by misrapan...@gmail.com on 14 Sep 2010 at 8:01

Attachments: