From: Gerd Stolpmann <gerd@gerd-stolpmann.de>
To: "Daniel Ortmann" <ortmann@vnet.ibm.com>, caml-list@inria.fr
Subject: Re: Reverse-Engineering Bytecode: A Possible Commercial Objection To O'Caml
Date: Sat, 10 Jun 2000 16:41:36 +0200 [thread overview]
Message-ID: <00061017280001.01513@ice> (raw)
In-Reply-To: <bpxk8fzn6kp.fsf@neon.rchland.ibm.com>
On Fri, 09 Jun 2000, Daniel Ortmann wrote:
>Note that althought I brought up the idea of such encryption, I don't really
>have much opinion as to whether it is a good idea. I *do* believe it should
>be discussed.
>
>... and not mainly philosophically. But technically. Hopefully that email
>got some people thinking. If so, then that small mission of mine has been
>accomplished.
>From a purely technical point of view: I think it is impossible to protect
executable code by encryption if the code itself contains the key: Simply start
the encrypted program, and wait until the bytecode is decrypted. The
unencrypted bytecode will be in memory, and it is possible to examine memory
contents and search the regions containing bytecode (which is quite simple).
There is no advantage if asymmetric encryption is used.
The only way to make it harder to get the bytecode is to permute the
instruction codes. The permutation is applied both to the bytecode and to the
virtual machine itself. However, the level of protection is not very high,
because you can compare the permuted VM with the original VM, and because you
can analyze the structure of the bytecode (which is still the same).
I think it is not possible to improve the level of protection by encryption.
>Also, isn't "information hiding" part of the purpose of .cmi files? What I am
>suggesting might be viewed as an stronger type of .cmi file ... with REAL
>"implementation hiding". :-)
But your "implementation hiding" has a different intention. Normally, such a
property is discussed to improve the maintainability of software; i.e. you can
exchange implementations without changing the module interface. In contrast
to this, your proposal has a commercial background.
>I just "reverse engineered" emacs byte code by doing
><control> x <control> r ~/.emacs.elc ... and easily viewed actual lisp code.
>
>That's how easy it was. That's the kind of thing I was thinking about
>avoiding.
This is not possible with OCaml bytecode which is relatively close to machine
code. This means: You cannot easily find out the structure of the source code
by analyzing the byte code because compilation "flattens" the structure to some
extend. Recursions are often transformed to ordinary
loops. The memory layout of values can be difficult if some type of closures
are used.
Perhaps some type of automated reverse engineering is possible (without tools
I cannot imagine it), but much of the structure of the source program will be
lost.
I would suppose that it is cheaper to develop the program again than to crack
it.
Note that Java byte code contains even more structure than OCaml byte code, and
I have never heard that somebody complained about missing protection of Java
investments.
I hope my remarks make the discussion more to the point.
Gerd
--
----------------------------------------------------------------------------
Gerd Stolpmann Telefon: +49 6151 997705 (privat)
Viktoriastr. 100
64293 Darmstadt EMail: gerd@gerd-stolpmann.de
Germany
----------------------------------------------------------------------------
next prev parent reply other threads:[~2000-06-12 14:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-06 20:46 Daniel Ortmann
2000-06-07 20:23 ` Markus Mottl
2000-06-07 22:02 ` Max Skaller
2000-06-09 12:14 ` OCaml book Joshua D. Guttman
2000-06-13 16:53 ` Julian Assange
2000-06-07 22:15 ` Reverse-Engineering Bytecode: A Possible Commercial Objection To O'Caml Max Skaller
2000-06-08 8:54 ` Sven LUTHER
2000-06-08 22:36 ` Daniel Ortmann
2000-06-09 13:34 ` Sven LUTHER
2000-06-09 22:06 ` Vitaly Lugovsky
2000-06-10 14:41 ` Gerd Stolpmann [this message]
2000-06-09 15:44 ` Julian Assange
2000-06-07 21:41 Michael Donat
2000-06-08 21:58 Brent Fulgham
2000-06-09 16:13 Brent Fulgham
2000-06-09 18:18 Brent Fulgham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00061017280001.01513@ice \
--to=gerd@gerd-stolpmann.de \
--cc=caml-list@inria.fr \
--cc=ortmann@vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox