pub unsafe extern "C" fn ocrypto_rsa1024_oaep_sha256_decrypt(
    m: *mut u8,
    m_len: usize,
    c: *const u8,
    label: *const u8,
    l_len: usize,
    sk: *const ocrypto_rsa1024_key
) -> c_int
Expand description

1024 bit RSA OAEP SHA256 decryption.

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.
  • m_len - Length of * m - .
  • c - The 128 byte ciphertext to decrypt.
  • label - The label associated with the message.
  • l_len - Length of * label - . May be 0.
  • sk - A valid 1024 bit RSA secret key.

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

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