crypto/ecc: supports exporting generated keys in uncompressed form

Export public keys as separate X and Y coordinates for uncompressed format.

Signed-off-by: makejian <makejian@xiaomi.com>
This commit is contained in:
makejian
2025-08-07 15:21:12 +08:00
committed by Xiang Xiao
parent 3f0cc5f09c
commit be2e72dac2
2 changed files with 46 additions and 0 deletions
+4
View File
@@ -76,6 +76,10 @@ extern "C"
int ecc_make_key(uint8_t publickey[ECC_BYTES + 1],
uint8_t privatekey[ECC_BYTES]);
int ecc_make_key_uncomp(uint8_t publickey_x[ECC_BYTES],
uint8_t publickey_y[ECC_BYTES],
uint8_t privatekey[ECC_BYTES]);
/* ecdh_shared_secret() function.
* Compute a shared secret given your secret key and someone else's
* public key.