Recent work on garbled RAM has resulted in built systems that garble RAM program in secure multiparty computation protocol directly, avoiding the inefficient process of first converting the program into a circuit. But most of these schemes need to preload the hardwired circuits, and the amount of communication is huge.
This paper uses the garbled RAM scheme from one way function (Garg, Lu, Ostrovsky, Scafuro) to construct garbled random access stored-program machine, which is capable of modifying program at the run-time by introducing garbled code memory and control circuit. Through comparing garbled circuit with garbled RAM approach, a reduced amount of data communication can be achieved by applying our algorithm, which is proved by theoretical analysis. As an independent advantage, our scheme with full security seamlessly supports private function evaluation.