mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-17 02:43:26 +00:00
* Used bignum helper API instead of memcpy * changed the key length output to the size of the curve because: - using the bignum produces a bigger size than the curve size due to the limb size being 8 bytes and import key rejects the key if it's not exactly curve size. - we know that the generated key is filled with leading zeros becuase the generated key is bounded by the modulas. * skipped leading zeros when passing the buffer to import_key() due to the intermediate buffer allocated to the maximum size possible and import_key() needs the exact size. Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>