convert_raw_to_der_single_int() function
Convert a single raw coordinate to DER ASN.1 format. The output der buffer is filled backward (i.e. starting from its end). \warning Raw and der buffer must not be overlapping.
Arguments
raw_buf
Buffer containing the raw coordinate to be converted.
raw_len
Length of raw_buf in bytes. This must be > 0.
der_buf_start
Pointer to the beginning of the buffer which will be filled with the DER converted data.
der_buf_end
End of the buffer used to store the DER output.
Return value
On success, the amount of data (in bytes) written to the DER buffer. MBEDTLS_ERR_ASN1_BUF_TOO_SMALL if the provided der buffer is too small to contain all the converted data. MBEDTLS_ERR_ASN1_INVALID_DATA if the input raw coordinate is null (i.e. all zeros).