You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the padding scheme parameters for RSA (such as OAEPParams and PSSParams) are fixed in the constructors. However, it would be useful to allow users to specify the padding scheme parameters (e.g., hash functions, MGF functions, optional labels, etc.) in a more flexible manner. This would make it easier to work with different padding configurations, similar to how the Botan library handles this.
Desired Solution:
We should implement a more flexible constructor for the OAEPParams and PSSParams classes, allowing users to specify the parameters in a way that is closer to how Botan handles padding schemes. Specifically, users should be able to pass parameters like:
<HashFunction> <HashFunction>, MGF1 <HashFunction>, MGF1, <optional label> <HashFunction>, MGF1, <optional label>, <optional seed> <HashFunction>, MGF1(<HashFunction>) <HashFunction>, MGF1(<HashFunction>), <optional label> <HashFunction>, MGF1(<HashFunction>), <optional label>, <optional seed>
This would allow more granular control over the padding scheme configuration when constructing the parameters for OAEP and PSS.
Usage Example:
OAEPParams oaepParams(HashAlgorithm::SHA256, RSA_MGFFunctions::MGF1); // Specify hash and MGF function
OAEPParams oaepParams(HashAlgorithm::SHA256, RSA_MGFFunctions::MGF1, "myLabel"); // Include optional label
OAEPParams oaepParams(HashAlgorithm::SHA256, RSA_MGFFunctions::MGF1, HashAlgorithm::SHA512); // Custom MGF1 hash
The text was updated successfully, but these errors were encountered:
Currently, the padding scheme parameters for RSA (such as
OAEPParams
andPSSParams
) are fixed in the constructors. However, it would be useful to allow users to specify the padding scheme parameters (e.g., hash functions, MGF functions, optional labels, etc.) in a more flexible manner. This would make it easier to work with different padding configurations, similar to how the Botan library handles this.Desired Solution:
We should implement a more flexible constructor for the OAEPParams and PSSParams classes, allowing users to specify the parameters in a way that is closer to how Botan handles padding schemes. Specifically, users should be able to pass parameters like:
<HashFunction>
<HashFunction>, MGF1
<HashFunction>, MGF1, <optional label>
<HashFunction>, MGF1, <optional label>, <optional seed>
<HashFunction>, MGF1(<HashFunction>)
<HashFunction>, MGF1(<HashFunction>), <optional label>
<HashFunction>, MGF1(<HashFunction>), <optional label>, <optional seed>
This would allow more granular control over the padding scheme configuration when constructing the parameters for OAEP and PSS.
Usage Example:
The text was updated successfully, but these errors were encountered: