-
Hi Does xmlsec support the optional MGF element of EncryptionMethod if the Algorithm is http://www.w3.org/2009/xmlenc11#rsa-oaep I don't beliebe it does but I just wanted to check. Tim |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Not sure what exactly do you mean. In the XMLEnc spec, the RSA OAEP is defined as follows:
The XMLSec source code parses both OAEPparams and DigestMethod elements and uses is for RSA OAEP. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I should have been clearer. According to: https://www.w3.org/TR/xmlenc-core1/#sec-RSA-OAEP The http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p identifier defines the mask generation function as the fixed value of MGF1 with SHA1. In this case the optional xenc11:MGF element of the xenc:EncryptionMethod element must not be provided. The http://www.w3.org/2009/xmlenc11#rsa-oaep identifier defines the mask generation function using the optional xenc11:MGF element of the xenc:EncryptionMethod element. If not present, the default of MGF1 with SHA1 is to be used. Several examples are included including:
|
Beta Was this translation helpful? Give feedback.
-
Thanks, that makes total sense. I did check and it seems that at least for openssl this should be trivial change. Do you know if there are any test vectors to verify implementation? |
Beta Was this translation helpful? Give feedback.
-
Hi It was reported to me that someone was testing XML::Enc with samltest.id and XML::Enc did not support http://www.w3.org/2009/xmlenc11#rsa-oaep. As I was implementing that I obviously looked to xmlsec as a way to verify my implementation :-) I have not yet been able to configure samltest.id to return rsa-oaep and I don't know if it used MGF or simply defaulted to mgf1sha1. I am hoping to have the xml files from that reporter later today. I did add support to https://metacpan.org/release/TIMLEGGE/XML-Enc-0.07-TRIAL/view/lib/XML/Enc.pm (see https://metacpan.org/release/TIMLEGGE/XML-Enc-0.07-TRIAL/source/t/06-test-encryption-methods.t#L54). But unless I can test it against a known implementation that may be suspect at best)... Tim |
Beta Was this translation helpful? Give feedback.
-
I created issue #439 and plan to add it in the next release in Spring 2023 |
Beta Was this translation helpful? Give feedback.
I created issue #439 and plan to add it in the next release in Spring 2023