[−][src]Function sgx_tcrypto::rsgx_rsa3072_verify_msg
pub fn rsgx_rsa3072_verify_msg<T>(
data: &T,
public: &sgx_rsa3072_public_key_t,
signature: &sgx_rsa3072_signature_t
) -> SgxResult<bool> where
T: Copy + ContiguousMemory,
rsgx_rsa3072_verify_msg verifies the input digital signature for the given data- set based on the RSA 3072 public key.
Description
This function verifies the signature for the given data set based on the input RSA 3072 public key.
A digital signature over a message is a buffer of 384-bytes, which could be created by function: rsgx_rsa3072_sign. The scheme used for computing a digital signature is of the RSASSA-PKCS1-v1_5 scheme.
Parameters
data
A pointer to the signed dataset to be verified.
public
A pointer to the public key to be used in the calculation of the signature.
signature
A pointer to the signature to be verified.
Requirements
Library: libsgx_tcrypto.a
Return value
true
Digital signature is valid.
false
Digital signature is not valid.
Errors
SGX_ERROR_INVALID_PARAMETER
The private 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 verification process failed due to an internal cryptography library failure.