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

OAEPParameterSpec does not work if MGF1ParameterSpec is set to SHA2 algorithms

    XMLWordPrintable

Details

    • b105
    • generic
    • generic
    • Verified

    Description

      OAEPParameterSpec wants a:
      1) A digest, which can be MD5, SHA1, or SHA2 family
      2) a MGF name, which can only be MGF1
      3) a MGF1ParameterSpec, which can be SHA1 or SHA2 family
      4) PSource, which is "a source of encoding input"

      With using the algorithm string OAEPWithSHA[1|244|256|384|512]AndMGF1Padding, all these values are preset and the digest is set to the SHA1 value in the algorithm name, but the MGF1ParameterSpec is set to SHA1 by default.

      With OAEPPadding, one can customize the OAEPParameterSpec to allow MGFParameterSpec to be something other than SHA1. When set to any of the SHA2 algorithms, it fails.

      Attachments

        Activity

          People

            ascarpino Anthony Scarpino
            ascarpino Anthony Scarpino
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: