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§
Sourcefn calculate_q1_q2(&self, s: &[u8]) -> Result<(Vec<u8>, Vec<u8>), Self::Error>
fn calculate_q1_q2(&self, s: &[u8]) -> Result<(Vec<u8>, Vec<u8>), Self::Error>
Given a signature, compute
q1 = s^2 / nq2 = (s^3 - q1*s*n) / nwhere/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".