logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·31.10.26
← Back to news

Code Obfuscation via Local Mixing

Original article
vitalik.eth.limo|20 points|0 comments|by fbrusch|Aug 21, 2026

Code Obfuscation via Local Mixing

Dark Mode Toggle Obfuscation (Part III): Local Mixing
Published: August 21, 2026

Acknowledgements: Special thanks to Janmajaya Mall, Ran Canetti, and Nicholas Ho for their critical review and feedback.

In the preceding installments of this series, we explored two primary categories of indistinguishability obfuscation (iO) protocols. First, we looked at the conservative/mainstream approach, which relies on standard cryptographic assumptions but suffers from "galactic" overhead. Second, we examined diamond iO, which utilizes novel lattice-based assumptions to drastically reduce overhead, though it remains too computationally expensive for practical use.

This post introduces the third major contemporary family: "Local Mixing."

A Paradigm Shift in Cryptography

The most critical realization regarding local mixing is that it represents a fundamental departure from traditional cryptographic methodologies.

Unlike previous methods, local mixing completely eschews:

  • Elliptic curves
  • Prime factorization
  • Lattice-based problems

Instead, its DNA is closest to symmetric cryptography, specifically the design of hash functions and encryption algorithms. In the world of symmetric crypto, there are rarely "clean" mathematical reductions (e.g., "breaking this cipher is equivalent to solving the discrete logarithm problem").

Instead, the field relies on a half-century of iterative refinement:

  1. Designers create a function intended to be pseudorandom.
  2. Cryptanalysts attempt to break it.
  3. Designers implement countermeasures based on those attacks.
  4. The process repeats until a stable, secure standard (like SHA or BLAKE) emerges.

The Core Ambition

Local mixing attempts to transpose this iterative, "battle-tested" philosophy onto circuits. The goal is to ensure the core building blocks possess the properties symmetric cryptographers value, all while remaining functionality-preserving.

This is a high-stakes gamble. The path is littered with the remains of failed white-box cryptography attempts. However, the authors believe that by increasing effort and leveraging AI to "speed-run" the decades of trial-and-error that matured hash functions, they can achieve a viable result—even if it requires accepting higher overhead.


The Obfuscation Process

The objective is to take a circuit ( C ) (composed of standard logic gates like AND, XOR, and NOT) and subject it to transformations that hide its internal logic without altering its output.

The Pipeline Overview

The transformation follows a specific sequence of stages:

While "mixing" is the namesake of the process, it is only one part of the chain. The "mixing" step involves:

  • Injecting "junk" gates.
  • Shuffling components.
  • Replacing small circuit segments with different gate sets that yield the same result.

The real sophistication lies in the preparatory steps, which prime the circuit for mixing and eliminate specific types of information leakage.

Implementation Checklist

  • Convert to reversible logic
  • Apply hardening techniques
  • Implement gadgetization
  • Execute mixing (splitting, crossing walks)
  • Final compression

The Necessity of Reversibility

To illustrate, let's consider a two-bit adder. The first mandatory step is converting ( C ) into a reversible circuit—one that can be executed both forward and backward.

Why Reversibility?

Reversible circuits are significantly more conducive to mixing. A single reversible gate can be swapped for a massive array of other reversible gates without changing the overall function.

The primary issue with standard (irreversible) computation is the collapse of entropy. Consider the following table:

GateInput AInput BOutputEntropy Note
AND000Multiple inputs →\rightarrow→ One output
AND010(Information is lost)
AND100(Information is lost)
AND111Unique mapping

Because gates like AND and OR destroy information, long chains of irreversible gates cause the circuit's state to degenerate. A large random irreversible circuit often collapses into just a few possible outputs. In contrast, a large random reversible circuit behaves like a secure cryptographic permutation.

The Symmetric Crypto Connection

This approach mirrors a classic rule in symmetric design: even for irreversible goals (like hashing), the internal engine is usually a reversible permutation. Irreversibility is only added as a thin outer layer to ensure the full state space remains reachable for as long as possible.

Example: The Reversible Two-Bit Adder

To make our adder reversible, we transform it into a structure utilizing r57 gates.

Circuit Configuration:

  • Total Wires: 14
    • 4 input bits
    • 1 wire pinned to 1
    • 1 wire pinned to 0
    • 8 ancilla wires (initialized at 0)
  • Gate Count: 16 r57 gates (organized into 8 pairs).
# Conceptual representation of a reversible gate transformation
def reversible_step(input_state):
    # Instead of: output = input_a AND input_b (lossy)
    # We use: (output, ancilla) = r57_gate(input_a, input_b, ancilla)
    return apply_r57_transformation(input_state)

By ensuring that every output has exactly one corresponding input, the circuit avoids the entropy trap and becomes a viable candidate for the subsequent mixing and sandwiching phases.