// ---
// tags: genies, source
// crystal-type: source
// crystal-domain: comp
// ---
//! Serialization for genies types.
//!
//! - Fq: 64 bytes, little-endian limbs, each limb in LE byte order.
//! - MontCurve: 64 bytes (the A coefficient as an Fq element).
//! - Ideal: 74 bytes, each exponent shifted by MAX_EXPONENT to make unsigned.
use crate;
use crateMontCurve;
use crate;
/// Encode an Fq element as 64 bytes (little-endian).
/// Decode an Fq element from 64 bytes (little-endian).
/// Returns None if the value is >= q (non-canonical).
/// Encode a MontCurve as 64 bytes (the A coefficient).
/// Decode a MontCurve from 64 bytes.
/// Encode an Ideal as 74 bytes.
/// Each exponent e_i in [-m, m] is stored as (e_i + m) as an unsigned byte.
/// Decode an Ideal from 74 bytes.
/// Returns None if any byte exceeds 2*MAX_EXPONENT.
genies/rs/src/encoding.rs
ฯ 0.0%