Skip to content

Turing-Incomplete Programming Language for Multi-Party Computation with Garbled Circuits

License

Notifications You must be signed in to change notification settings

sine-fdn/garble-lang

Folders and files

NameName
Last commit message
Last commit date
Mar 19, 2025
Mar 11, 2025
Dec 2, 2024
Mar 19, 2025
Mar 19, 2025
Aug 12, 2024
Mar 19, 2025
Mar 19, 2025
Jun 29, 2022
Dec 2, 2024

Repository files navigation

The Garble Programming Language

Garble is a simple programming language for Multi-Party Computation. Garble programs are compiled to Boolean circuits and always terminate, making them ideal for Garbled Circuits. Garble is statically typed, low-level, purely functional and uses a Rust-like syntax. Garble is much simpler than Rust though, making it easy to learn and simple to integrate into MPC engines.

// A program for solving Yao's Millionaires' problem in Garble:

enum Richest {
    IsA,
    IsB,
    Tie,
}

pub fn main(a: u64, b: u64) -> Richest {
    if a > b {
        Richest::IsA
    } else if b > a {
        Richest::IsB
    } else {
        Richest::Tie
    }
}

To learn more about Garble, check out the website.