0 votes
by (250 points)

How can I handle errors when decrypting a mail?

1 Unsupported OAEP encoding parameters source
2 Unsupported OAEP hashing algorithm and mask generation algorithm combination

The sender insists that his emails are encrypted correctly. How can I proof this?

Thank you.

Applies to: Rebex Secure Mail
by (145k points)
Thanks! We are almost finished with the hotfix release and we will most likely going to publish it tomorrow. Thanks for helping us make it more compatible! :-)
by (145k points)
We just released Rebex Secure Mail 2017 R6.3 that includes both hotfixes:
The "unsupported hash algorithm combination" turned out to be more common than we expected, so we decided to include it as well.
I just updated to the new Release Rebex Secure Mail 2017 R6.3. But for mails of one of our customers I still get "Unsupported OAEP encoding parameters source".
As we also have a bouncycastle based java implementation in place, I now could reproduce the error with the following java OAEP parameters:
OAEPParameterSpec("SHA-256", "MGF1", MGF1ParameterSpec.SHA256, new PSource.PSpecified("1234".getBytes()))
Sorry my fault, I was still using Rebex Secure Mail 2017 R6.2 after the Update to R6.3 everything works perfect.
by (145k points)
Thanks for letting us know!

1 Answer

0 votes
by (145k points)
edited by
Best answer

The sender is most likely right. The first error was most likely triggered by a recently-discovered bug, while the second error is caused by a known limitation.

Update: This has been fixed in Rebex Secure Mail 2017 R6.3.

1) "Unsupported OAEP encoding parameters source" error occurs when the encrypted email used a non-empty input parameter (also known as label or P), which is a kind of salt for the OAEP calculations. This bug has been reported by another user few days ago. We have already fixed it and will release a hotfix shortly.
This issue was not detected by our automated interoperability tests because of lack of real-world test data - we have apparently only been testing messages with empty labels (which seems to be a default behavior in OpenSSL and GPG's gpgsm utility as well).

2) "Unsupported OAEP hashing algorithm and mask generation algorithm combination" error occurs when the hashing algorithm used to compute the hash of the label is different than the hashing algorithm used in the OAEP mask generation function.
This is actually correct as well. However, Windows cryptographic APIs do not support RSA/OAEP with non-matching hash algorithms, and we expected such messages to be very rare, so we decided not to initially support this.
However, based on your feedback, it looks like such messages might not actually be as rare as we hoped, so we will add support for it shortly as well. (Due to lack of support in Windows, we will have to use a custom implementation, which means it will not work private keys stored in Windows key storage unless they are exportable.)