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

Add node bindings #417

Closed
turt2live opened this issue Nov 18, 2021 · 5 comments
Closed

Add node bindings #417

turt2live opened this issue Nov 18, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Interested in working on the project? These are great additions we'd like to have!

Comments

@turt2live
Copy link
Member

My bot-sdk is trying to add crypto for encrypted appservices and it's been made clear that trying to use Olm directly is a lot more pain than it should be, particularly for proliferation of encryption implementations.

The major pieces needed would be:

  • Basic encryption/decryption
  • Fallback keys (and regular OTKs which I assume is part of the basic encryption/decryption)
  • Key sharing (with a way to bypass the unverified device restrictions given the usecase)
  • Key backup
  • Capability to run multiple concurrent Olm accounts within the same process efficiently. This includes de-duping information such as the rooms and device lists across potentially thousands or millions of in-process users.
  • Other crypto bits which I forgot and will be needed to ensure reliability

Cross signing and verification are not required at this stage for the bot-sdk as they don't serve a major purpose when the bot is not a human.

@poljar
Copy link
Contributor

poljar commented Nov 18, 2021

Fallback keys (and regular OTKs which I assume is part of the basic encryption/decryption)

Fallback keys are missing, this is #400.

Key sharing (with a way to bypass the unverified device restrictions given the usecase)

Key forwarding is supported though no bypass is supported. You'll need to define exactly who should receive forwarded keys, but this shouldn't be hard to add.

Key backup

This is supported but the API requires a bit of logic on the caller side.

Capability to run multiple concurrent Olm accounts within the same process efficiently. This includes de-duping information such as the rooms and device lists across potentially thousands or millions of in-process users.

This requires a custom store, possibly a PostgreSQL based one.

All of the above is already implemented in the bot-sdk, I was under the impression that it does only the basics for now?

@turt2live
Copy link
Member Author

The bot-sdk does the basics and fallback keys, but in the next month or two it'll be getting support for the other listed things.

@ShadowJonathan
Copy link
Contributor

Shouldn't we put FFI bindings in a sub-crate? I think they're useful, but they could clutter compile times and build files for the main crate.

@turt2live
Copy link
Member Author

probably. I think node bindings also have implications on the actual Rust code, so a new crate is almost certainly desirable.

I'll be taking a closer look at this in about a week.

@turt2live turt2live self-assigned this Dec 15, 2021
@jplatte jplatte added enhancement New feature or request help wanted Interested in working on the project? These are great additions we'd like to have! labels Apr 8, 2022
@poljar
Copy link
Contributor

poljar commented May 23, 2022

I forgot that this one already exists, #699 has a list of task now and a better issue number. Closing as a duplicate.

@poljar poljar closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Interested in working on the project? These are great additions we'd like to have!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants