arcium-core-utils 0.4.5

Arcium core utils
Documentation
use primitives::algebra::{
    elliptic_curve::{BaseFieldElement, Point, Scalar},
    field::{subfield_element::Mersenne107Element, Bit},
};
use serde::Deserialize;

/// Enum representing a plaintext value. Can either be a fixed value provided with a circuit, or a
/// public input provided at runtime. The usize is the size of the batch.
#[derive(Deserialize)]
#[repr(C)]
pub enum Plaintext<T> {
    Fixed(T),
    Input(usize),
}

pub type ScalarPlaintext<C> = Plaintext<Scalar<C>>;
pub type BaseFieldPlaintext<C> = Plaintext<BaseFieldElement<C>>;
pub type Mersenne107Plaintext = Plaintext<Mersenne107Element>;
pub type PointPlaintext<C> = Plaintext<Point<C>>;
pub type BitPlaintext = Plaintext<Bit>;

pub type ScalarPlaintextBatch<C> = Plaintext<Vec<Scalar<C>>>;
pub type BaseFieldPlaintextBatch<C> = Plaintext<Vec<BaseFieldElement<C>>>;
pub type Mersenne107PlaintextBatch = Plaintext<Vec<Mersenne107Element>>;
pub type PointPlaintextBatch<C> = Plaintext<Vec<Point<C>>>;
pub type BitPlaintextBatch = Plaintext<Vec<Bit>>;