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

Decouple encryption/signing logic #34

Open
b1rdex opened this issue Mar 23, 2020 · 2 comments
Open

Decouple encryption/signing logic #34

b1rdex opened this issue Mar 23, 2020 · 2 comments

Comments

@b1rdex
Copy link

b1rdex commented Mar 23, 2020

To provide a way to use different mechanism e.g. sodium (https://github.com/paragonie/sodium_compat) or some no-op logic for usage in tests.

@ezimuel
Copy link
Owner

ezimuel commented Jul 1, 2021

This is an interesting idea. Do you have any proposal?

@b1rdex
Copy link
Author

b1rdex commented Jul 2, 2021

The first steps:

  1. add an CryptoBackend interface with methods encrypt() and decrypt()
  2. change the constructor of SecureHandler to require CryptoBackend as an argument

And I think that key generation should probably be decoupled too: for example, ECC encryption has different key lengths.

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

No branches or pull requests

2 participants