Lines Matching defs:raw
371 * \brief Convert a single raw coordinate to DER ASN.1 format. The output der
374 * \param raw_buf Buffer containing the raw coordinate to be
385 * \return MBEDTLS_ERR_ASN1_INVALID_DATA if the input raw
410 /* Copy the raw coordinate to the end of der_buf. */
433 int mbedtls_ecdsa_raw_to_der(size_t bits, const unsigned char *raw, size_t raw_len,
449 /* Since raw and der buffers might overlap, dump r and s before starting
451 memcpy(r, raw, coordinate_len);
452 memcpy(s, raw + coordinate_len, coordinate_len);
484 * \brief Convert a single integer from ASN.1 DER format to raw.
489 * \param raw Output buffer that will be filled with the
493 * \param coordinate_size Size (in bytes) of a single coordinate in raw
501 * is null (i.e. all zeros) or if the output raw buffer
502 * is too small to contain the converted raw value.
504 * \warning Der and raw buffers must not be overlapping.
507 unsigned char *raw, size_t coordinate_size)
544 /* raw buffer was already zeroed by the calling function so zero-padding
546 memcpy(raw + padding_len, p, unpadded_len);
553 unsigned char *raw, size_t raw_size, size_t *raw_len)
561 /* The output raw buffer should be at least twice the size of a raw
601 memcpy(raw, raw_tmp, 2 * coordinate_size);