Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
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.
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.