mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-26 21:39:56 +00:00
mbedtls_ecp_write_key is a mirror function to mbedtls_ecp_read_key, which writes a private key back into a byte buffer in the correct format. This is a helpful convenience function, since the byte order is defined differently between Montgomery and Weierstrass curves. Since this difference is accounted for in mbedtls_ecp_read_key, it made sense to add mbedtls_ecp_write_key for the purpose of abstracting this away such that psa_export_key doesn't need to take byte order into account. Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>