aboutsummaryrefslogtreecommitdiff
path: root/cryptech.h
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-06-17 01:19:29 -0400
committerRob Austein <sra@hactrn.net>2015-06-17 01:19:29 -0400
commite6e4a9ae190c666f053932b0026001ff879dbcc8 (patch)
tree31e80333c2aebacc84aa6bb01d57ee71356ba64a /cryptech.h
parent7a89eaa086fa534a6a0aac45fa2f5865ef7839ef (diff)
RSA key generation. Compiles, not (yet) tested otherwise.
Diffstat (limited to 'cryptech.h')
-rw-r--r--cryptech.h8
1 files changed, 7 insertions, 1 deletions
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_ */
/*