# arcis

[![Crates.io](https://img.shields.io/crates/v/arcis.svg)](https://crates.io/crates/arcis)

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

```rust
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]`
