arcis

Crates.ioarcis
lib.rsarcis
version0.6.4
created_at2025-04-30 19:11:14.563942+00
updated_at2026-01-20 22:55:28.059163+00
descriptionA standard library of types and functions for writing MPC circuits with the Arcis framework.
homepagehttps://www.arcium.com
repository
max_upload_size
id1655356
size149,714
Daniel (danielementary)

documentation

README

arcis

Crates.io

A standard library of types and functions for writing MPC circuits with the Arcis framework. This crate provides the essential building blocks for developing encrypted computations, including type definitions, cryptographic primitives, and utility functions commonly needed in MPC circuit development.

Usage

use arcis::*;

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

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

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

Main Exports

Types

  • Enc<C, T> - Generic encoded data wrapper. C can be Shared or Mxe, T can be any supported type.
  • Shared - Shared secret cipher implementation
  • ArcisX25519Pubkey - A X25519 Pubkey used to encode and decode messages
  • Mxe - MXE (Multi-party eXchange Encryption) cipher
  • Pack<T> - Used to pack data so they take less space
  • ArcisRNG - Random number generator

Re-exports

  • All arcis standard library functions and types
  • Procedural macros #[encrypted] and #[instruction]
Commit count: 0

cargo fmt