Details
Description
Name: js151677 Date: 09/13/2004
A DESCRIPTION OF THE REQUEST :
64bit CPUs like AMD Opteron can multiply two 64bit integers and produce a 128bit result. in Java there is currently no way to access this feature. VMs even have no way to offer this capability to an application, because there is no 128bit type for returning the result.
JUSTIFICATION :
in the security area, asymmetric cryptography plays an important role. algorithms like RSA use long integer arithmentic extensively. for instance, certain baisc long integer operations like multiplication have quadratic running time. in this case, using a 64bit multiplication as a basis instead of a 32bit muliplication can decrease the number of required steps to a fourth. thus, time consuming RSA operations could be much faster just by exploiting 64bit muliplication.
this feature could speed up the java.math.BigInteger class significantly.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED 
the most natural thing would be to introduce a 128bit type; e.g. long128.
CUSTOMER SUBMITTED WORKAROUND :
use 32bit multiplication with 64bit results. however, using this takes four times longer in an algorithm with quadratic running time.
(Incident Review ID: 310503)
======================================================================
Attachments
Issue Links
 relates to

JDK8157527 Replace @since 1.9 with @since 9 on new math methods
 Resolved

JDK8157502 make docs broken after JDK5100935
 Closed

JDK8157485 Improve 64bit integer multiplication with Montgomery multiplication
 Open

JDK8014320 Faster multiplication and division of very large integers
 Open

JDK8187684 Intrinsify Math.multiplyHigh(long, long)
 Resolved

JDK8188044 We need Math.unsignedMultiplyHigh
 Resolved

JDK8188046 java.lang.Math.mutliplyHigh does not run in constant time
 Resolved

JDK8182981 Need tests for missing coverage in java.lang.Math
 Closed

JDK6535058 Inconvenient to detect overflow while multiplying two long values
 Closed