Search code examples
javascriptgoogle-chromebrowserdrmwebassembly

Could webassembly be a way to enforce drm?


The Idea of using compiled languages on might be a great way to increase performance significantly.

But could it used to set a drm?

For example: Some website offers browser games and doesn't want the source code to be used by others. Would webassembly-script tied deep into the game mechanics be used to detect if it is used on another site and lock it down with no way to decompile and bypass it?

I don't want to sound like a pirate with this, but it might concern adblock-users, that also block trackers.

When for example a Audio Context Fingerprinting-script is run behind without being detected, how can it be blocked?


Solution

  • Other than performance, Wasm does not provide any new capability that the Web doesn't already have. You will be able to see what Wasm modules are loaded, you will be able to see what's being called, and you can inspect and step through Wasm code in text form -- and arguably, Wasm code is no more obscure than e.g. minified asm.js code. Moreover, Wasm is only able to interact with the browser and the web page by calling into JavaScript.

    So, no, web sites won't be able to use it to do anything behind your back other than in ways they can use already.