Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4891331

BigInteger a.multiply(a) should use squaring code

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Some algorithms need to perform a lot of squaring operations (e.g. elliptic curve crypto). Squaring can be implemented in approximately half the number of primitive multiplications as general multiplication code.

        BigInteger has that code internally but it is not accessible by applications. To change that, the multiply(BigInteger val) code should include a this.equals(val) check and use the squaring code if so.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bpb Brian Burkhalter
                Reporter:
                andreas Andreas Sterbenz
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: