forge icon indicating copy to clipboard operation
forge copied to clipboard

CMS/PKCS#7 support for RSAES-OAEP

Open stesie opened this issue 10 years ago • 5 comments

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 algorithm and schemeOptions options to its addRecipient method 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:

  • algorithm set to "mgf1", so a MGF object tells its type (like the MD objects do)
  • md allowing to access the MD injected with the create call

... both are needed so the PKCS#7 module can access the info that it has to encode into the CMS structure.

stesie avatar Aug 19 '15 18:08 stesie

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.

dlongley avatar Aug 19 '15 19:08 dlongley

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 package.json for a while now and this doesn't feel like a great solution.

Thank you so much! Dennis

wottpal avatar Oct 01 '20 15:10 wottpal

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 ❤️

wottpal avatar Oct 14 '20 07:10 wottpal

@wottpal, This PR needs to be rebased because it has conflicts. @stesie, are you able to rebase it? If not, @wottpal, could you submit a new PR that has the changes you want to see? Either way, only once the conflicts are resolved, it can be reviewed and potentially pulled in. Thanks!

dlongley avatar Oct 14 '20 13:10 dlongley

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

stesie avatar Oct 14 '20 15:10 stesie