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

Clean up structure and expose ContextBase #45

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

bifurcation
Copy link
Contributor

This PR makes a few restructurings to clean up the structure of the library:

  • The class hierarchy is now stricter. Instead of SFrame -> {Context, MLSContext}, we have:
    • ContextBase - Core protect/unprotect functionality, irrespective of header encoding
      • ContextBase::KeyState loses its counter member and becomes KeyAndSalt
    • Context: protected ContextBase - Also tracks counters, encodes/decodes header
    • MLSContext: protected Context - Also derives per-sender keys from MLS secrets
      • MLSContext::EpochKeys no longer stores keys/counters
      • Instead, we use the storage in ContextBase and Context
  • The Header class is restructured so that it owns an encoded representation of the header
    • When constructing from kid+ctr, the values are encoded
    • When constructing from an encoded value, the encoded form is copied in and values are parsed

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.

1 participant