Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added oaep jss test #659

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

PsOverflow
Copy link

No description provided.

This adds RSA/OAEP to jss.crypto.Algorithm as a known algorithm and adds
stubs for indicating what type of key is required to use it.

Signed-off-by: Alexander Scheel <[email protected]>
These tests have been updated from using DES/DES3 to AES-256.

Signed-off-by: Alexander Scheel <[email protected]>
When using `-Wl,-rpath`, the final generated binaries will have a rpath
include to the sandboxed libraries. This is good as it enables binaries
to run from the built directory. However, at link time, we're still
using the system's NSS library. This doesn't work when NSS introduces a
change to its external (public) API; the system's NSS likely doesn't
have this change yet. Include the `-L` flag as well, to use the
sandboxed library at link time as well.

Signed-off-by: Alexander Scheel <[email protected]>
While hash algorithms in JSS currently use the SEC_OID based interface
(rather than PKCS#11), include them in PK11Algorithm because they have
equivalent PKCS#11 constant definitions.

Signed-off-by: Alexander Scheel <[email protected]>
This depends on support from NSS for two new function calls,
PK11_PubWrapSymKeyWithMechanism and PK11_PubUnwrapSymKeyWithMechanism.
These enable passing OAEP's mechanism parameters into NSS's high-level
PK11 key wrap/unwrap interface, allowing them to succeed. Otherwise,
previous versions of NSS silently converted OAEP to PKCS#1 v1.5,
allowing the trivial patchset to succeed without any mechanism
parameters.

Introduce a JSSOAEPParameterSpec which can consume a JCA-standard
OAEPParameterSpec instance but which also extends NativeEnclosure to
allow us to call into the JNI layer with a parameter instance.

Signed-off-by: Alexander Scheel <[email protected]>
This allows us to detect whether or not NSS supports RSA-OAEP key
wrap/unwrap and if not, disable RSA-OAEP support, gracefully falling
back to the old method for other mechanisms.

Signed-off-by: Alexander Scheel <[email protected]>
@cipherboy cipherboy marked this pull request as draft November 17, 2020 18:55
Signed-off-by: Pritam Singh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants