If you used the binary to execute key parts of the algorithm then that
would be pretty secure.  You're javascript is always going to be public
though.

On Thu, Aug 23, 2012 at 7:28 AM, Tim Caswell <t...@creationix.com> wrote:

> If you bundled node itself in your binary and disabled the debugger
> protocol, then it would somewhat secure from amateur hackers.  But
> even then, all the user has to do is take a heap snapshot using some
> OS level tool and see your plain-text source.  V8 keeps the original
> source in memory so that Function.prototype.toString can return the
> source of any function.  Another options would be to minify your code.
>  It won't hide the logic and there are many unminifier tools that can
> pretty-print the source code back, but your original variable names
> will be gone forever.  You could maybe do your critical bits in a
> binary addon written in C and then only ship the binary modules.
>
> In the end, there is no 100% secure way to keep a determined hacker
> out of your source code.  It's all depends on how important this is
> and how much pain you want for yourself and your users.
>
> On a side note, if your engine was another scripting language that
> allowed compiling to byte code (like lua), it would obscure the code
> even more because you could ship the bytecode instead of the source
> code and still be portable.  But then you're not using node and byte
> code isn't that hard to read anyway.
>
>
> On Thu, Aug 23, 2012 at 6:03 AM, Marcel Laverdet <mar...@laverdet.com>
> wrote:
> > https://groups.google.com/d/topic/nodejs/mPIcq5mHihM
> >
> >
> > On Wed, Aug 22, 2012 at 9:11 PM, Marty Leisner <maleis...@gmail.com>
> wrote:
> >>
> >> I'm new to nodejs (and javascript).
> >>
> >> I want to be able to shroud the javascript source running into node.
> >>
> >> I figured if the javascript is read in as a memory image before its
> >> parsed/interpreted, I could
> >> decrypt it in between reading and parsing (is it parsed as its read?)
> >>
> >> The decryption algorithm is within the binary (along with the keys).
> The
> >> binary is distributed with
> >> the application, so this approach could work.
> >>
> >> I've looked at node running in gdb and I can't see where this is cleanly
> >> defined.  Help/advice would be
> >> appreciated.
> >>
> >> Marty
> >>
> >> --
> >> Job Board: http://jobs.nodejs.org/
> >> Posting guidelines:
> >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> >> You received this message because you are subscribed to the Google
> >> Groups "nodejs" group.
> >> To post to this group, send email to nodejs@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> nodejs+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/nodejs?hl=en?hl=en
> >
> >
> > --
> > Job Board: http://jobs.nodejs.org/
> > Posting guidelines:
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > You received this message because you are subscribed to the Google
> > Groups "nodejs" group.
> > To post to this group, send email to nodejs@googlegroups.com
> > To unsubscribe from this group, send email to
> > nodejs+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to