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

RSASSA-PSS signature verification fail when using certain odd key sizes

XMLWordPrintable

    • b10
    • generic
    • generic

        For certain odd key sizes (N = 8x+1, i.e. multiples of 8 plus 1), the encoded message for PSS processing is one-byte shorter than the key size. For example, per RFC 8017, PKCS#1 v2.2, if the key size is 1025 bits (rounded up to 129 bytes), the length of encoded message should be 128 byte. However, the current impl of SunRsaSign provider uses the key length which has been rounded up in bytes as the length of the encoded message instead of calculating from the key length in bits. This causes the signature verification to fail unexpectedly as the verification is being performed on wrong range of bytes.

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

                Created:
                Updated:
                Resolved: