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

OPRF module #90

Open
jedisct1 opened this issue Sep 1, 2023 · 2 comments
Open

OPRF module #90

jedisct1 opened this issue Sep 1, 2023 · 2 comments

Comments

@jedisct1
Copy link
Member

jedisct1 commented Sep 1, 2023

Consider adding optional module for OPRFs.

Ref: cloudflare/voprf-ts#32 (comment)

@armfazh
Copy link

armfazh commented Sep 1, 2023

How do we start sketching the specification for (V)OPRFs?

@jedisct1
Copy link
Member Author

jedisct1 commented Sep 1, 2023

Hi Armando!

First, take a look at the existing modules.

There are some constraints that come with WASI modules. They are similar to system calls: the number of functions should be as small as possible, and they should be generic and future-proof rather than specific. Even at the expense of performance. Breaking changes would be complicated and would break all existing applications.

Parameters or return values that are not primitive types should generally be handles. This is especially true for secrets, as the API can also be used in a HSM-like context, where the secrets are only accessible by the runtime, not directly by applications.

The interfaces themselves are described in a language called witx.

The witx files for the current modules can be found here: https://github.com/WebAssembly/wasi-crypto/tree/main/witx/witx-0.10

So, in order to add a new module for {P,V}OPRFs, a new wasi_ephemeral_crypto_oprf.witx file should be added there.

We can set up a meeting to discuss all this if you like.

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