Xref: utzoo comp.unix.programmer:2154 comp.lang.c:40521 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!opal!mailgzrz!w414zrz.ee.tu-berlin.de!jaenicke From: jaenicke@w414zrz.ee.tu-berlin.de (Lutz Jaenicke) Newsgroups: comp.unix.programmer,comp.lang.c Subject: Re: methods for putting labels into your software? Message-ID: <790@mailgzrz.tu-berlin.de> Date: 27 Jun 91 09:06:51 GMT References: <1991Jun26.165609.9692@athena.mit.edu> Sender: news@mailgzrz.tu-berlin.de Distribution: usa Organization: TU-Berlin Lines: 39 Nntp-Posting-Host: w414zrz.ee.tu-berlin.de In article <1991Jun26.165609.9692@athena.mit.edu> mlevin@jade.tufts.edu writes: > > I'd like to hear suggestions, or any tricks that the pros out there >know about, for putting some kind of text label or code into your >executable (compiled and linked from C code) so that if anyone were to >copy a part of the code, you could know it was a copy by somehow >seeking out that label. >I am looking for >ideas that are less obvious to detect - a method such that someone >copying the code wasn't likely to notice and edit out (with a patch or >something). Any ideas would be appreciated. > >Mike Levin As I understand your problem you want to mark your code with a unique identifier, which is not obvious but easy to find for you. There are many ideas which are easy to realise. I would do it by coding my sign twice into the program, one readable for everyone (normally I'm proud of my work) and one in a coded form (XORed, backwarded or whatever else): static char *COPYRIGHT= "@(#) (c) Lutz Jaenicke etc."; static char *COPYRIGHT_EXTRA="A)$*!)d*!Mvu{!Kbfojdlf!dud/"; where the second string is just the same replaced by the char in the ASCII table. The first string is easily found by "what" without problems, search the second by whatever you want. Using a coded form of your signature can lead you to just code your crypt-scheme into your program and check, if a little pig has patched... One could think of doing nasty things, if..., but that depends on your problem. I know people, who I'd suppose to patch in their own name and go shopping with my program. I don't like such people. Don't get ideas, you are sorry of later, Mvu{!Kbfojdlf -- Lutz Jaenicke jaenicke@w414zrz.ee.tu-berlin.de Institut fuer Elektrische Maschinen jaenicke@emapollo.ee.tu-berlin.de Technische Universitaet Berlin Tel. (004930)314-24552 Einsteinufer 11, D-1000 Berlin 10 Fax. (004930)314-21133