mbedtls/tf-psa-crypto
Waleed Elmelegy a47b82c20a Fix issue exporting generated key to raw intermediate buffer
* 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>
2024-11-13 13:11:47 +00:00
..
2024-06-13 09:02:30 +02:00