arcis 0.10.3

A standard library of types and functions for writing MPC circuits with the Arcis framework.
Documentation

Crates.io Docs.rs

Developer Docs

When To Use

  • Writing #[encrypted] modules and #[instruction] circuit entrypoints
  • Working with encrypted values such as Enc<Shared, T> and Enc<Mxe, T>
  • Building Arcis circuits that will be compiled with arcium build

For Solana program integration, use arcium-anchor.

Installation

[dependencies]
arcis = "0.10.3"

Quick Start

use arcis::*;

#[encrypted]
mod circuits {
    use arcis::*;

    pub struct InputValues {
        v1: u8,
        v2: u8,
    }

    #[instruction]
    pub fn add_together(input: Enc<Shared, InputValues>) -> Enc<Shared, u16> {
        let values = input.to_arcis();
        input.owner.from_arcis(values.v1 as u16 + values.v2 as u16)
    }
}

Key Types

Item Description
Enc<C, T> Encrypted wrapper for circuit inputs and outputs.
Shared Secret-shared cipher for MPC execution across nodes.
Mxe Cipher scoped to a specific MXE.
Pack<T> Packing helper for reducing footprint of structured values.
ArcisRNG Circuit-friendly random number generator.
Reveal Trait used to explicitly reveal data when the compiler allows it.

Common Pitfalls

  • reveal() cannot be used in runtime-dependent conditional branches.
  • arcis-imports is deprecated; use arcis directly for new projects.
  • Circuit code looks like Rust, but secret-dependent control flow is still compiled under MPC constraints.

See Also