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

KeyAgreement : generateSecret intermittently not resetting

    XMLWordPrintable

    Details

      Backports

        Description

        It's noticed that the KeyAgreement : generateSecret - Not resetting and generating the same secret occasionally.

        Please find the attached standalone code -
        The sample initializes the KeyAgreement and generates a secret(secret) , and again try to generate a secret(secret1)

        The secret and secret1 does not match occasionally.

        Note - attached sample repeated for 50 times, to see the failure.

        Interestingly the generated secret1 after reset mismatches only the first byte of the secret.

        The failure output.
        ===========
        #### generateSecret() doesn't successfully reset KeyAgreement object.[-48, 71, -8, -56, -123, 13, 106, -6, 54, -8, -22, -71, -53, 16, 27, 5, 123, -110, 32, -10, 80, 57, -115, 11, -103, 52, 16, -86, 124, -64, 18, -103, 90, 4, 119, 68, -18, -17, -97, 52, -13, -41, -15, -101, -56, -55, -23, 44, -3, -85, -33, 5, 70, 31, -53, 1, 119, 10, 101, 3, 114, 106, 121, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
         [0, 71, -8, -56, -123, 13, 106, -6, 54, -8, -22, -71, -53, 16, 27, 5, 123, -110, 32, -10, 80, 57, -115, 11, -103, 52, 16, -86, 124, -64, 18, -103, 90, 4, 119, 68, -18, -17, -97, 52, -13, -41, -15, -101, -56, -55, -23, 44, -3, -85, -33, 5, 70, 31, -53, 1, 119, 10, 101, 3, 114, 106, 121, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        ==========


          Attachments

            Issue Links

              Activity

                People

                Assignee:
                weijun Weijun Wang
                Reporter:
                kganapureddy Krushnareddy Ganapureddy
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: