How private is my code in WebAssembly?


How private is my code in WebAssembly?



I have some c++ binary running on my web server that does some calculations and I was thinking about moving it to the user side using Webassembly. My question is how private will my c++ code be? Is it possible to transform a compiled Webassembly file back to c++?




1 Answer
1



How private is it? Not private at all. Your WebAssembly code is delivered over HTTP to the client's machine where it is executed. It is obfuscated a little, but hardly private.



The code is delivered in a binary format, however using readily available tools, e.g. wasm2wat, this can easily be converted into a human readable text format. The text is a relatively low level language, but still quite readable. It will not protect your algorithms, it will simply take people a little longer to understand them.


wasm2wat



WebAssembly is not readily transformable back to higher level languages (e.g. C++), but this does not make your algorithm private.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to input without newline? (Python)

C++ thread error: no type named ‘type’ MINGW

Analog for TagView in flutter