ECC (ECDSA) functions¶
-
int eth_ecdsa_pubkey_get(uint8_t *dest, const uint8_t *privkey)¶
Extracts public key from private key.
- Parameters
dest – [out] A pointer to 64-byte array where the public key will be placed.
privkey – [in] A pointer to 32-byte array to read the private key from.
- Returns
1
on success,-1
otherwise.
-
int eth_ecdsa_sign(struct eth_ecdsa_signature *dest, const uint8_t *privkey, const uint8_t *data32)¶
Creates an ECDSA signature.
- Parameters
dest – [out] A pointer to
eth_ecdsa_signature
where the signature will be placed..privkey – [in] A pointer to 32-byte array to read the private key from.
data32 – [in] A pointer to 32-byte input data.
- Returns
1
on success,-1
otherwise.
-
struct eth_ecdsa_signature¶
Holds ECDSA signature.