aboutsummaryrefslogtreecommitdiff
path: root/cryptech.h
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-06-19 20:03:03 -0400
committerRob Austein <sra@hactrn.net>2015-06-19 20:03:03 -0400
commitf23b4c6fd3ebee70ff7f8df5f088cfe27ff48a29 (patch)
tree60627660052d21d27a50ff42ea50f16317c28461 /cryptech.h
parentaaec57f3fc6775bdbf50965ae34e8a797542b7ee (diff)
Add methods to extract public components from an RSA key. Other minor
cleanup and commenting within RSA module.
Diffstat (limited to 'cryptech.h')
-rw-r--r--cryptech.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/cryptech.h b/cryptech.h
index d8f1208..b0a7c35 100644
--- a/cryptech.h
+++ b/cryptech.h
@@ -628,6 +628,16 @@ extern hal_error_t hal_rsa_key_load(const hal_rsa_key_type_t type,
const uint8_t * const dP, const size_t dP_len,
const uint8_t * const dQ, const size_t dQ_len);
+extern hal_error_t hal_rsa_key_get_modulus(hal_rsa_key_t key,
+ uint8_t *modulus,
+ size_t *modulus_len,
+ const size_t modulus_max);
+
+extern hal_error_t hal_rsa_key_get_public_exponent(hal_rsa_key_t key,
+ uint8_t *public_exponent,
+ size_t *public_exponent_len,
+ const size_t public_exponent_max);
+
extern void hal_rsa_key_clear(hal_rsa_key_t key);
extern hal_error_t hal_rsa_encrypt(hal_rsa_key_t key,