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

Inconsistent length for the generated secret using DH key agreement impl from SunJCE and PKCS11

    Details

    • Subcomponent:
    • Resolved In Build:
      b34
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        For certain DH parameter values, a shorter secret is generated, i.e. the leading one or two bytes have value 0x00.

        Thus, the regression test "com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java" failed intermittently when such shorter secret is generated.

        A slight modification to the above test program reveals the frequency of the failures as following:

        Failure reproduced at 421
        Failure reproduced at 241
        Failure reproduced at 433
        Failure reproduced at 85
        Failure reproduced at 118
        Failure reproduced at 184
        Failure reproduced at 1418
        Failure reproduced at 170

        Anyway, a ShortBufferException is thrown when the failure is reproduced.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  valeriep Valerie Peng
                  Reporter:
                  valeriep Valerie Peng
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: