pub unsafe extern "C" fn ocrypto_rsa_crt_exp(
    m: *mut u8,
    m_len: usize,
    c: *const u8,
    c_len: usize,
    key: *const ocrypto_rsa_crt_key,
    mem: *mut u32
) -> c_int
Expand description

RSA CRT key exponentiation. m = (c^dp mod p - c^dq mod q) * qinv mod p * q + c^dq mod q

  • m - The generated message.
  • m_len - Length of * m - .
  • c - The ciphertext to be decrypted.
  • c_len - Length of * c - .
  • key - A valid RSA secret key with CRT coefficients.
  • mem - The working memory. Length OCRYPTO_RSA_CRT_MEM_SIZE(bits).

Returns -1 If the input is too large (c >= n). Returns 0 On success.

@remark The key * key - should be initialized with * ocrypto_rsa_init_crt_key - . @remark * c - , * m - , and * mem - may be same.