Conceptio › Archive › arXiv CS
arXiv CS open access

RV2GC: Reconstructing the Garbling Boundary in a RISC-V Garbled Processor

Zixiao Feng et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
cryptographycybersecurityprivacysecurity
Programmable garbled-circuit execution must balance the benefits of cross-program reuse against the cost of repeated work during secure execution. A complete garbled processor provides a fixed circuit for many programs, but its evaluator repeatedly visits processor-wide structures even when only a s
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

RV2GC: Reconstructing the Garbling Boundary in a RISC-V Garbled Processor Zixiao Feng1,2,3 , Xiaolin Li1,2,3 , Chenglu Jin4 , Wei Yan1,2,3 , Yong Zhang3 , Hongwei Liu1,2 , Yong Liu3 , Qinfen Hao1,2,3 1

arXiv:2610.39572v1 [cs.CR] 29 Oct 2026

Institute of Computing Technology, Chinese Academy of Sciences 2 University of Chinese Academy of Sciences 3 Zhongguancun Laboratory 4 Centrum Wiskunde & Informatica {fengzixiao24z,lixiaolin19s,yanwei,liuhongwei,haoqinfen}@ict.ac.cn chenglu.jin@cwi.nl; {zhangyong,liuyong}@zgclab.edu.cn and associated management. The observation motivates a structural question: can a programmable GC system keep a fixed cross-program circuit substrate while invoking only the computation needed for the current operation? RV2GC answers this question by reconstructing the garbling boundary. Public instruction scheduling and operand routing are separated from the instruction computations that require garbled evaluation. Register and memory state are stored outside the individual circuit topologies, with secret values retained as wire labels. A fixed library of RISC-V instruction circuits supplies the protected operations. Program changes within the supported ISA change the public schedule and initialization data, while the library topologies remain unchanged. During execution, RV2GC connects instruction circuits and garbling-free paths through persistent label-encoded state to form a continuous execution. It targets oblivious programs whose public execution traces are independent of private inputs. The Conditional-execution Stack and protected commits allow secret-dependent choices to affect state updates under this public schedule. Our two-party software implementation is evaluated against ARM2GC, Wang [18], VISA [19], and function-specific circuits. We examine runtime, communication, stateful execution, and program storage. We also use BINSEC [1] to check that control flow and memory addresses in the final benchmark binaries are independent of private inputs; Section IV presents the methods and results. We make three technical contributions:

Abstract—Programmable garbled-circuit execution must balance the benefits of cross-program reuse against the cost of repeated work during secure execution. A complete garbled processor provides a fixed circuit for many programs, but its evaluator repeatedly visits processor-wide structures even when only a small part performs the current protected computation. We present RV2GC, which reconstructs the garbling boundary around a fixed library of RISC-V instruction circuits. Public scheduling and operand routing operate outside the circuit topologies; persistent label-encoded state connects independently invoked garbled instruction circuits and instruction-specific garblingfree paths through a common interface. A Conditional-execution Stack and protected commits support secret-dependent branches, bounded loops, and secret-indexed memory access under public scheduling, keeping instruction and memory-address sequences independent of private inputs. Across nine benchmarks, measured ARM2GC-to-RV2GC runtime ratios range from 12.81 to 4,043. In terms of circuit size, the largest listed instruction circuit has 3,386 gates, corresponding to 2.044% and 0.393% of the 256byte and 4,096-byte Amber processors, respectively. Additional comparisons quantify schedule storage, communication, and the cost of secret-dependent execution. Index Terms—Garbled circuit, secure computation, garbled processor, RISC-V.

I. I NTRODUCTION Garbled circuits (GCs) enable two parties to compute over private inputs while revealing the designated outputs [20]. Programmable execution must choose which structures remain reusable across programs and which are specialized. Complete garbled processors retain a fixed processor circuit across programs [15], [16]. Function-specific circuits and programspecialized instruction structures instead encode more of the application into the secure execution artifact [3], [12], [18], [19]. These choices affect preparation cost and repeated execution work. ARM2GC illustrates the cost of a complete-processor boundary. Its SkipGate algorithm avoids cryptographic processing for gates that can be resolved from public information, but identifying those gates still visits the processor netlist [16]. Our profile of nine benchmarks shows that evaluator work other than protected-gate processing accounts for 71.3–93.2% of ARM2GC’s measured runtime, including netlist traversal

•

1

Garbling-boundary reconstruction. We rethink which components of programmable execution should reside within the repeatedly traversed garbled-circuit topology. RV2GC separates public instruction scheduling and operand routing from garbled computation, decouples label-encoded architectural state from individual circuit topologies, and implements instruction operations requiring garbled evaluation through a fixed library of RISC-V instruction circuits. This reconstruction preserves crossprogram reuse of circuit topologies while limiting online

circuit traversal to the circuitry required by the scheduled operation. • Stateful instruction composition with garbling-free execution. We design a persistent state interface that composes separately invoked instruction circuits and garblingfree execution paths into continuous RV32 execution. Public register and memory values are maintained explicitly, while protected values persist as wire labels under a common two-party label-state invariant. Both execution paths preserve this invariant, allowing intermediate results to pass between instructions without decoding protected values. For eligible instruction cases, public computation, label-domain manipulation, preparation-time resolution, or direct state movement realizes the primary instruction semantics without encrypted garbled tables. • Secret-dependent execution under public scheduling. We design a Conditional-execution Stack and protected commits that support secret-dependent branches, bounded loops, and secret-indexed memory access under a public instruction and address schedule. The stack maintains effective protected predicates across nested conditional regions; commits use these predicates to select candidate state updates or preserve prior values. This interface carries secret-dependent choices through protected state while the public schedule remains independent of private inputs.

TABLE I C OMPARISON OF PROGRAMMABLE GC SYSTEMS BY PER - PROGRAM ARTIFACTS , FIXED STRUCTURES , AND ONLINE EXECUTION PATHS . System

Per-Program

Fixed Structure

Online Execution

CBMC-GC Function-specific / Frigate circuit

GC compiler; GC backend

Function-circuit evaluation

Wang

Instruction banks; specialized CPU circuits

MIPS state interface; ORAM primitives

Oblivious fetch; CPU/ORAM execution

VISA

Fragment circuits; active-set stacks

Stacked Garbling; EpiGRAM

Fragment selection/evaluation; EpiGRAM access

ARM2GC

Program binary

Complete processor Processor-wide circuit traversal

RV2GC

Public instruction schedule

Instruction-circuit library

Scheduled-operation execution

B. Cost of a Complete-Processor Boundary SkipGate classifies gates using public values and wire relationships, then skips unnecessary garbling or evaluation [16]. In the ARM2GC implementation we measure, this classification visits the processor netlist each cycle. Fetch, decode, register selection, and other processor structures therefore contribute evaluator work even when their values are publicly determined. Our profile attributes 1.0–4.2% of measured runtime to protected-gate processing and 71.3–93.2% to the remaining evaluator work, including traversal, public-value propagation, state copying, and gate management. RV2GC reduces repeated access to the complete processor structure by directly dispatching the instruction computation needed for the current operation.

II. BACKGROUND AND M OTIVATION A. Garbled Circuits and Programmable Boundaries Yao’s garbled-circuit (GC) protocol enables two parties to evaluate a Boolean circuit over private inputs while revealing only the designated output [20]. The generator assigns two opaque labels to each wire, encodes gate functionality in garbled tables, and supplies labels for its own inputs; the evaluator obtains its input labels through oblivious transfer (OT), propagates the active labels gate by gate, and decodes only authorized outputs. Free-XOR, fixed-key garbling, and half-gates reduce gate-level cost [5], [7], [23], but do not determine which execution structures lie inside a reusable garbling boundary. Sequential GC carries label-encoded state across cycles, and TinyGarble uses this model to realize complete garbled processors [15]. Table I compares five boundary organizations across perprogram artifacts, fixed structures, and online paths. CBMCGC and Frigate use function-specific circuits [3], [12]; Wang and VISA derive program-specific instruction or fragment structures [18], [19]; ARM2GC retains a complete processor circuit traversed with SkipGate [16]; and RV2GC retains an instruction-circuit library and persistent-state interface, with a public schedule selecting operations. The table separates what remains fixed across programs from what is traversed at each step. RV2GC uses a programspecific public schedule to select and connect operations from a fixed library.

C. Execution and Threat Model RV2GC uses a public-function, semi-honest two-party model: Alice garbles and Bob evaluates, and both follow the protocol. We assume secure GC and oblivious transfer (OT). Both parties share the program, fixed instruction-circuit topologies, and public configuration: public inputs and execution-size parameters fixed independently of private inputs. These determine the public schedule, operand routing, and memory-address sequence. For a supported RV32 binary B, public configuration u, and private input s, let Tr(B, u, s) denote its logical instructioncontrol and memory-address trace. We call B an oblivious program under u when, for all allowed private inputs s1 , s2 , Tr(B, u, s1 ) = Tr(B, u, s2 ).

(1)

The computed results and logical state updates may still depend on private inputs. The parties’ private inputs and protected intermediate state are the objects of protection; designated outputs are revealed only to authorized recipients. The privacy goal is that protocol execution reveals no additional private information beyond what a party can learn from the public information, its own input, and its authorized outputs.

2

Input

Per-program Preparation

Online Stateful Execution

Source Program

Checked Compilation

Per-program Preparation

Declared Public parameters

Application-independent Construction

Circuit Synthesis Secure Input Initialization

Decode

Execute

minimize

Add a0, a1, a2

Addition Circuit

Mul a3, a4, a5

Multiply Circuit

Write Back

Registers

Memory Access

Address Decoding decouple

Garbled Registers

……

……

Public Instruction Schedule

Fixed InstructionCircuit Library

Separately Invoked Instruction Garbled Circuit

Memory

Decode Authorized Outputs

Garbled Memory

Garbled Architectural State

one-time Online Stateful Execution Fixed InstructionCircuit Library

Initialize State

Persistent Execution State Garbled Architectural State Conditionalexecution Stack

Fetch

Applicationindependent Construction

Public-schedule Generator

Alice/Bob Private Input

Traditional Complete Microarchitecture

Fig. 2. Reconstructing the garbling boundary. A complete garbled microarchitecture encloses processor-wide control, execution, and state structures. RV2GC instead selects from a fixed instruction-circuit library and decouples the Garbled Architectural State from the complete processor.

Public Instruction Schedule

Operation Executor Read Update

state from the complete processor circuit. The result is a library of separately invoked instruction circuits connected through Persistent Execution State. The fixed library contains the protected instruction circuits for the supported RV32 subset, synthesized once from HDL into TinyGarble-compatible SCD format. Each public schedule entry identifies an operation and the routing information that connects its operands and result to architectural state; protected operands remain in that state rather than in the schedule. The schedule is derived from an RV32 binary satisfying Eq. 1 and its declared public parameters. It remains unchanged when only private inputs change; a different program or public configuration may require a new schedule. Schedule generation must preserve the binary trace when producing operation and routing metadata. At each online step, both parties consume the same schedule entry and select the same implementation from the fixed library. When an operation requires non-free gates, its current state labels become circuit inputs and invocation-specific labels and garbled tables are produced for that circuit. The output labels return to persistent state for later operations. For eligible operations, instruction-specific garbling-free optimizations realize their semantics without encrypted garbled tables, as described below. RV2GC therefore reuses circuit topologies—not pre-garbled instances—and restricts protected work to the scheduled operation rather than a complete processor traversal.

Scheduled Instruction Garbled-circuit Execution Garbling-Free Optimizations

Decode Authorized Outputs Fig. 1. RV2GC’s per-program preparation, application-independent circuit construction, and online stateful execution. Prepared programs share the public-schedule generator, instruction-circuit library, and runtime.

III. RV2GC A RCHITECTURE AND I MPLEMENTATION A. System Overview RV2GC runs as software on general-purpose CPUs. Alice and Bob are separate processes connected over TCP. HDL synthesis produces Boolean instruction netlists for software garbling and evaluation; it does not produce a hardware accelerator. Figure 1 shows per-program preparation, applicationindependent circuit construction, and online stateful execution. The library is synthesized once. Per-program preparation produces an oblivious RV32 binary, its public instruction schedule, and initialization data. The prepared programs use the same runtime and circuit library. Section IV-C describes the preparation paths and their checks. At execution time, input encoding and OT initialize public values and secret labels in registers and memory. The Operation Executor follows the schedule, reads the Persistent Execution State, and invokes either an instruction circuit or a garbling-free path. The Conditional-execution Stack carries protected condition state across these operations. Only designated outputs are decoded.

C. Stateful Instruction Composition with Garbling-Free Execution Separately invoked instruction circuits must preserve a consistent representation of register and memory state. 1) Persistent Execution State Across Operations: Separately invoked operations advance RV2GC’s Persistent Execution State, which has two parts. The Garbled Architectural State comprises Garbled Registers and Garbled Memory in persistent software-managed arrays outside the complete processor circuit; each bit is either an explicit public value or a protected wire-label representation. The Conditional-execution Stack retains conditional context across scheduled operations

B. Reconstructing the Garbling Boundary Figure 2 contrasts two garbling-boundary organizations. A complete garbled microarchitecture encloses fetch, decode, execution, writeback, registers, address decoding, and memory in one processor-wide topology. RV2GC makes two architectural changes: it minimizes the protected structure invoked for an operation to the circuitry needed to implement its instruction semantics, and it decouples register and memory

3

and is detailed in Section III-D. Figure 2 depicts only the protected portion of the Garbled Architectural State. Public schedule metadata selects register and memory locations without decoding protected values. Only values classified as public enter public computation; protected operands retain their label representation along the routes specified by the schedule. At schedule boundary t, every protected state bit b with logical value vb satisfies a two-party label-state invariant: 0 1 Alice stores a pair (Kt,b , Kt,b ), Bob stores only the active vb label Kt,b , and the session-wide Free-XOR offset R gives 1 0 Kt,b = Kt,b ⊕R. Input encoding and OT initialize register and memory representations; stack transitions derive valid labels for conditional state. A garbled instruction circuit returns a new pair/active-label correspondence; copies and bit-position permutations apply a common public mapping; XOR and NOT preserve the offset through label algebra; and public operations produce explicit public results. Conditional-execution Stack transitions and protected selection preserve the same invariant. Induction over the public schedule therefore shows that each operation preserves the label-state relation, enabling continuous execution without decoding intermediate secrets. Persistent memory arrays also decouple logical memory capacity from the fixed topology: larger memories require additional state storage, not a larger synthesized processor circuit. 2) Garbling-Free Instruction Execution: Within the operation-level garbling boundary, some instruction cases admit garbling-free implementations. RV2GC applies garbling-free optimizations when public computation, labeldomain manipulation, preparation-time resolution, or direct state movement can realize the instruction semantics while preserving the Garbled Architectural State representation used by scheduled instruction execution. We call this handling garbling-free because the instruction’s primary semantics require no encrypted garbled-table entries to be generated, transmitted, or evaluated. When all operands are explicit public values, both parties can evaluate the operation locally. This case applies across multiple instruction classes. Figure 3 shows five instruction classes to which RV2GC applies such optimizations. XOR and NOT. RV2GC applies the standard Free-XOR construction [7] to XOR. Let protected input wires x and y 1 0 carry bits a and b, with each wire w satisfying Kw = Kw ⊕R. 0 0 0 1 0 Alice derives Kz = Kx ⊕ Ky and Kz = Kz ⊕ R, while Bob derives the active output label by computing Kxa ⊕Kyb . Because

,

(a) XOR/NOT srli a0, a0 , 1 k31 k30 … k0

k30 … k0

0

(b) Shift Control Flow

Instruction Sequence

Control Flow

Instruction Sequence

0: li a0, 4

li a0, 4

4: lui a1, 0x1000

li a1, 0x1000000

8: auipc a2, 0x0

li a2, 8

(c) Long Immediate Control Flow

Instruction Sequence

0: addi a0, a0, 4

addi a0, a0, 4

0: lw a0, 0(a1)

lw a0, 0x1000

4: bge a0, a1, 0

addi a1, a1, 4

4: addi a0, a0, 4

addi a0, a0, 4

8: addi a1, a1, 4

…

8: sw a0, 0(a1)

sw a0, 0x1000

(d) Branch/Jump (e) Memory Access Fig. 3. Five garbling-free instruction types. (a) XOR and NOT operate directly in the label domain; (b) a fixed-amount logical shift permutes labels; (c) longimmediate values are resolved during preparation; (d) public branch and jump outcomes determine the public schedule; and (e) public memory addresses enable direct state transfer.

tions become explicit public zeros. This implements the shift without invoking a circuit. Long-immediate instructions. The results of lui, auipc, and the li pseudo-instruction are determined by the binary layout and public execution point. Per-program preparation resolves these values and records explicit public immediateload operations in the schedule, so no online circuit is needed to reconstruct them. Public control-flow instructions. When a branch or jump outcome is public, the public-schedule generator follows the selected target and records the resulting instruction sequence. The control-transfer instruction itself need not be dispatched during online execution. Public-address memory instructions. When an effective memory address is public, the schedule identifies the location and the runtime transfers representations directly between persistent register and memory arrays. Loads copy the selected memory representation to a register, while stores copy the source representation to memory. Narrow signed loads replicate the sign label and unsigned loads insert public zeros in the upper positions. No in-circuit address decoder or encrypted table is required. D. Secret-Dependent Execution under Public Scheduling Secret-dependent branches, loop termination, and array indices ordinarily affect the execution path or accessed addresses. RV2GC expresses these choices through protected values while a public schedule fixes the instruction and address sequences. The schedule determines which computations occur; protected predicates determine which results take effect in program state. 1) Conditional-execution Stack and Protected Commits: The Conditional-execution Stack carries the effective predicate of the current conditional region across instruction invocations.

Kxa ⊕ Kyb = Kx0 ⊕ Ky0 ⊕ (a ⊕ b)R = Kza⊕b the resulting label pair and active label represent a ⊕ b under the same label-state invariant. For NOT, Alice exchanges the semantic roles of the two labels while Bob retains the same active label under the exchanged interpretation, producing a valid output representation without an encrypted garbled table. Fixed-amount logical shift. A logical shift by a public immediate applies the same public bit-position permutation to Alice’s label pairs and Bob’s active labels. Vacated posi-

4

TABLE II C- INTERFACE MAPPINGS TO RV32 CONDITIONAL - EXECUTION INSTRUCTIONS AND C ONDITIONAL - EXECUTION S TACK OPERATIONS . C Interface

RV32 Extension

RVIF(c)

pushbr

RVENDIF RVELSEIF(c)

RVELSE

popbr

push 1

…

1

1

1

…

1

push cond0 … condl-1

Stack Operation

condl

cond0 … condl-1

~condl

else0

push else0

Push a new level: set BRANCH_STATE=1; derive BRANCH_COND and BRANCH_ELSE from c and ¬c, respectively; combine both with the enclosing BRANCH_COND when nested.

… elsel-1 (a) if pop

cond0 … condl-1

Pop the top level and restore the enclosing branch context.

else0

updatebr Replace the top BRANCH_COND and BRANCH_ELSE using the remaining else condition combined with c and ¬c, respectively.

… elsel-1

…

elsel-1

pop

BRANCH _STATE

pop

BRANCH _COND

pop

BRANCH _ELSE

(b) endif pop

push elsel-1 & condl

cond0 … condl-1

elsel-1 & ~condl

else0

push

push

pop (c) else if

… elsel-1 (d) else

Fig. 4. Conditional-execution Stack transitions for (a) entering an if region, (b) leaving the region, (c) advancing to else-if, and (d) advancing to else.

updatebr Promote the top BRANCH_ELSE to the current BRANCH_COND.

make only the selected body’s updates take effect. The stack combines each branch condition with its enclosing predicate, so nested regions obey the same rule without changing the public sequence. 3) Publicly Bounded Secret Loops: When loop termination depends on a secret, stopping execution directly on that condition would make the public instruction-sequence length reflect the secret-dependent iteration count. RV2GC therefore uses a public loop bound for the declared public configuration and requires it to cover the supported executions. The public schedule specifies that fixed number of iterations. Protected liveness records whether the source loop has logically terminated. Once it has, later iterations remain publicly scheduled but no longer commit the loop body’s state updates. Figure 5(b) shows the state flow, and Algorithm 1 gives the execution procedure. At iteration i, LOOP_LIVEi records whether the source loop remains active, and Cond i is its protected condition. Their conjunction, LOOP_ACTIVEi = LOOP_LIVEi ∧ Cond i , governs the current updates. Carrying this active predicate into the next iteration keeps a logically terminated loop inactive. 4) Secret-Indexed Access within a Public Block: Directly addressing memory with a secret index would make the address sequence depend on that index. RV2GC instead visits every entry of a public address range that covers the allowed indices, denoted as array 0 , . . . , array n−1 . The range may be

Each scheduled operation computes a candidate result according to its RV32 semantics. In a conditional region, a protected MUX uses the predicate to select the candidate or the prior destination value; otherwise, the candidate directly updates its destination. All scheduled computations must remain defined and their memory accesses valid, including when their updates are suppressed. Three instructions in the RV32 custom-instruction space— pushbr, popbr, and updatebr—maintain this conditional context. They update a Conditional-execution Stack that persists across scheduled operations. Each stack level contains the following three state fields: • BRANCH_STATE: A public mode bit that indicates whether the current operation is under conditional execution. • BRANCH_COND: A label-encoded effective predicate that determines whether updates in the current conditional region take effect, incorporating enclosing predicates when nested. • BRANCH_ELSE: A label-encoded predicate that records the remaining else condition used by a subsequent else-if or else branch. The low-level C interface maps conditional constructs to the RV32 conditional-execution extension in Table II. The mapped instructions update the Conditional-execution Stack, providing state transitions for protected secret-dependent execution. Figure 4 visualizes these transitions. At any nesting depth, the current top BRANCH_COND represents the effective protected predicate for that conditional region. pushbr creates a new level and combines its condition with the enclosing predicate, updatebr advances that level to an else-if or else case, and popbr restores the enclosing context. The same predicate-and-commit interface supports the three execution patterns below. Section IV-C describes how the program transformation tool generates these forms. 2) Secret-Dependent Branches: For a secret-dependent branch, the public schedule includes the operations from each branch body. Figure 5(a) shows how protected commits

Algorithm 1 Secret-dependent loop execution with a public bound. 1: LOOP_LIVE0 ← current execution condition 2: for i from 0 to public loop bound −1 do 3: Cond i ← evaluate the loop condition using protected values 4: LOOP_ACTIVEi ← LOOP_LIVEi ∧ Cond i 5: BRANCH_COND ← LOOP_ACTIVEi 6: execute the fixed public body schedule 7: LOOP_LIVEi+1 ← LOOP_ACTIVEi 8: end for

5

Garbled Memory

Garbled Architectural State

GC

Instruction Circuit

Conditionalexecution Stack

GC

Addition Circuit

Public schedule

Algorithm 2 Secret-indexed loads and stores. Secret-indexed load 1: selected value ← fixed public initializer 2: for i from 0 to n − 1 do 3: match ← protected equality(i, secret index) 4: selected value ← protected MUX(match, array[i], selected value) 5: end for Secret-indexed store 1: for i from 0 to n − 1 do 2: match ← protected equality(i, secret index) 3: update condition ← current execution condition ∧ match 4: array[i] ← protected MUX(update condition, store value, array[i]) 5: end for

Garbled Instruction Circuit

Garbled Registers

Multiply Circuit

BRANCH_STATE BRANCH_COND

…

(a) Secret-Dependent Branch

Garbled Architectural State

for i from 0 to public loop bound - 1

Instruction Circuit GC

Condi+1 Livei+1 Activei+1

… … …

Conditional-execution Stack

GC Garbled Instruction Circuit

Condi Livei Activei

&

Garbled Architectural State

Conditionalexecution Stack

(b) Secret-Dependent Loop

= traversal index

array0 array1 … arrayn-1

secret index

GC

arraysecret index

its initial logical values and their representation in Persistent Execution State. The instruction circuits and garbling-free paths in Section III-C implement the corresponding RV32 operations while preserving the representation required by subsequent operations. The protected-update rules in Section III-D make candidate updates take effect only under the effective predicate and preserve the prior destination otherwise. After a loop logically terminates, the remaining public iterations no longer commit the loop body’s updates, preserving its result. For an index within the declared range, protected selection reads or updates the unique matching entry. Under the execution conditions stated with those mechanisms, these transitions maintain the logical-state correspondence throughout the scheduled execution; final decoding therefore yields the prepared program’s specified outputs. We further check the implementation of these mechanisms through complete-output comparisons. In the transformation tests, the original and transformed RV32 programs running on Spike produce the same complete outputs as an independent reference interpreter. Representative programs also yield matching decoded outputs in the Alice/Bob runtime. Section IV-C describes the test programs and comparison methods.

Garbled Instruction Circuit

Garbled Architectural State

(c) Secret-Indexed Memory Access Fig. 5. Three protected execution patterns under public scheduling. (a) BRANCH_STATE selects direct or conditional update; on the conditional path, BRANCH_COND selects the candidate result or the current destination value. (b) A publicly bounded loop uses protected condition and liveness to control state updates. Cond i , Live i , and Active i correspond to the protected source condition, LOOP_LIVEi , and LOOP_ACTIVEi , respectively. (c) A fixed public-address scan uses protected equality and MUX feedback to select the secret-indexed entry.

an array subrange; its addresses are public, while its entries and the selected index may be protected. Figure 5(c) shows the load path, and Algorithm 2 gives both load and store procedures. Each scan compares the public traversal index with the protected secret index. A load uses the equality result to select the matching value; a store updates the matching entry and preserves the others. Conditional stores combine the match with the current execution predicate. For a valid index, the value of the unique matching entry replaces the load’s fixed public initializer and determines the result. The addresses traversed depend only on the configured range. Each access scans that range once, so its work grows with the number of entries; Section V-D evaluates this behavior.

B. Privacy Argument Equation 1 requires identical logical instruction and address traces for different private inputs under a fixed program and public configuration. The schedule generator and runtime follow the public routing and value-classification rules in Section III. Thus, public operation selection and memory access introduce no additional secret dependence into the observable execution sequence. Under the GC/OT assumptions in Section II-C, input transfer and circuit evaluation protect the encoded private values. The invocation-specific garbling in Section III-B and the labelstate interface in Section III-C1 connect successive operations without decoding their protected predicates or intermediate

IV. C ORRECTNESS AND S ECURITY RV2GC must preserve the prepared program’s result and protect private information under the model in Section II-C. We first explain how the execution mechanisms in Section III meet these requirements, then describe the checks on program transformation and final binaries. A. Functional Correctness We take the prepared RV32 program as the reference execution. Input encoding establishes the correspondence between

6

values. Garbling-free operations use the public mappings and label algebra specified in that interface, and protected commits retain encoded results for later instructions. With these operations and routing rules correctly implemented, the system decodes only designated outputs. The resulting composition reveals no additional private information beyond a party’s own input, the public information defined in Section II-C, and its authorized outputs.

TABLE III T EST PROGRAMS FOR VALIDATING PROGRAM TRANSFORMATION . Item

Contents

Mechanism combinations Branches Loops Secret-indexed memory

None; single-level; nested None; bounded for; bounded while None; read; write

Functional test programs

C. Program Transformation and Functional Validation

Conditional swap

RV2GC supports directly written oblivious programs and provides a transformation tool that prepares supported C programs for the same RV32 runtime. Within a single C translation unit, the tool tracks dependencies on private inputs. It replaces secret-dependent branching with operations executed in a fixed public order, using protected conditions to make only the selected branch’s state updates take effect. It converts secret-terminating loops to execution with public bounds and secret-indexed accesses to fixed scans over public ranges. Preparation checks that public loop bounds and counter forms are identifiable and that scan objects and their extents are resolvable and consistent. The tool analyzes dependencies in GCC’s intermediate representation (GIMPLE/SSA) to check for ordinary branches or memory addresses that still depend on secrets after transformation. Strict checking rejects unresolved pointer targets and external calls. To preserve an explicit conditional-commit structure through compilation, the tool first computes a candidate value, then uses a protected condition to select it or retain the previous value. Each generated commit span enters conditional execution with pushbr, performs one register copy (mv or c.mv), and exits with popbr. Before and after linking, the validator checks that these entry and exit instructions are paired, that each span contains only the intended copy, and that the number of spans matches the transformation result. This constraint applies to automatically generated commit spans; directly written programs can still use the nested conditional execution described in Section III-D. Preparation stops if transformation or checking fails. To check that transformation preserves program results, we use the 34 test programs in Table III. They cover combinations of branches, loops, and secret-indexed accesses, as well as concrete computations such as conditional swaps and searches. For each test input, the original and transformed RV32 programs running on Spike produce the same complete outputs as an independent reference interpreter. Representative programs also execute in the Alice/Bob runtime, where their decoded outputs match the reference results. We additionally introduce missing or invalid loop bounds and scan extents, unsupported control or addressing, and malformed commit structures into otherwise valid programs; all such cases are rejected before execution. For every RV2GC benchmark in the performance evaluation, we also compare the complete secure-execution output with a Spike reference execution using the same inputs; all outputs agree. The next section further checks whether

Search and counting Secret-indexed access Branches and memory Loops and memory

Swap two values according to a secret comparison Bounded search; bounded threshold count Secret-indexed read; secret-indexed update Lookup using a branch-selected index; update with a value selected by nested branches Secret-indexed lookup and accumulation within a loop

The first three rows define 3 × 3 × 3 − 1 = 26 mechanism configurations, excluding the all-none case. Together with 8 functional programs, the suite contains 34 programs. Generated loop variants have secret-dependent termination. Generated programs use arithmetic, bitwise, or comparison expressions and input arrays with a public length of 4 or 8 words per party.

control flow and memory addresses in the final binaries are independent of private inputs. D. Control-Flow and Memory-Address Verification To check that compiled programs satisfy the execution requirement in Section II-C, we use BINSEC 0.11.3 to analyze whether control flow and memory addresses in the final binaries depend on private inputs [1]. For a fixed program and public configuration, private inputs may affect the computed results, but must not change the publicly observable instruction and address sequences. We extend BINSEC’s instruction semantics to model RV2GC’s custom conditional-execution instructions, pushbr, updatebr, and popbr, together with protected state updates. Conditional stores retain their publicly observable address accesses; the protected predicate controls only the committed value. For each configuration, we initialize the declared public state and make both parties’ full private-input regions symbolic, then use relational symbolic execution to check trace independence. Analysis covers execution from entry to main through its return. It also checks that predicate values are Boolean and that conditional-stack operations are balanced and within capacity. Verification succeeds only when the complete analysis establishes trace independence, with no unresolved checks or failed assertions. The extended instruction model agrees with independent symbolic output specifications and concrete Spike execution results with Boolean predicates. We also check the analysis using control programs with secret-dependent branches and secret-indexed accesses: untransformed programs expose the corresponding control-flow or address dependencies, whereas transformed programs pass verification. Invalid predicate values, stack operations, and output specifications trigger the corresponding assertion failures.

7

All 37 benchmark configurations used in our evaluation pass final-binary analysis. Under the declared public configurations, execution boundaries, and extended instruction model, their control flow and memory addresses are independent of private inputs. These results provide binary-level evidence for the public-execution property required by the preceding privacy argument.

System

V. E VALUATION

RV2GC

TABLE IV RV2GC PROTECTED - CIRCUIT SIZES RELATIVE TO COMPLETE ARM2GC A MBER PROCESSORS .

We evaluate the three design choices through circuit size and measured runtime, stateful composition over a fixed library, and the runtime costs of protected execution. Comparisons with other programmable systems and function-specific circuits then examine how different approaches trade reuse against execution costs.

Class

Circuit

Relative to ARM2GC

Gates

Amber 256-B

Amber 4096-B

Arithmetic

add sub mul

244 244 3,386

0.147% 0.147% 2.044%

0.028% 0.028% 0.393%

Logical

and or

32 32

0.019% 0.019%

0.004% 0.004%

Shift

sll sra

419 444

0.253% 0.268%

0.049% 0.052%

Compare

slt sltu swapgt

185 183 256

0.112% 0.110% 0.154%

0.021% 0.021% 0.030%

165,696 860,536

100% —

— 100%

Amber 256-B Amber 4096-B

ARM2GC

TABLE V C OMPARISON OF RV2GC AND ARM2GC ACROSS NINE MATCHED

A. Experimental Setup

WORKLOADS IN TERMS OF GATE TRAVERSAL TIME AND COMPLETE ONLINE EXECUTION TIME . S PEEDUPS ARE DEFINED AS TARM2GC /TRV2GC AND COMPUTED FROM UNROUNDED TIMES .

Experiments run on an Intel Core i7-14650HX with 15 GiB of memory and Ubuntu 22.04, with TCP loopback communication between the parties.1 RV32 programs are compiled with RISC-V GCC 15.2.0 at -O2, and instruction circuits are synthesized with Yosys 0.9. RV2GC and ARM2GC share the underlying garbling implementation and use 128-bit wire labels. We use matched inputs and check complete outputs. We report online execution time and the total application-level bytes sent by both parties. Online time excludes compilation, schedule generation, and circuit synthesis.

Gate Traversal (s)

Workload

Speedup

RV2GC ARM2GC Public control flow Sum1024 0.001 Mult32 0.001 MatMul8×8 0.065 Hamming512 0.007 AES-128 0.075 SHA3-256 0.032 CORDIC32 0.004

Online Execution (s) RV2GC

3.832 3,474.94× 0.591 751.59× 77.125 1,188.12× 103.917 14,138.28× 528.478 7,067.54× 326.066 10,219.83× 4.563 1,127.02×

Secret-dependent control flow MergeSort32 0.143 68.740 Dijkstra8 0.026 27.712

482.10× 1,080.71×

Speedup

ARM2GC

0.095 0.065 0.218 0.088 0.182 0.091 0.029

4.611 48.40× 0.829 12.81× 96.958 445.30× 111.526 1,265.92× 578.264 3,185.91× 368.845 4,042.58× 5.126 174.32×

0.311 0.149

87.720 31.047

281.69× 207.99×

B. Circuit Boundary and Measured Runtime RV2GC

ARM2GC

Traversal speedup

Online speedup

1,000 100

10,000

10

1,000

1

100

0.1 0.01

4

102 Sum

6 2 8 2 ×8 ra8 t32 512 lt3 IC3 -25 -12 ul8 kst Sor ing A3 Mu RD AES tM Dij SH rge CO mm Ma Me Ha

Speedup

Online Time (s)

We first compare reusable circuit topologies, then evaluate runtime using the fixed 4,096-byte Amber configuration. 1) Static Boundary Size: Table IV compares the gate counts of ten RV2GC protected-circuit topologies with the 256-byte and 4,096-byte ARM2GC Amber processors. The multiplication circuit is the largest of the ten listed RV2GC circuits, with 3,386 gates, corresponding to 2.044% and 0.393% of the gate counts of the two Amber processors, respectively. 2) Runtime Comparison with ARM2GC: Table V compares ARM2GC and RV2GC across nine benchmarks. ARM2GC uses its 4,096-byte Amber processor with SkipGate, and RV2GC uses its fixed instruction-circuit library. The two secret-dependent workloads use protected commits and fixed scans in RV2GC, and ordinary branches and indexed accesses in ARM2GC. Figure 6 presents the corresponding runtime and traversal speedups.2

10

Fig. 6. Comparison of RV2GC and ARM2GC across nine matched workloads. Bars show online execution time; lines show traversal and online execution speedups.

The measured online runtime speedups range from 12.81× to 4,043×. Substantial speedups also occur in the seven publiccontrol benchmarks, with SHA3-256 giving the largest ratio. These gains therefore extend beyond workloads requiring secret-control-flow transformations. ARM2GC also exploits public control through ARM conditional execution [16]. RV2GC’s structural distinction is that a public operation directly selects its execution path without processor-wide gate classification.

1 The main ARM2GC comparison and scaling study use one measurement per configuration, from immediately after Bob’s launch until both processes exit. Four-system workload and function-specific comparisons report threerun medians for time and communication. The former uses process elapsed time for RV2GC/ARM2GC, the longer party time for Wang, and evaluator time for VISA; the latter uses a synchronized interval after program loading, covering input encoding, OT, evaluation, and output. 2 Gate-traversal time reports the remaining evaluator time after subtracting protected-gate-handler time. The RV2GC measurement also includes garbledtable reception.

C. Stateful Execution with a Fixed Circuit Library We examine two properties: whether different applications reuse the same fixed instruction-circuit library, and whether

8

protected comparisons. For Comparison, we increase the comparison length from 8 to 128; private data determines the logical stopping point, while the public schedule continues over the prescribed range. For PIR, every read scans 8–128 32-bit entries and uses protected selection to return the secretindexed entry. These workloads exercise the mechanisms in Section III-D. Figure 7 reports their runtimes and speedups. All points in the secret-dependent execution scaling study use the same Amber configuration: 4,096-byte code memory, 128-word input memories for both parties, 64-word output memory, and 64-word stack memory. Over the evaluated sizes, ARM2GC’s runtime grows faster, and RV2GC’s speedup increases with size in all three benchmarks, reaching 1,048×, 51.6×, and 145× at their largest configurations. Thus, as conditional swaps, loop iterations, and scan work increase, RV2GC’s combination of public scheduling and protected state updates retains a runtime advantage over ARM2GC.

TABLE VI L ONG - RUNNING INTEGER PROGRAMS EXECUTED WITH THE SAME FIXED INSTRUCTION - CIRCUIT LIBRARY. Program

Computation Structure

Mini-Transformer Mini-ResNet

Attention, residual, FFN Convolution, residual, pooling

Dynamic Inst. Online (s) 3,411,714 11,022,541

80.396 178.015

separately invoked circuits continuously pass and update architectural state within long-running programs with different structures. 1) Fixed Library and Evaluated ISA Scope: All RV2GC programs in this evaluation use the same fixed instructioncircuit library. The dispatcher accepts 34 RV32 opcodes across protected-circuit, public-computation, and label-only paths. The evaluated corpus dynamically exercises 31 of them and contains no opcode outside the accepted set. The evaluation covers RV2GC’s implemented RV32 integer subset; floatingpoint operations, atomics, and exception semantics are outside the evaluated scope. 2) Long-Running Stateful Programs: We evaluate two programs listed in Table VI: Mini-Transformer with attention, residual connections, and a feed-forward network, and MiniResNet with convolution, residual blocks, pooling, and a classifier. Both programs have public model structures and loop bounds. Their inputs and weights use signed int8 values, with int32 accumulation. Mini-Transformer and Mini-ResNet execute 3.41 and 11.02 million scheduled instructions, respectively, using the same fixed library. All ten int32 output logits of each program match the Spike reference results. Their public schedules occupy 87.76 MiB and 283.35 MiB, respectively. These sizes show the storage cost of representing a long execution as a public schedule. Both programs also pass binary trace verification at their full public sizes (Section IV-D).

E. Tradeoffs with Other Programmable GC Systems We compare five computations across the four systems and sweep the execution length of a common stateful test program to identify resource growth. The comparisons cover runtime, communication, program artifacts, and derived state. 1) Workload-Level Comparison: Figure 8 compares five computations across RV2GC, ARM2GC, Wang, and VISA. For each workload, ARM2GC uses the smallest evaluated Amber configuration that accommodates the program.3 MatMul8×8 and BubbleSort32 use fixed-work versions shared by all four systems, distinct from those in the main ARM2GC and function-specific comparisons. Wang uses its supported MIPS-I subset with a public step bound; VISA uses assembly programs and native fragment construction.4 Program Data denotes the program-specific representation and initialization or configuration data retained after preparation for later executions, excluding the fixed substrate shared across programs. RV2GC achieves runtime speedups of 12.6–731× over ARM2GC and 11.0–4,021× over Wang across the five workloads. RV2GC is 2.52–18.7× faster than VISA on four workloads and has comparable runtime on Hamming512. RV2GC

D. Runtime Scaling of Secret-Dependent Execution Secret-dependent branches, loop termination, and memory indices require computation under a public execution sequence. This experiment examines how RV2GC’s runtime changes as such work grows and whether its performance advantage over ARM2GC persists. We increase the problem sizes of three benchmarks to study conditional swaps, secretdependent loops, and secret-indexed reads. For BubbleSort, we increase the array length from 8 to 64, adding conditional swaps whose outcomes depend on RV2GC online time

3 Sum1024, MatMul8×8, and BubbleSort32 use the 256-byte Amber; Hamming512 and Dijkstra8 use the 2,048-byte Amber. The main comparison in Table V uses a fixed 4,096-byte configuration. 4 We add complete-output extraction to Wang and VISA and correct Wang’s store-source register-liveness mask.

ARM2GC online time

Speedup

100

100

350× 107×

10

10

1

1

0.1

0.1 8

16

24

32

48

BubbleSort: N

64

1,000

100 51.6× 24.7×

16

83.9×

100

30.9×

1

10.2×

8

10

145×

0.1 32

64

128

Comparison: W (words)

Speedup

Online Time (s)

1048×

10 8

16

32

64

96 128

PIR: B (words)

(a) Secret-Dependent Branch (b) Secret-Dependent Loop (c) Secret-Indexed Memory Fig. 7. Runtime scaling of BubbleSort, Comparison, and PIR in RV2GC and ARM2GC. Bars show online execution time; lines show ARM2GC-to-RV2GC speedups. The scale variables are public array length, loop bound, and scan size, respectively.

9

10 1 0.1 2 8 8 4 2 102 ng51 ul8× ort3 ijkstra D Sum ammi MatM ubbleS H B

VISA

ARM2GC / RV2GC

Wang / RV2GC

100,000 10,000 1,000 100 10 1

VISA / RV2GC 10,000 1,000

System / RV2GC

100

Wang

Program Data (KiB)

1,000

ARM2GC

Communication (MiB)

Online Time (s)

RV2GC

100

100 1

10

0.01

1

2 8 8 4 2 102 ng51 ul8× ort3 ijkstra D Sum ammi MatM ubbleS H B

2 8 8 4 2 102 ng51 ul8× ort3 ijkstra D Sum ammi MatM ubbleS H B

0.0001

(a) Online Time (b) Communication (c) Program Data Fig. 8. Comparison of RV2GC, ARM2GC, Wang, and VISA across five workloads. The three panels report online execution time, communication, and Program Data, with bars for absolute values and lines for system-to-RV2GC ratios.

communicates less than Wang and VISA on all five workloads, while ARM2GC communicates less on Dijkstra8. Program Data captures each architecture’s program-specific representation. Because its public schedule is program specific, RV2GC retains more than ARM2GC and VISA on all five workloads, less than Wang on four, and more than Wang on MatMul8×8. ARM2GC’s complete processor circuit is fixed across programs and therefore excluded from this metric. 2) Stateful Execution-Length Scaling: StatefulChain32 repeatedly updates two private 32-bit words within the same public loop. We vary the iteration count K ∈ {64, 256, 1024, 4096, 16384} to isolate the effect of execution length. Each iteration performs two additions and one XOR modulo 232 . Every port retains a backward loop in its binary or assembly representation rather than replicating the loop body K times. For RV2GC, preparation produces a public instruction schedule containing the operations from all K iterations. At each point, we record structural quantities, program-object sizes, and communication from one two-party execution. Table VII summarizes how resource usage changes with execution length: RV2GC grows a 4K +12-entry public schedule while peak derived state remains 1,383 bytes; ARM2GC grows processor cycles; Wang keeps generated CPU and memory structures fixed while communication grows approximately linearly; and VISA keeps its program and control-flow graph fixed while active entries and derived state grow.

TABLE VII C OMPARISON OF RV2GC, ARM2GC, WANG , AND VISA ON S TATEFUL C HAIN 32 IN TERMS OF ARCHITECTURE - SPECIFIC RESOURCE GROWTH WITH EXECUTION LENGTH .

8 6 6 4 409 Mul8× Scan6 A3-25 e t SH Ma Privat

Sum

Scaling Law

Derived State (Bytes)

Public schedule Processor cycles Communication Active entries

107K + 337 bytes 7K + 39 cycles (0.241K + 2.23) MiB 4K − 1 entries

1,383 (constant) 233 (constant) 19,536 (constant) 40K + 2,201

lookup, and hashing. We execute CBMC-GC- and Frigategenerated circuits under the same ABY/Yao backend [2] and compare them with RV2GC. Circuit or schedule size counts the program-specific complete circuit or public schedule, excluding shared structures. As shown in Figure 9, RV2GC has lower online execution time than both function-specific implementations on MatMul8×8 and SHA3-256, but higher time on Sum4096 and PrivateScan64. Both function-specific implementations communicate less in all four cases. For each workload, the smaller of the two function-specific circuit files is 8.55–449.72 times the size of the corresponding RV2GC public schedule. Fixed topology reuse removes per-program instructioncircuit synthesis; program preparation generates and stores a public schedule. VI. R ELATED W ORK Garbled processors and reusable execution structures. TinyGarble develops compact and scalable sequential garbled circuits, GarbledCPU realizes a MIPS garbled processor, and

Frigate + ABY

CBMC-GC + ABY / RV2GC

Frigate + ABY / RV2GC

10

1 Sum

10

100 10

1

1 0.1

8 6 6 4 409 Mul8× Scan6 A3-25 e t SH Ma Privat

Sum

8 6 6 4 409 Mul8× Scan6 A3-25 e t SH Ma Privat

System / RV2GC

1,000

Size (MiB)

Communication (MiB)

Online Time (ms)

100

CBMC-GC + ABY

Grows with K

RV2GC ARM2GC Wang VISA

Derived State reports the size of program-derived data structures tracked by each implementation, such as schedule-parsing buffers or active-entry lists; it does not represent total process memory.

F. Tradeoffs with Function-Specific Circuits Whole-function specialization generates a complete secure circuit for each computation, whereas RV2GC reuses a fixed instruction-circuit library across programs. The comparison covers aggregation, matrix multiplication, secret-indexed RV2GC

System

0.1

(a) Online Time (b) Communication (c) Circuit or Schedule Size Fig. 9. Comparison of RV2GC with function-specific circuits generated by CBMC-GC and Frigate across four computations. The three panels report online execution time, communication, and circuit-or-schedule size, with bars for absolute values and lines for CBMC-GC+ABY/RV2GC and Frigate+ABY/RV2GC ratios.

10

ARM2GC applies SkipGate [15]–[17]. RV2GC moves the reusable boundary from the complete processor topology used by GarbledCPU and ARM2GC to a fixed library of RISC-V instruction circuits, keeping fetch and decode outside the repeatedly traversed boundary. ARM2GC is therefore its closest architectural baseline. Secure machine code and variable ISAs. Wang et al. execute MIPS binaries with a secret program counter and oblivious instruction and data access. Their implementation uses statically generated step-indexed instruction banks and operationset-specialized CPU circuits [18]. VISA derives per-program fragment circuits and active-set-specific stacks, using Stacked Garbling for protected fragment selection and EpiGRAM for memory access [19]. RV2GC uses a fixed RISC-V instructioncircuit library with public, secret-invariant instruction and memory-access sequences. Program changes affect its public schedule and initialization data rather than circuit topology. Function-specific GC compilation. Secure-computation toolchains such as Fairplay, PCF, CBMC-GC, Frigate, and Obliv-C use languages, intermediate representations, or compiler paths to specialize secure computation to a target program or function [3], [8], [10], [12], [22]. Our evaluation compares RV2GC’s fixed ISA-level library with function-specific circuits from CBMC-GC and Frigate. Complementary memory and GC techniques. ObliVM integrates oblivious data structures and Garbled RAM targets sublinear protected memory access, whereas RV2GC uses a fixed scan within a public block [4], [9]. Hardware/software co-design, logic synthesis, specialized lookup constructions, and arithmetic garbling provide techniques complementary to RV2GC’s boundary reconstruction [6], [11], [13], [14], [21]. Within its operation-level boundary, RV2GC applies instruction-specific garbling-free optimizations where eligible.

[3] M. Franz, A. Holzer, S. Katzenbeisser, C. Schallhart, and H. Veith, “CBMC-GC: an ANSI C compiler for secure two-party computations,” in Compiler Construction - 23rd International Conference, CC 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Grenoble, France, April 5-13, 2014. Proceedings, ser. Lecture Notes in Computer Science, A. Cohen, Ed., vol. 8409. Springer, 2014, pp. 244–249. [Online]. Available: https://doi.org/10.1007/978-3-642-54807-9 15 [4] C. Gentry, S. Halevi, S. Lu, R. Ostrovsky, M. Raykova, and D. Wichs, “Garbled RAM revisited,” in Advances in Cryptology – EUROCRYPT 2014, ser. Lecture Notes in Computer Science, vol. 8441. Springer, 2014, pp. 405–422. [Online]. Available: https://doi.org/10.1007/978-3-642-55220-5 23 [5] S. Gueron, Y. Lindell, A. Nof, and B. Pinkas, “Fast garbling of circuits under standard assumptions,” in Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, Denver, CO, USA, October 12-16, 2015, I. Ray, N. Li, and C. Kruegel, Eds. ACM, 2015, pp. 567–578. [Online]. Available: https://doi.org/10.1145/2810103.2813619 [6] D. Heath, V. Kolesnikov, and L. K. L. Ng, “Garbled circuit lookup tables with logarithmic number of ciphertexts,” in Advances in Cryptology - EUROCRYPT 2024 - 43rd Annual International Conference on the Theory and Applications of Cryptographic Techniques, Zurich, Switzerland, May 26-30, 2024, Proceedings, Part V, ser. Lecture Notes in Computer Science, M. Joye and G. Leander, Eds., vol. 14655. Springer, 2024, pp. 185–215. [Online]. Available: https://doi.org/10.1007/978-3-031-58740-5 7 [7] V. Kolesnikov and T. Schneider, “Improved garbled circuit: Free XOR gates and applications,” in Automata, Languages and Programming, 35th International Colloquium, ICALP 2008, Reykjavik, Iceland, July 7-11, 2008, Proceedings, Part II - Track B: Logic, Semantics, and Theory of Programming & Track C: Security and Cryptography Foundations, ser. Lecture Notes in Computer Science, L. Aceto, I. Damgård, L. A. Goldberg, M. M. Halldórsson, A. Ingólfsdóttir, and I. Walukiewicz, Eds., vol. 5126. Springer, 2008, pp. 486–498. [Online]. Available: https://doi.org/10.1007/978-3-540-70583-3 40 [8] B. Kreuter, A. Shelat, B. Mood, and K. R. B. Butler, “PCF: A portable circuit format for scalable two-party secure computation,” in Proceedings of the 22th USENIX Security Symposium, Washington, DC, USA, August 14-16, 2013, S. T. King, Ed. USENIX Association, 2013, pp. 321–336. [Online]. Available: https://www.usenix.org/conference/ usenixsecurity13/technical-sessions/paper/kreuter [9] C. Liu, X. S. Wang, K. Nayak, Y. Huang, and E. Shi, “ObliVM: A programming framework for secure computation,” in 2015 IEEE Symposium on Security and Privacy. IEEE, 2015, pp. 359–376. [Online]. Available: https://doi.org/10.1109/SP.2015.29 [10] D. Malkhi, N. Nisan, B. Pinkas, and Y. Sella, “Fairplay - secure two-party computation system,” in Proceedings of the 13th USENIX Security Symposium, August 9-13, 2004, San Diego, CA, USA, M. Blaze, Ed. USENIX, 2004, pp. 287–302. [Online]. Available: http://www. usenix.org/publications/library/proceedings/sec04/tech/malkhi.html [11] J. Mo, J. Gopinath, and B. Reagen, “HAAC: A hardware-software co-design to accelerate garbled circuits,” in Proceedings of the 50th Annual International Symposium on Computer Architecture, ISCA 2023, Orlando, FL, USA, June 17-21, 2023, Y. Solihin and M. A. Heinrich, Eds. ACM, 2023, pp. 10:1–10:13. [Online]. Available: https://doi.org/10.1145/3579371.3589045 [12] B. Mood, D. Gupta, H. Carter, K. R. B. Butler, and P. Traynor, “Frigate: A validated, extensible, and efficient compiler and interpreter for secure computation,” in IEEE European Symposium on Security and Privacy, EuroS&P 2016, Saarbrücken, Germany, March 2124, 2016. IEEE, 2016, pp. 112–127. [Online]. Available: https: //doi.org/10.1109/EuroSP.2016.20 [13] E. Pohle, A. Abidin, and B. Preneel, “Fast evaluation of s-boxes with garbled circuits,” IEEE Trans. Inf. Forensics Secur., vol. 19, pp. 5530–5544, 2024. [Online]. Available: https://doi.org/10.1109/TIFS. 2024.3402145 [14] J. Sander, S. Berndt, I. Bruhns, and T. Eisenbarth, “Dash: Accelerating distributed private convolutional neural network inference with arithmetic garbled circuits,” IACR Trans. Cryptogr. Hardw. Embed. Syst., vol. 2025, no. 1, pp. 420–449, 2025. [Online]. Available: https://doi.org/10.46586/tches.v2025.i1.420-449 [15] E. M. Songhori, S. U. Hussain, A. Sadeghi, T. Schneider, and F. Koushanfar, “TinyGarble: Highly compressed and scalable sequential garbled circuits,” in 2015 IEEE Symposium on Security and

VII. C ONCLUSION RV2GC reconstructs the garbling boundary around reusable RISC-V instruction circuits, connects independently invoked instruction circuits and garbling-free paths through persistent label state, and uses protected commits to let secret-dependent choices govern state updates. These mechanisms enable stateful execution without repeated complete-processor traversal. RV2GC is faster than ARM2GC across the evaluated benchmarks. Its public schedules occupy program-specific storage, secret-indexed accesses require fixed scans, and communication exceeds that of the evaluated function-specific circuits. R EFERENCES [1] L.-A. Daniel, S. Bardin, and T. Rezk, “Binsec/Rel: Symbolic binary analyzer for security with applications to constant-time and secreterasure,” ACM Transactions on Privacy and Security, vol. 26, no. 2, 2023. [Online]. Available: https://doi.org/10.1145/3563037 [2] D. Demmler, T. Schneider, and M. Zohner, “ABY— a framework for efficient mixed-protocol secure two-party computation,” in 22nd Annual Network and Distributed System Security Symposium, NDSS 2015. The Internet Society, 2015. [Online]. Available: https://www.ndss-symposium.org/ndss2015/aby--framework-efficient-mixed-protocol-secure-two-party-computation/

11

Privacy, SP 2015, San Jose, CA, USA, May 17-21, 2015. IEEE Computer Society, 2015, pp. 411–428. [Online]. Available: https: //doi.org/10.1109/SP.2015.32 [16] E. M. Songhori, M. S. Riazi, S. U. Hussain, A. Sadeghi, and F. Koushanfar, “ARM2GC: succinct garbled processor for secure computation,” in Proceedings of the 56th Annual Design Automation Conference 2019, DAC 2019, Las Vegas, NV, USA, June 02-06, 2019. ACM, 2019, p. 112. [Online]. Available: https://doi.org/10.1145/3316781.3317777 [17] E. M. Songhori, S. Zeitouni, G. Dessouky, T. Schneider, A.-R. Sadeghi, and F. Koushanfar, “GarbledCPU: a MIPS processor for secure computation in hardware,” in Proceedings of the 53rd Annual Design Automation Conference, 2016, pp. 1–6. [18] X. S. Wang, S. D. Gordon, A. McIntosh, and J. Katz, “Secure computation of MIPS machine code,” in Computer Security – ESORICS 2016 – 21st European Symposium on Research in Computer Security, Heraklion, Greece, September 26–30, 2016, Proceedings, Part II, ser. Lecture Notes in Computer Science, vol. 9879. Springer, 2016, pp. 99– 117. [Online]. Available: https://doi.org/10.1007/978-3-319-45741-3 6 [19] Y. Yang, S. Peceny, D. Heath, and V. Kolesnikov, “Towards generic MPC compilers via variable instruction set architectures (VISAs),” in Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, CCS 2023, Copenhagen, Denmark,

November 26–30, 2023. ACM, 2023, pp. 2516–2530. [Online]. Available: https://doi.org/10.1145/3576915.3616664 [20] A. C. Yao, “How to generate and exchange secrets (extended abstract),” in 27th Annual Symposium on Foundations of Computer Science, Toronto, Canada, 27-29 October 1986. IEEE Computer Society, 1986, pp. 162–167. [Online]. Available: https://doi.org/10.1109/SFCS.1986.25 [21] M. Yu and G. D. Micheli, “Striving for both quality and speed: Logic synthesis for practical garbled circuits,” in IEEE/ACM International Conference on Computer Aided Design, ICCAD 2023, San Francisco, CA, USA, October 28 - Nov. 2, 2023. IEEE, 2023, pp. 1–9. [Online]. Available: https://doi.org/10.1109/ICCAD57390.2023.10323660 [22] S. Zahur and D. Evans, “Obliv-C: A language for extensible data-oblivious computation,” IACR Cryptology ePrint Archive, Report 2015/1153, 2015. [Online]. Available: https://eprint.iacr.org/2015/1153 [23] S. Zahur, M. Rosulek, and D. Evans, “Two halves make a whole reducing data transfer in garbled circuits using half gates,” in Advances in Cryptology - EUROCRYPT 2015 - 34th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Sofia, Bulgaria, April 26-30, 2015, Proceedings, Part II, ser. Lecture Notes in Computer Science, E. Oswald and M. Fischlin, Eds., vol. 9057. Springer, 2015, pp. 220–250. [Online]. Available: https://doi.org/10.1007/978-3-662-46803-6 8

12

Related documents

Record · ID 1482904 · SHA-256 0bf2733d07ab1087
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive