From e6e4a9ae190c666f053932b0026001ff879dbcc8 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 17 Jun 2015 01:19:29 -0400 Subject: RSA key generation. Compiles, not (yet) tested otherwise. --- cryptech.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cryptech.h') diff --git a/cryptech.h b/cryptech.h index 48f2a75..392a1b2 100644 --- a/cryptech.h +++ b/cryptech.h @@ -609,7 +609,7 @@ extern void hal_rsa_set_debug(const int onoff); extern const size_t hal_rsa_key_t_size; -typedef enum { RSA_PRIVATE, RSA_PUBLIC } hal_rsa_key_type_t; +typedef enum { HAL_RSA_PRIVATE, HAL_RSA_PUBLIC } hal_rsa_key_type_t; typedef struct { void *key; } hal_rsa_key_t; @@ -631,6 +631,12 @@ extern hal_error_t hal_rsa_crt(hal_rsa_key_t key, const uint8_t * const m, const size_t m_len, uint8_t * result, const size_t result_len); +extern hal_error_t hal_rsa_gen(hal_rsa_key_t *key, + void *keybuf, const size_t keybuf_len, + const unsigned key_length, + const unsigned long public_exponent); + + #endif /* _CRYPTECH_H_ */ /* -- cgit v1.2.3