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.