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

std crypto module in WebAssembly? #3098

Closed
chiefbiiko opened this issue Oct 10, 2019 · 6 comments
Closed

std crypto module in WebAssembly? #3098

chiefbiiko opened this issue Oct 10, 2019 · 6 comments

Comments

@chiefbiiko
Copy link
Contributor



How about building a crypto module entirely implemented in WebAssembly?

Benefits would include: good performance, optimal portability

Luckily, we could also get timing safety for WebAssembly by patching V8 to implement CT-Wasm.

@kitsonk
Copy link
Contributor

kitsonk commented Oct 10, 2019

Really should talk about it in #2372 or #1891 to avoid having loads of issues.

@jorroll
Copy link
Contributor

jorroll commented Oct 13, 2019

FYI, this is also being discussed in the context of WASI WebAssembly/WASI#65

@rsp
Copy link
Contributor

rsp commented Jan 20, 2020

Since this is something related to WASI, there is a related issue:

If Deno supports WASI and if WASI supports cryptography (see comment by @thefliik) then we'll already have cryptography in WASM automatically.

Update: See also: (wrong link)

@tniessen
Copy link
Contributor


Benefits would include: good performance

The performance will likely be much worse than native performance, especially since you lose all hardware features, e.g., hardware-accelerated AES.

... optimal portability

Wouldn't "patching V8 to implement CT-Wasm" diminish the portability aspect since the patch would affect platform-specific bytecode generation?

Also, time-safety might be the most obvious side attack channel, but there are likely others that would make a WebAssembly implemention insecure. (For example, no memory protection, cache statistics, etc.)

@lucacasonato
Copy link
Member

Isn't this covered by std/hash + WebCrypto (#1891) support?

@kitsonk
Copy link
Contributor

kitsonk commented Aug 13, 2020

Yes, I still feel this is a duplicate of #1891

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

6 participants