KLEE, the involuntary base64 decoder

KLEE, the involuntary base64 decoder

It is not by chance that I use the term involuntary instead of incidental, because this lil' piece of software has quite a personality. I'd ask it out for a coffee, but am scared it will say 'Yes'.

Let's let it rock: find a base64encode function, and write a short preamble, calling it twice, first on "Hello, world!", and the second time on the symbolic buffer "new_src" (this tells KLEE "new_src" could contain anything): http://pastebin.com/1SgupULp

Surely, the output could not be same, right? Right?! http://pastebin.com/Z3REbH0H

I would call this pattern of KLEE-based computing "contrarian computing". You: "Isn't it that you can't do X?" KLEE: "Oh, yes, you can!" Or a German-speaking KLEE might say "Doch." :-)

Thus, KLEE has really computed base64decode(dest), without knowing it. This is not a problem for it, because it doesn't know that it doesn't know it. I am scared of what will happen if I try the same for zip, DES, AES, MD5, SHA1. Or an English to Russian translator. Or the halting problem. Or dog-food it: compile KLEE itself and assert it cannot prove everything about any program.

So, who knows to decode base64 in this case? We just provided the source of the encoder, not the decoder. I don't know how to write the decoder off the top of my mind for sure. I doubt that many programmers know. So who knows? KLEE? It has no klue about base64 encoding or decoding, any more than about Einstein's Enigma, or solving mazes. Is it clang + klee? clang + klee + base64encode.c? 

"Any sufficiently advanced technology is indistinguishable from magic."

Just like us - robots, pondering over the "Hard Problem of [our] Consciousness", with all its glorious caps. When it's just layers upon layers. Really, layers all the way down, Alice. The ghost in the shell is "only" software.

The monster of computation is truly trying to bite its own ears here. I think a nice label would be Illuminati programming. Disturbing while funny. Scary. I understand why you don't want to ask it out for drinks.

Cornel Izbasa

Software Developer at PiNTeam

10y

Brownie points if you've noticed it's actually base64 encoding ;-)

Like
Reply

To view or add a comment, sign in

More articles by Cornel Izbasa

  • Expert cryptographer and social engineer comes up with "unbreakable password"

    Afford Prefect, native and still inhabitant of Milwaukee, Wisconsin, took the crypto world by storm with his discovery…

    1 Comment
  • A Mostly Altruistic Many-Worlds Interpretation Science Experiment

    I entertain the idea that if we keep performing quantum physics experiments where branching would occur according to…

  • AI and the Midas Touch

    This article is inspired by the analogy made by Stuart Russell between the problem of ensuring AI alignment and the…

  • Proof-Caring Code

    Design by Contract, Meet Symbolic Execution! So I have this idea of using Design by Contract for the C language in a…

  • Quine Java Class

    Quines are programs that output their own source code without any input. Among other things, they emphasize the…

    1 Comment
  • Finding Hamiltonian Cycles with KLEE

    Graphs are black, Cycles are red, KLEE's not a hack, So use it instead. C: http://pastebin.

  • Finding MagicK with KLEE

    If by now you're not convinced that KLEE heralds the coming of the Singularity, check out how it finds a magic square…

  • Solving 8-Queens with KLEE

    You might already know that I'm in <3 with KLEE for a while and just waiting for the right time to propose. So, without…

  • Solving Einstein's Enigma with KLEE

    ..

    3 Comments
  • Coder (to the tune of Dreamer by Ozzy Osbourne)

    Gazing to my window at the code inside, Wond'rin' will the pull request survive, My feature branch be merged to master…

Others also viewed

Explore content categories