|
Bouffalo SDK
1.0
Bouffalolab Software Development Kit
|
|
Data Structures | |
| struct | bflb_ecdsa_s |
| struct | bflb_ecdh_s |
Macros | |
| #define | ECP_SECP256R1 0 |
| #define | ECP_SECP256K1 1 |
Functions | |
| int | bflb_sec_ecdsa_init (struct bflb_ecdsa_s *handle, uint8_t id) |
| int | bflb_sec_ecdsa_deinit (struct bflb_ecdsa_s *handle) |
| int | bflb_sec_ecdsa_sign (struct bflb_ecdsa_s *handle, const uint32_t *random_k, const uint32_t *hash, uint32_t hashLenInWord, uint32_t *r, uint32_t *s) |
| int | bflb_sec_ecdsa_verify (struct bflb_ecdsa_s *handle, const uint32_t *hash, uint32_t hashLen, const uint32_t *r, const uint32_t *s) |
| int | bflb_sec_ecdsa_get_private_key (struct bflb_ecdsa_s *handle, uint32_t *private_key) |
| int | bflb_sec_ecdsa_get_public_key (struct bflb_ecdsa_s *handle, const uint32_t *private_key, const uint32_t *pRx, const uint32_t *pRy) |
| int | bflb_sec_ecdh_init (struct bflb_ecdh_s *handle, uint8_t id) |
| int | bflb_sec_ecdh_deinit (struct bflb_ecdh_s *handle) |
| int | bflb_sec_ecdh_get_encrypt_key (struct bflb_ecdh_s *handle, const uint32_t *pkX, const uint32_t *pkY, const uint32_t *private_key, const uint32_t *pRx, const uint32_t *pRy) |
| int | bflb_sec_ecdh_get_public_key (struct bflb_ecdh_s *handle, const uint32_t *private_key, const uint32_t *pRx, const uint32_t *pRy) |
| int | bflb_sec_ecc_get_random_value (uint32_t *data, uint32_t *max_ref, uint32_t size) |
| #define ECP_SECP256K1 1 |
Definition at line 15 of file bflb_sec_ecdsa.h.
| #define ECP_SECP256R1 0 |
Definition at line 14 of file bflb_sec_ecdsa.h.
| int bflb_sec_ecc_get_random_value | ( | uint32_t * | data, |
| uint32_t * | max_ref, | ||
| uint32_t | size | ||
| ) |
| [in] | data | |
| [in] | max_ref | |
| [in] | size |
| int bflb_sec_ecdh_deinit | ( | struct bflb_ecdh_s * | handle | ) |
| [in] | handle |
| int bflb_sec_ecdh_get_encrypt_key | ( | struct bflb_ecdh_s * | handle, |
| const uint32_t * | pkX, | ||
| const uint32_t * | pkY, | ||
| const uint32_t * | private_key, | ||
| const uint32_t * | pRx, | ||
| const uint32_t * | pRy | ||
| ) |
| [in] | handle | |
| [in] | pkX | |
| [in] | pkY | |
| [in] | private_key | |
| [in] | pRx | |
| [in] | pRy |
| int bflb_sec_ecdh_get_public_key | ( | struct bflb_ecdh_s * | handle, |
| const uint32_t * | private_key, | ||
| const uint32_t * | pRx, | ||
| const uint32_t * | pRy | ||
| ) |
| [in] | handle | |
| [in] | private_key | |
| [in] | pRx | |
| [in] | pRy |
| int bflb_sec_ecdh_init | ( | struct bflb_ecdh_s * | handle, |
| uint8_t | id | ||
| ) |
| [in] | handle | |
| [in] | id |
| int bflb_sec_ecdsa_deinit | ( | struct bflb_ecdsa_s * | handle | ) |
| [in] | handle |
| int bflb_sec_ecdsa_get_private_key | ( | struct bflb_ecdsa_s * | handle, |
| uint32_t * | private_key | ||
| ) |
| [in] | handle | |
| [in] | private_key |
| int bflb_sec_ecdsa_get_public_key | ( | struct bflb_ecdsa_s * | handle, |
| const uint32_t * | private_key, | ||
| const uint32_t * | pRx, | ||
| const uint32_t * | pRy | ||
| ) |
| [in] | handle | |
| [in] | private_key | |
| [in] | pRx | |
| [in] | pRy |
| int bflb_sec_ecdsa_init | ( | struct bflb_ecdsa_s * | handle, |
| uint8_t | id | ||
| ) |
| [in] | handle | |
| [in] | id |
| int bflb_sec_ecdsa_sign | ( | struct bflb_ecdsa_s * | handle, |
| const uint32_t * | random_k, | ||
| const uint32_t * | hash, | ||
| uint32_t | hashLenInWord, | ||
| uint32_t * | r, | ||
| uint32_t * | s | ||
| ) |
| [in] | handle | |
| [in] | random_k | |
| [in] | hash | |
| [in] | hashLenInWord | |
| [in] | r | |
| [in] | s |
| int bflb_sec_ecdsa_verify | ( | struct bflb_ecdsa_s * | handle, |
| const uint32_t * | hash, | ||
| uint32_t | hashLen, | ||
| const uint32_t * | r, | ||
| const uint32_t * | s | ||
| ) |
| [in] | handle | |
| [in] | hash | |
| [in] | hashLen | |
| [in] | r | |
| [in] | s |