An00bus
An00bus

Reputation: 111

How can I secure the source code of my Firefox OS application?

I have an app for Firefox OS, and I would not like to expose any of the source code, even obfuscated source. Is there currently any means to do this? Is this functionality even planned? Also, this app has ALL functionality implemented in the client, so "move the business logic to the server back-end" does not address this issue.

Upvotes: 0

Views: 281

Answers (3)

Nick Desaulniers
Nick Desaulniers

Reputation: 2096

You're asking "how do I give someone something, and simultaneously take it away?" You can't. This issue hasn't been solved with JS, and neither with native code.

Upvotes: 0

Gowtham Sadasivam
Gowtham Sadasivam

Reputation: 131

Since JavaScript is executed on the client side, not only in Firefox OS but every other platform too. The possible options are limited to obfuscating with aforementioned transformations or hiding the application logic in server-side code.

You can read more about app source protection from Mozilla official blog here: https://hacks.mozilla.org/2013/12/protecting-your-firefox-os-app-code/

You could write your application logic in C/C++ and protect it by encryption libraries and convert them into JavaScript using, Mozilla’s Emscripten tool which compiles C and C++ to JavaScript: https://github.com/kripken/emscripten/wiki

Upvotes: 0

Antoine Turmel
Antoine Turmel

Reputation: 43

There is no real solution yet, since every web page exposes the JavaScript source code. Why not trying obfuscate ?

Upvotes: 1

Related Questions