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

Nss symmetric crypto support #234

Closed
wants to merge 20 commits into from
Closed

Conversation

Labels
None yet
Projects
None yet
2 participants
@nmathewson
Copy link
Contributor

@nmathewson nmathewson commented Jul 16, 2018

No description provided.

nmathewson added 15 commits Jul 11, 2018
When it is set, include the NSS headers and libraries as
appropriate.  Doesn't actually use them yet, though.
These are now part of crypto_init.c.  The openssl-only parts now
live in crypto_openssl_mgt.c.

I recommend reviewing this patch with -b and --color-moved.
This is largely conjectural, based on online documentation for NSS
and NSPR.
We need this in our unit tests, since otherwise NSS will notice
we've forked and start cussing us out.

I suspect we'll need a different hack for daemonizing, but this
should be enough for tinytest to work.
This was a fairly straightforward port, once I realized which layer
I should be calling into.
This is comparatively straightforward too, except for a couple of
twists:

   * For as long as we're building with two crypto libraries, we
     want to seed _both_ their RNGs, and use _both_ their RNGs to
     improve the output of crypto_strongest_rand()

   * The NSS prng will sometimes refuse to generate huge outputs.
     When it does, we stretch the output with SHAKE.  We only need
     this for the tests.
@coveralls
Copy link

@coveralls coveralls commented Jul 16, 2018

Coverage Status

Coverage increased (+0.01%) to 59.533% when pulling 1996e87 on nmathewson:nss_symmetric into 8505522 on torproject:master.

@nmathewson
Copy link
Contributor Author

@nmathewson nmathewson commented Sep 30, 2018

This was squashed and merged as part of a parent ticket.

@nmathewson nmathewson closed this Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment