Papers
Topics
Authors
Recent
Search
2000 character limit reached

Mixed Boolean-Arithmetic Problems

Updated 3 July 2026
  • Mixed Boolean-Arithmetic problems are defined by the interleaving of modular arithmetic and bitwise Boolean operations on n-bit words, creating complex computational models.
  • These expressions are pivotal in applications such as code obfuscation, white-box cryptography, and automated synthesis, with tools like SiMBA and Scrambler highlighting their utility.
  • Advanced methodologies including e-graph based generation, signature-based simplification, and neural deobfuscation underscore their significance in both theoretical and practical realms.

Mixed Boolean-Arithmetic (MBA) problems concern expressions and computational models that interleave standard arithmetic operations (e.g., modular addition, multiplication) with bitwise Boolean operations (e.g., AND, OR, XOR, NOT) over vectors of finite precision (e.g., nn-bit words or bit-vectors). These problems are fundamental in program obfuscation, complexity theory, reverse engineering, cryptanalysis, and automated synthesis, as MBAs simultaneously exhibit the algebraic structures of both arithmetic and Boolean domains. MBA expressions are widely employed to obfuscate code, generate opaque predicates, and encode cryptographic transformations, owing to the difficulty of simplification and the combinatorial hardness induced by their interplay of logical and arithmetic semantics.

1. Formal Definitions and Semantics

Let BVnBV_n denote the set of nn-bit words, i.e., {0,…,2n−1}\{0, \ldots, 2^n-1\}. A Mixed Boolean–Arithmetic (MBA) expression EE over variables {x1,…,xt}\{x_1, \ldots, x_t\} is built from:

  • Arithmetic operators: ++, −-, ×\times (all mod 2n2^n),
  • Bitwise operators: BVnBV_n0 (AND), BVnBV_n1 (OR), BVnBV_n2 (XOR), BVnBV_n3 (NOT),
  • Constants from BVnBV_n4,
  • Parentheses and composition.

Formally, the language is defined by the grammar (see (Lee et al., 4 Mar 2026, Reichenwallner et al., 2023)): BVnBV_n5 where BVnBV_n6 is a variable, BVnBV_n7 is a constant, and each operator is interpreted as above.

Two MBA expressions BVnBV_n8, BVnBV_n9 over nn0 are semantically equivalent, nn1, iff for all assignments nn2, nn3.

MBA expressions may be classified as:

  • Linear MBA: Sums of bitwise terms, each possibly multiplied by a constant, without nonlinear or product terms.
  • Semi-linear MBA: As linear, but bitwise subterms may include nontrivial constant masks (e.g., nn4) (Skees, 2024).
  • Nonlinear/Polynomial MBA: Involving products of bitwise terms, exponentiation, or other nonlinear composition (Reichenwallner et al., 2023).

2. Algebraic and Computational Structure

MBA problems are hard because they combine two incommensurate algebraic worlds:

  • Boolean algebra of idempotent, bitwise operations, characteristic nn5.
  • Modular arithmetic over nn6-bit words, characteristic nn7.

Every arithmetic operator can be written (in principle) as a system of Boolean recurrences over the constituent bits, governed by carry/borrow propagation (see (Lomonaco, 2013)); likewise, each bitwise operation can be viewed (on nn8-bits) as a vector of nn9 single-bit Boolean operations.

The ring of generic integers, as formalized by Lomonaco (Lomonaco, 2013), underlies this dual structure: on the same set, both {0,…,2n−1}\{0, \ldots, 2^n-1\}0 (arithmetic) and {0,…,2n−1}\{0, \ldots, 2^n-1\}1 (Boolean) ring laws operate, with all "mixed" operations decomposable into Boolean-polynomial recurrences.

In circuit-theoretic terms, any MBA expression can also be modeled as a layered Boolean-arithmetic circuit or as a "read-{0,…,2n−1}\{0, \ldots, 2^n-1\}2" Boolean circuit, which reveals its expressive and complexity-theoretic power (Jukna, 2022).

3. Core Applications: Obfuscation, Synthesis, and Circuit Complexity

MBA problems are central in several domains:

  • Code Obfuscation and Anti-Reverse Engineering: MBA transformations increase expression hardness for reverse engineering, by syntactically entangling data flow and control logic in ways that resist both Boolean and algebraic simplification (Reichenwallner et al., 2023, Lee et al., 4 Mar 2026).
  • White-Box Cryptography: S-boxes or mixing layers are encoded as rich MBA forms to resist SAT- and algebraic attacks (Reichenwallner et al., 2023).
  • Program Synthesis and Circuit Sizing: Synthesizing MBA expressions consistent with a functional specification is a core challenge for program optimizers and deobfuscators. Recent advances leverage GPU-accelerated cache-free bottom-up enumeration for large search spaces (Bathie et al., 7 May 2026).
  • Complexity Theory: Mixed Boolean-arithmetic circuits (especially read-{0,…,2n−1}\{0, \ldots, 2^n-1\}3 and multilinear variants) capture, in a fine-grained manner, the complexity of problems at the boundary of monotone arithmetic, monotone Boolean, and tropical (min,+) circuit models (Jukna, 2022).

4. Algorithmic Methods for MBA Generation and Simplification

4.1. Generation via Equality Expansion

Tools such as Scrambler use e-graph–based "equality expansion" to systematically generate families of semantically equivalent but structurally complex MBA expressions (Lee et al., 4 Mar 2026). The procedure:

  • Maintains an e-graph with equivalence classes of expressions.
  • Applies a set of semantic-preserving rewrite rules (commutativity, associativity, arithmetic–bitwise bridges, distributivity, etc.) with closure under congruence.
  • Measures complexity via AST size, MBA alternation (arithmetic/Boolean switches on any path), and entropy, driving expansion to maximize cost metrics.

In benchmarks, Scrambler produces expressions orders of magnitude more complex than prior tools (e.g., AST size {0,…,2n−1}\{0, \ldots, 2^n-1\}4; MBA alternation {0,…,2n−1}\{0, \ldots, 2^n-1\}5) (Lee et al., 4 Mar 2026).

4.2. Algebraic Simplification: Linear and Semi-Linear Cases

The SiMBA algorithm (Reichenwallner et al., 2022) provides a polynomial-time procedure for simplifying linear MBAs:

  1. Evaluate the candidate MBA on all {0,…,2n−1}\{0, \ldots, 2^n-1\}6 Boolean inputs, producing a signature vector.
  2. Solve a small linear system to recover arithmetic coefficients for a basis of bitwise conjunctions.
  3. Optional refinement via pattern matching. The method is complete: linear MBAs are uniquely determined by their {0,…,2n−1}\{0, \ldots, 2^n-1\}7-signature.

The MSiMBA extension generalizes this to semi-linear MBAs by constructing generalized signature vectors (considering bitmasks and all bit positions) and enables fast, sound, and complete simplification even when constants appear in bitwise terms (Skees, 2024).

4.3. General and Nonlinear Simplification

GAMBA (Reichenwallner et al., 2023) extends SiMBA to handle all MBA cases:

  • Identifies and simplifies maximal linear or pure bitwise subtrees.
  • Performs algebraic and bitwise rewrites, constant folding, and associative flattening.
  • Handles nonlinear cases via iterative AST rewrites and heuristic substitution of nonlinear subterms. GAMBA achieves near-complete simplification on all major MBA datasets, including highly nonlinear and mixed instances.

4.4. Semantic–Guided Neural Deobfuscation

The gMBA framework (Noh et al., 30 Jun 2025) enhances Transformer-based deobfuscators by injecting expression truth-table embeddings as explicit semantic guidance. The model fuses the numerically encoded truth-table with the syntax embedding, improving deobfuscation accuracy (from {0,…,2n−1}\{0, \ldots, 2^n-1\}8 to {0,…,2n−1}\{0, \ldots, 2^n-1\}9 exact-match on standard benchmarks).

4.5. Synthesis from I/O Specification

SIMBA (Bathie et al., 7 May 2026) employs GPU-accelerated, cache-free bottom-up enumeration for synthesizing MBA expressions matching given I/O examples. This approach avoids the scalability limitations of cache-based systems, efficiently exploring the vast MBA search space by leveraging warp-friendly RPN decoding and strict locality.

5. Computational Complexity and Hardness

MBA simplification is governed by the exponential size of the truth-table (EE0 for EE1 variables) and, for nonlinear or general MBAs, by the coNP-hardness of deciding satisfiability/equivalence over bit-vectors (Reichenwallner et al., 2023). Linear and semi-linear classes can be solved efficiently for small EE2 via signature-based methods (Reichenwallner et al., 2022, Skees, 2024).

Circuit models for MBA problems (e.g., monotone Boolean, tropical, read-EE3) relate closely to classical complexity-theoretic results. Read-1 Boolean circuits are equivalent in power to monotone arithmetic circuits for multilinear polynomials and provide exponential lower bounds for several combinatorial optimization problems (e.g., the permanent) (Jukna, 2022).

6. Summary Table: Principal Tools and Results

Tool/Framework Domain MBA Class Scalability Key Strength
SiMBA Algebraic simplification Linear EE4 up to 64 Polynomial-time, sound and complete
MSiMBA Algebraic simplification Semi-linear EE5 Handles masked bitwise terms
GAMBA Algebraic/heuristic General EE6 small (practical) Nonlinear MBA, best-in-class coverage
Scrambler Obfuscation generation All (EE7) Large ASTs, 2s E-graphs for maximal complexity
SIMBA Synthesis (I/O) General EE8, EE9 GPU, cache-free, no cache limits
gMBA Neural deobfuscation General Data-driven Semantic guidance, exact-match gains

7. Open Problems and Research Directions

Key limitations and future directions include:

  • Scalability to large {x1,…,xt}\{x_1, \ldots, x_t\}0 (number of variables) remains a challenge for all but the fastest linear/semilinear solvers.
  • Generation and simplification for MBAs including shifts, rotates, or variable-exponentiation remains less developed.
  • Memory management and operator-set expansion in e-graph–based generators (e.g., Scrambler), and cost-aware/solver-guided expansion to construct MBAs hard for modern solvers (Lee et al., 4 Mar 2026).
  • Circuit lower bounds in mixed (read-{x1,…,xt}\{x_1, \ldots, x_t\}1 or monotone/tropical/arithmetic) MBA models, especially bridging the exponential gap between read-1 and read-2 (Jukna, 2022).
  • Integration of algebraic, SAT/SMT, and neural techniques, including hybrid pipelines, semantic-guided simplification, and automated selection of subexpression simplification strategies (Noh et al., 30 Jun 2025, Reichenwallner et al., 2023, Skees, 2024).

MBA problems embody the intersection of combinatorial, algebraic, and computational hardness, with practical importance for software security, program analysis, and complexity theory. Advances in signature-based, e-graph, and neural methods have driven recent progress, yet many theoretical and practical questions remain.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Mixed Boolean Arithmetic problems.