To make a concept (such as code) inherently not understandable, either for artistic or security purposes. To make code which is not understandable but still executes, usually to fill a specification. For example, the following C++ of mine:

void BottlesOfBeer(int age) {const ostream*__=&cout;int _; for(_^=_^(age>=21?100:_^_);(_^_<_?*__<<_<<" bottles of beer on the wall\n",(int)__:_);_+=_+~_);

The act is obfuscation.

If you see a goth with their arms crossed in an "X" in front of their chest, with their hands on their shoulders...
chances are good that they're obfuscating.
The vampiric discipline of concealment. Users of this discipline become more difficult to see without technological or supernatural means of perception, such as the vampiric discipline of Auspex. Rather than conferring invisibility, Obfuscate simply causes the observer's mind to ignore the person who is using Obfuscate, rather like a Somebody Else's Problem Field. Higher levels allow one to cloak more than one person in this fashion, to conceal one's true thoughts and feelings from others (as well as inconvenient diablerie lines!) and to prevent others from stumbling across your haven, similar to the Arcane Background in Mage: The Ascension. From White Wolf Game Studios' Vampire: The Masquerade role-playing game.

As Pseudo Intellectual points out, use of this discipline in live-action roleplaying games is commonly indicated by crossing one's arms across one's chest, or (as in my role-playing troupe) holding a hand in front of one's face, with the fingers spread.

To obfuscate is to to render obfuscated by a process of obfuscation. To make unclear, to confuse. To darken, to cloud, to make partly obscure. To present to viewers something hazy, as through a glass, darkly.

e.g. Though I was on top of the skyscraper, my view of the horizon was obfuscated by the thick pollution.
Enron’s true financial state was deliberately obfuscated by the company's byzantine structure.
The artist has a message in this work, but it is obfuscated in order to make the viewer struggle to extract the meaning.
Say what you mean, don't confuse the issue with your obfuscations!

In computer programming terms, obfuscated code is source code that is deliberately rendered as difficult as possible for a human being to read, while still being machine readable, compiling to an identical or equivalent program to the clear text.

See also the obfuscated c contest and its imitators, which award prizes to the most bizarre and incomprehensible programs in particular languages. That link has a few good examples.

Code obfuscation techniques from simple to advanced

Or obfuscation made clear.

Obfuscation starts with pessimal formatting. The simplest procedure is to remove all comments. The compiler or interpreter will ignore them anyway.

Most programming languages (excepting python) are insensitive to spaces and returns, and so they can be omitted, turning code such as

while (z < 3) do
{
  z = somefn();
}
into
while(z<3)do{z=somefn();}

There are a few places were white space is needed between a pair of textual tokens, e.g. int a; cannot be rewritten as inta; Here white space is reduced to a constant single space for brevity and regularity.

It is indeed horrifying to see a nicely laid out source file condensed into a short dense rectangular wad of text. However this kind of obfuscation is superficial, it can be reversed (except for the lost comments) by applying a code formatting program.

Some languages (e.g. Delphi) are not case sensitive, and so in these languages everything can be converted into the same case.

The next step is to look at the names of variables, functions and objects in the code. Make them alphabetic, or even better, numeric. MyInterestRate = getInterestRate(); is so much easier to read than _12 = _13(); yet they are identical as far as your compiler is concerned.

Up to now, the techniques of obfuscation make the code more regular. Beyond this that changes – this is where the tricks come in that separate a normal obfuscated program from a contest winner come into play. One must code in a way that is deceptive, unpredictable and complex even when the code is well formatted and well named. Complex and subtle algorithyms are what you need - they are harder to understand even when nicely commented, named and laid out. Which they won't be.

But why would you want to do this?

For fun.
To show off how geeky you are.
To win a contest
For job security. If no one else can read your code, only you can fix it, right? I'd fire you instantly if you tried to pull that one on me.
For general closed-mindedness. Bear in mind that some interpreted languages (e.g. the evil javascript) are distributed in source-code form, and some misguided individuals think it better if that code is unreadable by any human on the client.

Ob*fus"cate (?), a. [L. obfuscatus, p.p. of obfuscare to darken; ob (see Ob-) + fuscare, fuscatum, to darken, from fuscus dark.]

Obfuscated; darkened; obscured.

[Obs.] [Written also offuscate.]

Sir. T. Elyot.

 

© Webster 1913.


Ob*fus"cate (?), v. t. [imp. & p. p. Obfuscated (?); p. pr. & vb. n. Obfuscating.]

To darken; to obscure; to becloud; hence, to confuse; to bewilder.

His head, like a smokejack, the funnel unswept, and the ideas whirling round and round about in it, all obfuscated and darkened over with fuliginous matter.
Sterne.

Clouds of passion which might obfuscate the intellects of meaner females.
Sir. W. Scott.

 

© Webster 1913.

Log in or registerto write something here or to contact authors.