Skip to content

Refactor for crypto library agility #58

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

Merged
merged 21 commits into from
Apr 23, 2025
Merged

Refactor for crypto library agility #58

merged 21 commits into from
Apr 23, 2025

Conversation

bifurcation
Copy link
Contributor

@bifurcation bifurcation commented Apr 23, 2025

This PR implements a simple strategy for making it possible to plug in new crypto libraries.

  • crypto.h is pared back to just the things required in sframe.cpp
  • crypto.cpp only has things that are invariant regardless of the cryptographic library (properties of cipher suites)
  • In CMakeLists.txt, we have a switch that adds a #define indicating which crypto library to use
  • Crypto library specifics are in an implementation file, here crypto_openssl11.cpp or crypto_openssl3.cpp.

Copy link
Contributor

@suhasHere suhasHere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit about handy comments on few hardcoded values. Otherwise looks good to me.

@bifurcation
Copy link
Contributor Author

macOS build is just failing because we keep getting non-upgraded runners. Proceeding with merge because it was green on a prior run and the only difference is comments.

@bifurcation bifurcation merged commit 917511e into main Apr 23, 2025
7 of 10 checks passed
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