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

How to embed in C++? How to store secret state? #610

Closed
codefishd opened this issue Nov 20, 2019 · 3 comments
Closed

How to embed in C++? How to store secret state? #610

codefishd opened this issue Nov 20, 2019 · 3 comments

Comments

@codefishd
Copy link

Greetings

I want to use wasmtime or another runtime in a C++ app to secure calls to complicated functions.
Is there an example for that?

In particular ----> how can a webassembly function call functions from the main app with secret state only stored in the app (-- not visible from webassembly for security --)? How to implement wrappers like wasmerio/wasmer#925 with wasmtime? Is it possible?

@yurydelendik
Copy link
Contributor

yurydelendik commented Nov 20, 2019

@codefishd The wasmtime implements wasm-c-api , see e.g. https://github.com/WebAssembly/wasm-c-api/blob/master/example/callback.c . AFAIK the wasm-c-api is (being) implemented for V8, wasmtime, wabt interpreter.

to secure calls to complicated functions

Can you explain what do you mean under "complicated functions"?

how can a webassembly function call functions from the main app with secret state only stored in the app

Is it similar to host info attached to the embedded object?

@jedisct1
Copy link
Contributor

If I understand correctly, and if you don't specifically need to run code compiled to WebAssembly, the Google Sandboxed API may do what you are looking for.

@tschneidereit
Copy link
Member

I think @yurydelendik's answer about callbacks should address this, so I'll close this issue. @codefishd, feel free to reopen if you disagree and can further clarify your use case and why it's not addressed by closure callbacks.

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

4 participants