2

Back in World War II (and WWI apparently), encryption schemes used by the warring parties kept getting cracked. Then some genius who understood language realized that sending messages in an esoteric natural language would be better than any cipher, due to the enormous differences that languages can bear to one another in terms of syntax--e.g. Navajo vs. Japanese. Codes based on Navajo went uncracked. The title is a movie reference.

So you can see where this is going. What's a good language, with an available native compiler, that few people know yet is powerful enough in which to write, say, a key authentication module? I thought of Cobol but couldn't find a native compiler, by which I mean a compiler that compiles directly into machine language and not by first translating into C or some other standard language and then compiling the C.

I realize that at the assembly level it's probably all the same, but I still think being able to write unreadable high-level code might help in some situations.

Matt Phillips
  • 9,465
  • 8
  • 44
  • 75
  • If you want to make it tougher to read, maybe [Prolog](http://en.wikipedia.org/wiki/Prolog)? If you relax the native bit (because yes, the assembly code would be roughly the same if source was translated to a compile language), there are pretty funky languages like MUMPS. – wkl Oct 12 '11 at 21:58
  • @birryree That looks promising. Has a native compiler (gnu). – Matt Phillips Oct 12 '11 at 22:01
  • 1
    It's quite easy to write unreadable high-level code in most any language. – Don Roby Oct 12 '11 at 22:01
  • Security through obscurity (http://en.wikipedia.org/wiki/Security_through_obscurity) is a common practice, but in general a risky one. Make sure you always apply this in combination with a proper recognized encryption algorithm. – kroonwijk Oct 12 '11 at 22:03
  • @Don good point but I expect de-obfuscation would be an order of magnitude more difficult if the base language was something the user had no experience with. – Matt Phillips Oct 12 '11 at 22:08
  • "kept getting cracked" -- not actually true. The Japanese and German codes which depended on "clever machinery" were cracked by the allies. Most of the numerous encryption schemes used by the allies which depended on "paper based" algorithms were never cracked. Even something as vulnerable as the "Admiralty Cipher" for use by merchant shipping needed only two issues of the code book. – James Anderson Oct 26 '11 at 02:21

2 Answers2

1

Well, I think you answered your own question in a way.

I realize that at the assembly level it's probably all the same [...]

The same algorithm programmed in different languages will be equally difficult to crack. Because its the same algorithm. Unless there is some particular vulnerability in the language's standard libraries or maybe the compiler makes a mistake when compiling the program. As far as esoteric languages with compilers, brainfuck is the only one I can think of off the top of my head. http://home.arcor.de/partusch/html_en/bfd.html

ctrlc-root
  • 1,049
  • 1
  • 15
  • 22
  • Brainfuck (or Malbolge, which somebody else mentioned) would be great but, from what I could tell, actually producing significant code in it would be virtually impossible. It does have to be possible to actually code in this language in a semi-practical way. :) – Matt Phillips Oct 12 '11 at 22:03
0

I'm going to go with @birryree's suggestion of Prolog, at least pending further investigation. It has a native compiler and is actively maintained, but only by a small academic community. So the likelihood of an 'average joe' programmer knowing it is relatively small. But the tradeoff of it being somewhat less obscure, for its power, is probably ok.

Matt Phillips
  • 9,465
  • 8
  • 44
  • 75