INNER CODE UNIT · Rust

from

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

    fn from(api_pk: api::PrivateKey) -> Self {
        PrivateKey {
            value: Fp256::from(api_pk.to_bytes_32()).to_monty(),
        }
    }
}

impl<'a> From<&'a api::PrivateKey> for PrivateKey<fp_256::Monty> {
    fn from(api_pk: &'a api::PrivateKey) -> Self {
        PrivateKey {
            value: Fp256::from(api_pk.to_bytes_32()).to_monty(),
        }
    }
}

impl PrivateKey<fp_256::Monty> {
    pub fn from_fp256(fp256: fp_256::Monty) -> PrivateKey<fp_256::Monty> {
        PrivateKey { value: fp256 }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…