Skip to main content

SgxRsaPubOps

Trait SgxRsaPubOps 

Source
pub trait SgxRsaPubOps {
    type Error: Error;

    // Required method
    fn calculate_q1_q2(
        &self,
        s: &[u8],
    ) -> Result<(Vec<u8>, Vec<u8>), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn calculate_q1_q2(&self, s: &[u8]) -> Result<(Vec<u8>, Vec<u8>), Self::Error>

Given a signature, compute

  • q1 = s^2 / n
  • q2 = (s^3 - q1*s*n) / n where / is integer division.

Returns (q1, q2) in little-endian format.

§Panics

May panic if the input length is not 32, or if the key does not contain the private component.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§