| Crates.io | arcis |
| lib.rs | arcis |
| version | 0.6.4 |
| created_at | 2025-04-30 19:11:14.563942+00 |
| updated_at | 2026-01-20 22:55:28.059163+00 |
| description | A standard library of types and functions for writing MPC circuits with the Arcis framework. |
| homepage | https://www.arcium.com |
| repository | |
| max_upload_size | |
| id | 1655356 |
| size | 149,714 |
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.
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)
}
}
Enc<C, T> - Generic encoded data wrapper. C can be Shared or Mxe, T can be any supported type.Shared - Shared secret cipher implementationArcisX25519Pubkey - A X25519 Pubkey used to encode and decode messagesMxe - MXE (Multi-party eXchange Encryption) cipherPack<T> - Used to pack data so they take less spaceArcisRNG - Random number generator#[encrypted] and #[instruction]