Skip to content

feat: lit protocol key exchange#1052

Merged
teogeb merged 70 commits intomainfrom
lit-protocol
Feb 20, 2023
Merged

feat: lit protocol key exchange#1052
teogeb merged 70 commits intomainfrom
lit-protocol

Conversation

@harbu
Copy link
Copy Markdown
Contributor

@harbu harbu commented Dec 27, 2022

Summary

Add support for retrieving and storing encryption keys via lit-protocol. When enabled we will first try to retrieve / store key using lit protocol, if this doesn't work, we use our own key-exchange system.

Changes

  • All lit-protocol library interactions are encapsulated into class LitProtocolFacade.
  • Add new class GroupKeyManager that is used to retrieve and store encryption keys. It contains the logic for iterating over different key exchange strategies until a key is found (or successfully generated and stored).
    • Retrieve key: (1) local, (2) lit-protcol, and (3) Streamr key-exchange
    • Store key: (1) generate with lit-protocol, and if that fails, (2) generate locally. We always store encryption key into local store.

Limitations and future improvements

  • lit-protocol is hard coded to work with main net Polygon and pre-defined streamRegistryChainAddress
  • no integration tests for lit-protocol
    • implement in future when it becomes possible to run own nodes and override streamRegistryChainAddress and RPC settings
  • Since we can't write integration tests for lit-protocol, do we need some automated tests to run against production?
  • Combine encryption and decryption client config blocks

Checklist before requesting a review

  • Is this a breaking change? If it is, be clear in summary.
  • Read through code myself one more time.
  • Make sure any and all TODO comments left behind are meant to be left in.
  • Has reasonable passing test coverage?
  • Updated changelog if applicable.
  • Updated documentation if applicable.

@github-actions github-actions bot added client Related to Client Package protocol Related to Protocol Package and removed protocol Related to Protocol Package labels Dec 27, 2022
@harbu harbu marked this pull request as ready for review January 30, 2023 11:52
@github-actions github-actions bot removed protocol Related to Protocol Package dht Related to DHT package cli-tools Related to CLI Tools Package proto-rpc broker Related to Broker Package network Related to Network Package test-utils Related to Test Utils Package tracker labels Feb 17, 2023
@teogeb teogeb merged commit a2d6f7d into main Feb 20, 2023
@teogeb teogeb deleted the lit-protocol branch February 20, 2023 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog client Related to Client Package utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants