RFR: 8130150: RSA Acceleration

Andrew Haley aph at redhat.com
Tue Jun 30 17:49:30 UTC 2015


On 06/29/2015 10:32 AM, Andrew Haley wrote:
> On 29/06/15 09:37, Vladimir Kozlov wrote:
>> Hi, Andrew
>>
>> Did you file RFE for this change?  8046943 is JEP.
> 
> No; I will do so.

Done.

>> typo? "less" -> "more".
>>
>> +     * number of ints in the number is less than this value we do not
>> +     * use the intrinsic.
>> +     */
>> +    private static final int MONTGOMERY_INTRINSIC_THRESHOLD = 512;
>>
>> trailing spaces:
>> src/java.base/share/classes/java/math/BigInteger.java:273: Trailing whitespace
>> src/java.base/share/classes/java/math/BigInteger.java:2770: Trailing whitespace
>>
>> I ran changes through JPRT and linux/solaris passed - thanks.
>> Next step - Windows:

In the end I had to punt on Windows.  It's ifdef'd out for someone who
works on Windows to fix.

>> I am fine with JDK changes.
>>
>> Would be nice to have a test for this change. Do existing tests
>> cover this code?
> 
> They do.

They don't.  The RSA tests don't run for long enough to test the
intrinsics.  I wrote a new test for Montgomery multiplication.

>> I agree that we should limit size when to invoke multiplyToLen
>> intrinsic too. File bug I will assign it.
> 
> OK.

JDK-8130154

New webrevs:

http://cr.openjdk.java.net/~aph/8130150-jdk
http://cr.openjdk.java.net/~aph/8130150-hs/

Andrew.





More information about the security-dev mailing list