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

Problems with AES-GCM native acceleration

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      x86_64
    • OS:
      linux_ubuntu

      Backports

        Description

        A DESCRIPTION OF THE PROBLEM :
        1. Encrypting large data buffers, using only cipher.doFinal(buffer) call is slow. Hardware acceleration kicks in only after encrypting multiple buffers in a loop.
        2. Splitting encryption into many cipher.update calls, followed by cipher.doFinal, triggers the acceleration almost immediately. Should be done automatically inside a single cipher.doFinal(chunk) call (see 1.)
        3. Most significant problem: Splitting DEcryption into many cipher.update calls, followed by cipher.doFinal, does not trigger the acceleration. Hardware acceleration kicks in only after encrypting multiple buffers in a loop. Meaning that decryption of gigabytes of data cannot be accelerated by AES-NI hardware.

        See https://stackoverflow.com/questions/48905291/java-9-aes-gcm-performance
        (same is true for Java 10). Feel free to contact me for additional details.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        https://stackoverflow.com/questions/48905291/java-9-aes-gcm-performance
        (same is true for Java 10).


        ---------- BEGIN SOURCE ----------
        https://stackoverflow.com/questions/48905291/java-9-aes-gcm-performance
        (same is true for Java 10).
        ---------- END SOURCE ----------

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ascarpino Anthony Scarpino
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: