pub unsafe extern "C" fn ocrypto_rsa2048_oaep_sha256_crt_decrypt(
    m: *mut u8,
    mlen: usize,
    c: *const u8,
    label: *const u8,
    llen: usize,
    sk: *const ocrypto_rsa2048_crt_key
) -> c_int
Expand description

2048-bit RSA OAEP SHA256 decryption with CRT acceleration.

The ciphertext * c - is decrypted to the message returned in * m - .

  • m - The decrypted message. The buffer must be long enough to hold the message.
  • mlen - Length of * m - .
  • c - The 256-byte ciphertext to decrypt.
  • label - The label associated with the message.
  • llen - Length of * label - . May be 0.
  • sk - A valid 2048-bit RSA secret key with CRT coefficients.

Returns -1 If decryption failed. Returns -2 If the output buffer is too short (mlen < length of message). Returns n If a message of length n was successfully decrypted.

@remark The key * sk - should be initialized with * ocrypto_rsa2048_init_crt_key - . @remark * m - may be same as * c - .