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

Explain services and modules #6

Open
jj5 opened this issue Apr 8, 2023 · 0 comments
Open

Explain services and modules #6

jj5 opened this issue Apr 8, 2023 · 0 comments

Comments

@jj5
Copy link
Owner

jj5 commented Apr 8, 2023

Tidy up the following notes and put them in the README.md.

A crypto service implements IKickassCrypto. There are four types of crypto service provided by this library, and implementers can define their own.

The crypto framework is a base class KickassCrypto which implements the IKickassCrypto interface; some parts of KickassCrypto are abstract and must be provided by implementations.

A use case suggests approaches to the number and types of secret keys that are used, implementers can add use cases; the two default use cases are:

  • round-trip
  • at-rest

A service locator finds a service for a particular use case, the library includes two service locators, one for each use case; the two default service locators are:

  • kickass_round_trip()
  • kickass_at_rest()

A module provides a crypto service for each use case, so by default that's two services per module, one for each use case.

This library provides two modules, Sodium and OpenSSL; as each module provides two services the full list of complete services supported by this library is:

  • KickassSodiumRoundTrip
  • KickassSodiumAtRest
  • KickassOpenSslRoundTrip
  • KickassOpenSslAtRest

Services for use cases within modules are designed to be independent because they use different secret keys; however if the services within a module did share secret keys then they should be mutually compatible. That is, if you configured the round-trip and at-rest secret keys to be the same, then any service in a module could be used to encrypt or decrypt any given plaintext or ciphertext. So the only thing that keeps services within a module independent should be the secret keys, otherwise services within a module should be mutually compatible.

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

1 participant