A suite of Rust libraries for secure multi-party computation.
See the codeswanky: A suite of rust libraries for secure computationswanky provides a suite of rust libraries for doing secure computation.
These libraries are broken into two categories: core and edge.
Core crates are maintained, documented, and tested. If you want to build off a stable foundation of Swanky, then consider building off the core crates. Note that, even the core crates are still research software that shouldn't be deployed to production or trusted with sensitive data. (See "A note on security" below.)
Edge crates may have less extensive testing and documentation than the core crates, and have a lesser stability guarantee.
swanky-adversary: Traits describing MPC adversaries.swanky-channel: A channel abstraction to let users avoid manual flushingswanky-error: A common error type for Swanky.swanky-party: Support for types indexed by a party.swanky-rng: Pseudorandom number generators for use in Swanky.swanky-serialization: Traits and utilities for compact serialization into a canonical byte representationvectoreyes: Cross-platform SIMD types and functionsdiet-mac-and-cheese: A diet version of the Mac'n'Cheese protocolfancy-analyzer: Circuit analyzer for Fancy circuitsfancy-circuits: Circuits implementing the Fancy APIfancy-garbling: A library for boolean and arithmetic garblingfancy-plaintext: Plaintext evaluator for Fancy circuitsfancy-traits: Traits for writing circuitshumidor: A test-bed for Ligero-like protocolsinferno: An implementation of the Limbo zero knowledge proof protocolkeyed_arena: Bump allocator which allows for random access to its allocationsmac-n-cheese-compiler: A tool to compile a zero knowledge circuit to the mac n'cheese IRmac-n-cheese-event-log: Utilities to define metrics for mac n'cheesemac-n-cheese-inspector: A tool to inspect mac n'cheese IR filesmac-n-cheese-ir: The definition of the mac n'cheese IRmac-n-cheese-runner: A tool to proof mac n'cheese IR files in zero-knowledgemac-n-cheese-vole: An implementation of Vector Oblivious Linear Evaluationmac-n-cheese-wire-map: An implementation of a sparse arraypopsicle: A library for private set intersectionschmivitz: A library for zero-knowledge protocols using VOLE-in-the-headsimple-arith-circuit: Simple arithmetic circuit libraryswanky-authenticated-bits: Authenticated bits, shares, and AND triplesswanky-authenticated-garbling: Authenticated malicious garbling in the presence of a malicious garbler and evaluatorswanky-bit-matrix-transpose: Transpose a bit matrixswanky-block: 128-, 256-, and 512-bit data blocks.swanky-channel-legacy: A (legacy) channel abstraction; use swanky-channel for new code!swanky-cointoss: A simple coin-tossing protocol.swanky-cr-hash: Correlation-robust hashing.swanky-f-eq: Two-party functionality for checking equality of inputs in an oblivious manner.swanky-f-rand: Two-party functionality for generating unbiased random values.swanky-field: Definitions of the core FiniteField and FiniteRing traitsswanky-field-binary: Binary finite (extension) fieldsswanky-field-f61p: An implementation of GF(2^61-1)swanky-field-ff-primes: Finite field implementations for large prime fieldsswanky-field-fft: FFT implementations for finite fieldsswanky-field-test: Utilitites for testing correctness of finite field implementationsswanky-flatbuffer-build: Tooling to automate compiling flatbuffer schemasswanky-garbled-nn: Garbled neural networks using fancy-garblingswanky-malicious-hooks: Hooks for testing malicious behavior in various cryptographic protocols.swanky-oprf-kkrt: An implementation of the kkrt OPRF protocolswanky-oprf-kmprt: An implementation of the KMPRT OPRF protocolswanky-oprf-traits: Base traits impl-ed by all our OPRF implementationsswanky-ot-alsz-kos: Oblivious transfer implementations for the ALSZ and KOS protocolsswanky-ot-chou-orlandi: An implementation of the Chou-Orlandi OT protocolswanky-ot-dummy: Implementation of an insecure OT protocol for testing purposesswanky-ot-noar-pinkas: An implementation of the Noar-Pinkas OT protocolswanky-ot-test: Testing utilities for oblivious transfer protocolsswanky-ot-traits: Base traits for Obliivious Transfer protocolsswanky-polynomial: Support for various representations of polynomials over finite fieldsswanky-sieve-ir-api: A library providing a Rust API for defining zero-knowledge circuits.swanky-sieve-ir-codegen: A library providing macros to statically parse SIEVE IR zero-knowledge circuits.swanky-sieve-ir-parser: A parser for SIEVE IR (a zero knowledge proof circuit format)swanky-svole-wykw: An implementation of the WYKW svole protocolswanky-twopac: Two-party secure computation using garbled circuits.web-mac-n-cheese-wasm: Web Mac'n'Cheese, the wasm partweb-mac-n-cheese-websocket: Web Mac'n'Cheese, the websocket partzkv: Zero knowledge proofs for verilog files generated using saw / abc2024-02-09 Projection gates in arithmetic garbled circuits have a proven security vulnerability in their design.
As of 2026-09-15 projection gates have been removed from fancy-garbling.
swanky is currently research software. Do not deploy it in production, or trust
it with sensitive data.
Please reach out to us at swanky@galois.com if you're interested in using Swanky in a production setting.
swankyThe preferred way to use swanky is to fork this monorepo, and add your code
to your fork. This approach makes it easy for your code to inherit the
configuration of the swanky repo.
It is also possible to use swanky as traditional Rust crates. The downside of
this approach is that you won't automatically get the configuration of the
swanky repo. swanky is only tested against the pinned rust version in the
repository and the pinned dependency versions.
To use a swanky crate in your project, add the following line to the
[dependencies] entry in Cargo.toml:
<crate-name> = { git = "https://github.com/GaloisInc/swanky", rev = "xxxxxx" }
where <crate-name> is one of the crates listed above and rev is the
particular revision to use.
Note: As swanky is currently considered prototype software, it is best to pin
a particular revision of swanky, as there is no guarantee that future versions
of swanky will maintain backwards compatibility.
It is also advisable to copy over swanky's .cargo/config file, and to enable
LTO in your release builds (lto = true in your Cargo.toml file).
To compile Swanky, you should install and use Rust via rustup. The swanky repo will direct rustup to use the correct version of Rust.
The ./swanky tool automates some tasks in the codebase. For example, ./swanky lint will run the Swanky linting checks. In order to use this tool, you need to install the Nix package manager. You'll also need a python3 installation (no packages other than the standard library are required).
swankyIf you use swanky in your academic paper, please cite it as follows:
@misc{swanky,
author = {{Galois, Inc.}},
title = {{swanky}: A suite of rust libraries for secure computation},
howpublished = {\url{https://github.com/GaloisInc/swanky}},
year = 2019,
}
MIT License
You can contact the swanky team at swanky@galois.com.
This material is based upon work supported in part by ARO, SSC Pacific, IARPA and DARPA under Contract Nos. W911NF-15-C-0227, N66001-15-C-4070, 2019-1902070006, and HR001120C0085.
Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the ARO, SSC Pacific, IARPA and DARPA. Distribution Statement ``A'' (Approved for Public Release, Distribution Unlimited).
Copyright © 2019-2026 Galois, Inc.
Sieve
69.2%
Rust
29.3%
A suite of Rust libraries for secure multi-party computation.
See the codeswanky: A suite of rust libraries for secure computationswanky provides a suite of rust libraries for doing secure computation.
These libraries are broken into two categories: core and edge.
Core crates are maintained, documented, and tested. If you want to build off a stable foundation of Swanky, then consider building off the core crates. Note that, even the core crates are still research software that shouldn't be deployed to production or trusted with sensitive data. (See "A note on security" below.)
Edge crates may have less extensive testing and documentation than the core crates, and have a lesser stability guarantee.
swanky-adversary: Traits describing MPC adversaries.swanky-channel: A channel abstraction to let users avoid manual flushingswanky-error: A common error type for Swanky.swanky-party: Support for types indexed by a party.swanky-rng: Pseudorandom number generators for use in Swanky.swanky-serialization: Traits and utilities for compact serialization into a canonical byte representationvectoreyes: Cross-platform SIMD types and functionsdiet-mac-and-cheese: A diet version of the Mac'n'Cheese protocolfancy-analyzer: Circuit analyzer for Fancy circuitsfancy-circuits: Circuits implementing the Fancy APIfancy-garbling: A library for boolean and arithmetic garblingfancy-plaintext: Plaintext evaluator for Fancy circuitsfancy-traits: Traits for writing circuitshumidor: A test-bed for Ligero-like protocolsinferno: An implementation of the Limbo zero knowledge proof protocolkeyed_arena: Bump allocator which allows for random access to its allocationsmac-n-cheese-compiler: A tool to compile a zero knowledge circuit to the mac n'cheese IRmac-n-cheese-event-log: Utilities to define metrics for mac n'cheesemac-n-cheese-inspector: A tool to inspect mac n'cheese IR filesmac-n-cheese-ir: The definition of the mac n'cheese IRmac-n-cheese-runner: A tool to proof mac n'cheese IR files in zero-knowledgemac-n-cheese-vole: An implementation of Vector Oblivious Linear Evaluationmac-n-cheese-wire-map: An implementation of a sparse arraypopsicle: A library for private set intersectionschmivitz: A library for zero-knowledge protocols using VOLE-in-the-headsimple-arith-circuit: Simple arithmetic circuit libraryswanky-authenticated-bits: Authenticated bits, shares, and AND triplesswanky-authenticated-garbling: Authenticated malicious garbling in the presence of a malicious garbler and evaluatorswanky-bit-matrix-transpose: Transpose a bit matrixswanky-block: 128-, 256-, and 512-bit data blocks.swanky-channel-legacy: A (legacy) channel abstraction; use swanky-channel for new code!swanky-cointoss: A simple coin-tossing protocol.swanky-cr-hash: Correlation-robust hashing.swanky-f-eq: Two-party functionality for checking equality of inputs in an oblivious manner.swanky-f-rand: Two-party functionality for generating unbiased random values.swanky-field: Definitions of the core FiniteField and FiniteRing traitsswanky-field-binary: Binary finite (extension) fieldsswanky-field-f61p: An implementation of GF(2^61-1)swanky-field-ff-primes: Finite field implementations for large prime fieldsswanky-field-fft: FFT implementations for finite fieldsswanky-field-test: Utilitites for testing correctness of finite field implementationsswanky-flatbuffer-build: Tooling to automate compiling flatbuffer schemasswanky-garbled-nn: Garbled neural networks using fancy-garblingswanky-malicious-hooks: Hooks for testing malicious behavior in various cryptographic protocols.swanky-oprf-kkrt: An implementation of the kkrt OPRF protocolswanky-oprf-kmprt: An implementation of the KMPRT OPRF protocolswanky-oprf-traits: Base traits impl-ed by all our OPRF implementationsswanky-ot-alsz-kos: Oblivious transfer implementations for the ALSZ and KOS protocolsswanky-ot-chou-orlandi: An implementation of the Chou-Orlandi OT protocolswanky-ot-dummy: Implementation of an insecure OT protocol for testing purposesswanky-ot-noar-pinkas: An implementation of the Noar-Pinkas OT protocolswanky-ot-test: Testing utilities for oblivious transfer protocolsswanky-ot-traits: Base traits for Obliivious Transfer protocolsswanky-polynomial: Support for various representations of polynomials over finite fieldsswanky-sieve-ir-api: A library providing a Rust API for defining zero-knowledge circuits.swanky-sieve-ir-codegen: A library providing macros to statically parse SIEVE IR zero-knowledge circuits.swanky-sieve-ir-parser: A parser for SIEVE IR (a zero knowledge proof circuit format)swanky-svole-wykw: An implementation of the WYKW svole protocolswanky-twopac: Two-party secure computation using garbled circuits.web-mac-n-cheese-wasm: Web Mac'n'Cheese, the wasm partweb-mac-n-cheese-websocket: Web Mac'n'Cheese, the websocket partzkv: Zero knowledge proofs for verilog files generated using saw / abc2024-02-09 Projection gates in arithmetic garbled circuits have a proven security vulnerability in their design.
As of 2026-09-15 projection gates have been removed from fancy-garbling.
swanky is currently research software. Do not deploy it in production, or trust
it with sensitive data.
Please reach out to us at swanky@galois.com if you're interested in using Swanky in a production setting.
swankyThe preferred way to use swanky is to fork this monorepo, and add your code
to your fork. This approach makes it easy for your code to inherit the
configuration of the swanky repo.
It is also possible to use swanky as traditional Rust crates. The downside of
this approach is that you won't automatically get the configuration of the
swanky repo. swanky is only tested against the pinned rust version in the
repository and the pinned dependency versions.
To use a swanky crate in your project, add the following line to the
[dependencies] entry in Cargo.toml:
<crate-name> = { git = "https://github.com/GaloisInc/swanky", rev = "xxxxxx" }
where <crate-name> is one of the crates listed above and rev is the
particular revision to use.
Note: As swanky is currently considered prototype software, it is best to pin
a particular revision of swanky, as there is no guarantee that future versions
of swanky will maintain backwards compatibility.
It is also advisable to copy over swanky's .cargo/config file, and to enable
LTO in your release builds (lto = true in your Cargo.toml file).
To compile Swanky, you should install and use Rust via rustup. The swanky repo will direct rustup to use the correct version of Rust.
The ./swanky tool automates some tasks in the codebase. For example, ./swanky lint will run the Swanky linting checks. In order to use this tool, you need to install the Nix package manager. You'll also need a python3 installation (no packages other than the standard library are required).
swankyIf you use swanky in your academic paper, please cite it as follows:
@misc{swanky,
author = {{Galois, Inc.}},
title = {{swanky}: A suite of rust libraries for secure computation},
howpublished = {\url{https://github.com/GaloisInc/swanky}},
year = 2019,
}
MIT License
You can contact the swanky team at swanky@galois.com.
This material is based upon work supported in part by ARO, SSC Pacific, IARPA and DARPA under Contract Nos. W911NF-15-C-0227, N66001-15-C-4070, 2019-1902070006, and HR001120C0085.
Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the ARO, SSC Pacific, IARPA and DARPA. Distribution Statement ``A'' (Approved for Public Release, Distribution Unlimited).
Copyright © 2019-2026 Galois, Inc.
Sieve
69.2%
Rust
29.3%