INNER CODE UNIT · Rust

array_split_120

IronCoreLabs/recrypt-rs · src/internal/mod.rs:444

pub fn array_split_120<T: Copy + Zero>(array: &[T; 120]) -> ([T; 60], [T; 60]) {
    let mut one = [T::zero(); 60];
    let mut two = [T::zero(); 60];
    one.copy_from_slice(&array[0..60]);
    two.copy_from_slice(&array[60..120]);
    (one, two)
}
/// Generate one of the rth roots of unity (an element of G_T) given an FP12Elem.
/// Useful for calling `encrypt`
pub fn gen_rth_root<T>(pairing: &Pairing<T>, fp12_elem: Fp12Elem<T>) -> Fp12Elem<T>
where
    T: ExtensionField + PairingConfig,
{
    pairing.final_exp(fp12_elem)
}

///Generate a public key using the private key and generator point.
pub fn public_keygen<T>(private_key: PrivateKey<T>, generator: HomogeneousPoint<T>) -> PublicKey<T>

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…