You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexander Kleymenov (JIRA)" <ji...@apache.org> on 2006/11/09 13:06:38 UTC

[jira] Updated: (HARMONY-2125) [classlib][crypto] RSA Cipher implementation corrupts the data

     [ http://issues.apache.org/jira/browse/HARMONY-2125?page=all ]

Alexander Kleymenov updated HARMONY-2125:
-----------------------------------------

    Attachment: cipherbug.java

> [classlib][crypto] RSA Cipher implementation corrupts the data
> --------------------------------------------------------------
>
>                 Key: HARMONY-2125
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2125
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Kleymenov
>         Attachments: cipherbug.java
>
>
> RSA Cipher implementation used in Harmony corrupts the input data. So the data array with the leading zero bytes after encryption-decryption cycle results in array without leading zero bytes. To reproduce the problem run the attached test. Its output on Harmony is as follows:
>  
> -----------------------
> Initial data:
>  1 2 3 4 5 6 7 8 9 A B
> Encrypted and Decrypted:
>  1 2 3 4 5 6 7 8 9 A B
> PASSED
> -----------------------
> Initial data:
>  0 1 2 3 4 5 6 7 8 9 A
> Encrypted and Decrypted:
>  1 2 3 4 5 6 7 8 9 A
> FAILED: Encrypted/Decrypted data does not equal to initial
>  
> while on RI the output is:
>  
> -----------------------
> Initial data:
>  1 2 3 4 5 6 7 8 9 A B
> Encrypted and Decrypted:
>  1 2 3 4 5 6 7 8 9 A B
> PASSED
> -----------------------
> Initial data:
>  0 1 2 3 4 5 6 7 8 9 A
> Encrypted and Decrypted:
>  0 1 2 3 4 5 6 7 8 9 A
> PASSED
>  
> This problem causes unstable failure of the following unit test:
>  
> org.apache.harmony.tests.internal.net.www.protocol.https.HttpsURLConnectionTest

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira