Octave is a free, open-source high-level interpreted language, primarily supposed for numerical computations that’s principally suitable with MATLAB. Octave is a superb instrument for the fast analysis and improvement of latest algorithms in addition to performing simulations and information evaluation. A mathematical software program developer can typically prototype a brand new algorithm in Octave two to 3 occasions sooner than in a compiled programming language akin to C or C++. Octave is free each as in beer and as in speech not like MATLAB. Anybody can obtain Octave and run an Octave program for free of charge on the three main computing platforms: MS Home windows, Mac OS X, and different types of the Unix working system. As a result of Octave is open-source, there’s a lot much less concern that the seller will abruptly stop assist as Microsoft did with Visible FoxPro or redesign the language into one thing unusable so as to promote one more “improve.” Finish customers can at all times construct the language from supply and create a improvement “fork” that preserves the compatibility with current code and the class of the unique language.
The Drawback
A significant drawback with Octave and plenty of different scripting languages is that it’s an interpreted, human-readable scripting language. Potential and precise prospects and different third events can see what’s being accomplished intimately. It’s simple to reverse engineer or steal applications and algorithms written in scripting languages akin to Octave.
Think about that you’re small firm working on a shoe string price range in a loft in West Hollywood that has developed a breakthrough video particular impact in Octave. You need to win a contract from a Hollywood film studio to do the impact within the subsequent blockbuster science fiction film starring Angelina Jolie and Brad Pitt as quarreling lovers caught in an alien invasion. The well-known Hollywood film studio desires to guage the algorithm in-house, be sure to will not be dishonest with Photoshop on the glamor shot of Angelina in a skin-tight black leather-based jumpsuit that they despatched you. The issue is that the well-known Hollywood studio that you’re pitching to would steal your algorithm in a microsecond if they may. You might be confronted with the fee, time, and common issue of changing your sizzling new video particular impact algorithm right into a compiled language akin to C or C++. In the meantime your rivals at Actually Cool FX in Pasadena could come out with the identical algorithm while you’re struggling to transform it to C or C++.
You could possibly be a quantitative finance wizard working out of a poorly ventilated workplace in Jersey Metropolis, New Jersey with a spectacular view of scenic downtown Jersey Metropolis seen by your tiny west going through window. You want to promote your sizzling new nanosecond buying and selling algorithm to a Too Huge Too Fail financial institution so you possibly can transfer to an opulent effectively ventilated nook workplace throughout the Hudson River in New York Metropolis’s monetary district, however the financial institution insists they have to completely consider the algorithm in-house. In all probability sufficient mentioned proper there.
You is perhaps an idealistic junior school member at a prestigious, however very low paying main analysis college in San Francisco. You’ve got developed the breakthrough algorithm in quantitative biology that can remedy most cancers — in Octave. Now, you might be fully above crass materialistic considerations and plan to comply with the illustrious instance of Jonas Salk in refusing to patent the polio vaccine :-), donate repeatedly to the Free Software program Basis, and have an autographed poster of Richard Stallman in your tiny cramped workplace, however nonetheless you want to get tenure and transfer out of your landlady’s attic. You understand full effectively that the eminent full professor down the corridor who received handed over for final 12 months’s Nobel Prize would steal your concept in a picosecond if he might; it’s common information within the division that his didn’t-quite-get-the-Nobel-Prize work was truly stolen from his former graduate pupil who’s now driving a taxicab in New York Metropolis. How do you reveal your breakthrough algorithm with out freely giving the key and get tenure?
The Resolution
Thankfully, one can obfuscate Octave code, eradicating almost all human-readable data, a lot as a compiler does when it interprets a program written in C or C++ right into a machine-readable binary executable. This raises the bar for stealing your concepts and algorithms significantly. On the whole, code obfuscation removes all feedback, indentation and different formatting that clarifies what’s going on, and replaces all human readable variable and performance names with random strings of characters that convey no which means to a human reader. Be aware that the human readable data is totally faraway from the obfuscated code. Some schemes to guard applications written in scripting languages use encryption. This system is encrypted but when somebody can discover or decide the encryption key, they will get well your entire unique program together with feedback, human-readable names, and so forth.
A Easy Instance
It is a easy script in Octave.
mytest.m
% check script disp('hiya world'); % check remark myflag = 1; printf( "it is a testn"); fflush(stdout); myflag = myflag + 1; myflag2 = myflag++; printf("myflag2 is %dn", myflag2); fflush(stdout); if flag > 1 disp('hello'); else disp('no'); finish for counter = 1:10 disp(counter); % check finish pivalue = pi; disp(pivalue) disp('ALL DONE');
This script generates the next output beneath Octave 3.2.4 working on a Home windows XP Service Pack 2 PC:
octave-3.2.4.exe:18> mytest hiya world it is a check myflag2 is 2 no 1 2 3 4 5 6 7 8 9 10 3.1416 ALL DONE
Right here is an obfuscated model of the identical Octave script generated by an obfuscation perform written by the creator in Octave:
mytest_obfuscated.m
disp ( 'hiya world' ); ; UQWSKDTZQWRO=1 ; ; printf ( "it is a testn" ); ; fflush ( stdout ); ; UQWSKDTZQWRO=UQWSKDTZQWRO+1 ; ; BSJRZMSBRYXD=UQWSKDTZQWRO++; ; printf ( "myflag2 is %dn" , BSJRZMSBRYXD ); ; fflush ( stdout ); ; if flag>1 ; disp ( 'hello' ); ; else ; disp ( 'no' ); ; finish ; for RBVZQAHJSNWB=1:10 ; disp ( RBVZQAHJSNWB ); ; finish ; VIENISLJPENX=pi ; ; disp ( VIENISLJPENX ) ; disp ( 'ALL DONE' ); ;
Be aware: On a Home windows PC utilizing Firefox, one can choose the obfuscated code above by deciding on the primary few characters initially of the road above (e.g. disp) after which hitting Shift-Finish on the keyboard. Then copy and paste to Octave to run the obfuscated code.
This script generates the next output (the identical as the unique script) beneath Octave 3.2.4 working on a Home windows XP Service Pack 2 PC:
octave-3.2.4.exe:22> mytest_obfuscated hiya world it is a check myflag2 is 2 no 1 2 3 4 5 6 7 8 9 10 3.1416 ALL DONE
Be aware that the reserved key phrases akin to “if” and built-in Octave capabilities akin to “printf” will not be obfuscated. It’s truly doable to make the obfuscated code much more unreadable than the instance above. That is supposed as a easy illustration. The obstacles to reverse engineering and theft launched by code obfuscation are larger for longer applications and extra complicated algorithms.
Conclusion
A significant drawback with Octave and different scripting languages is that it’s simple for potential or precise prospects or different third events to reverse engineer or steal algorithms or different delicate data from a program written in a human readable scripting language. This could be a major problem for algorithm builders utilizing Octave. That is a lot much less of an issue with compiled languages akin to C or C++ by which, nevertheless, it’s normally slower and extra expensive to develop algorithms than Octave. Compilers generate unreadable binary recordsdata that are tough to reverse engineer (not inconceivable).
Laptop applications can obfuscate Octave code, routinely eradicating human readable data akin to feedback, variable and performance names, indentations, and so forth. That is very near the identical data that’s eliminated by compilers after they convert a program written in a compiled programming language akin to C or C++ to a binary executable. In some methods, that is safer than encrypting the code for the reason that data is definitely eliminated fully from the obfuscated code; the encryption might be damaged, typically by merely stealing the encryption key. Code obfuscation raises the bar considerably for reverse engineering or stealing an algorithm or different crucial mental property carried out in Octave. The identical feedback apply to different scripting languages akin to Python, Perl, and Ruby.
© 2011 John F. McGowan
Concerning the Creator
John F. McGowan, Ph.D. solves issues by creating complicated algorithms that embody superior mathematical and logical ideas, together with video compression and speech recognition applied sciences. He has in depth expertise creating software program in C, C++, Visible Fundamental, Mathematica, MATLAB, and plenty of different programming languages. He’s most likely finest identified for his AVI Overview, an Web FAQ (Continuously Requested Questions) on the Microsoft AVI (Audio Video Interleave) file format. He has labored as a contractor at NASA Ames Analysis Heart concerned within the analysis and improvement of picture and video processing algorithms and know-how. He has printed articles on the origin and evolution of life, the exploration of Mars (anticipating the invention of methane on Mars), and low-cost entry to house. He has a Ph.D. in physics from the College of Illinois at Urbana-Champaign and a B.S. in physics from the California Institute of Know-how (Caltech). He might be reached at [email protected].