CMS/PKCS#7 support for RSAES-OAEP#289
Conversation
This way the test output makes clear why each test is passed twice (with different message digests).
Removes the redundant MGF1 implementation in PKCS#1 module, prefering injection of standalone MGF instance instead. Old call schemes are still supported and transparently create MGF1 instances as needed.
|
Thanks, stesie, this is great. It will take some time for me to review this and the MGF1 API changes -- I want to ensure they work with the direction 0.7.x is headed. |
|
hey @digitalbazaar @dlongley, are there any chances on getting this one merged at some point? :) We are relying on this specific pr as a dependency in our Thank you so much! |
|
Hey @digitalbazaar @dlongley, PLEASE, are there any chances on getting this one merged? We really rely on it. Can I help with it in any way? Thanks so much in advance ❤️ |
|
I'm myself no longer using this to be honest, and I don't have much time spare right now. Hence I won't be able to do it soonish. So if anyone else wants to step up, feel free |
This pull request is based on my previous pull request #288.
Goal of this change is to be able to create Enveloped-Data messages in CMS syntax (RFC 5652) using the RSA-OAEP encryption scheme. After all CMS is a successor of PKCS#7 v1.5 which probably justifies for a seperate module in forge. However I'm currently not willing to implement whole CMS stuff but just the Enveloped-Data thing like PKCS#7 with RSAES-OAEP ... which actually looks like PKCS#7, even has the version number untouched, solely a different RSAES.
... hence I decided not to create a new CMS module which effectively would be either a copy of PKCS#7 module (or some common subset) ... but instead augment the PKCS#7 module. This is latter module now allows to pass
algorithmandschemeOptionsoptions to itsaddRecipientmethod and handles them by considering changes from RFC 5652 + handling reverse direction.Besides I changed the public API of MGF1 module so it has two new public attributes:
algorithmset to "mgf1", so a MGF object tells its type (like the MD objects do)mdallowing to access the MD injected with thecreatecall... both are needed so the PKCS#7 module can access the info that it has to encode into the CMS structure.