[−][src]Function sgx_tcrypto::rsgx_rsa3072_sign_msg
pub fn rsgx_rsa3072_sign_msg<T>(
data: &T,
key: &sgx_rsa3072_key_t
) -> SgxResult<sgx_rsa3072_signature_t> where
T: Copy + ContiguousMemory,
The rsgx_rsa3072_sign_msg computes a digital signature for a given dataset based on RSA 3072 private key.
Description
This function computes a digital signature over the input dataset based on the RSA 3072 private key.
A message digest is a fixed size number derived from the original message with an applied hash function over the binary code of the message. (SHA256 in this case)
The signer's private key and the message digest are used to create a signature.
The scheme used for computing a digital signature is of the RSASSA-PKCS1-v1_5 scheme.
Parameters
data
A pointer to the data to calculate the signature over.
key
A pointer to the RSA key.
Requirements
Library: libsgx_tcrypto.a
Return value
The signature generated by this function.
Errors
SGX_ERROR_INVALID_PARAMETER
The RSA key, data is NULL. Or the data size is 0.
SGX_ERROR_OUT_OF_MEMORY
Not enough memory is available to complete this operation.
SGX_ERROR_UNEXPECTED
The signature generation process failed due to an internal cryptography library failure.