pub trait SgxRsaOps {
type Error: Error;
// Required methods
fn len(&self) -> usize;
fn sign_sha256_pkcs1v1_5_with_q1_q2<H: AsRef<[u8]>>(
&self,
hash: H,
) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>), Self::Error>;
fn verify_sha256_pkcs1v1_5<S: AsRef<[u8]>, H: AsRef<[u8]>>(
&self,
sig: S,
hash: H,
) -> Result<(), Self::Error>;
fn e(&self) -> Vec<u8> ⓘ;
fn n(&self) -> Vec<u8> ⓘ;
}Required Associated Types§
Required Methods§
Sourcefn sign_sha256_pkcs1v1_5_with_q1_q2<H: AsRef<[u8]>>(
&self,
hash: H,
) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>), Self::Error>
fn sign_sha256_pkcs1v1_5_with_q1_q2<H: AsRef<[u8]>>( &self, hash: H, ) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>), Self::Error>
Generate an RSASSA-PKCS1-v1_5 signature over a SHA256 hash. Also compute
q1 = s^2 / nq2 = (s^3 - q1*s*n) / nwhere/is integer division.
Returns (s, 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 not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".