summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-10-15 21:31:45 +0200
committerRichard Levitte <levitte@openssl.org>2019-10-17 18:07:45 +0200
commit29be60235b9bf86bb38f28349b405bb112250d4b (patch)
tree1a59f70cac8a5ad7b628a01d963bba85dfd4daf9 /include
parentc3a4fa4cb849ba300d4691154c0c12ac19d24710 (diff)
New RSA keymgmt implementation to handle import / export of RSA keys
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10190)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/core_names.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
index f0e6334d89..e7e5ea060e 100644
--- a/include/openssl/core_names.h
+++ b/include/openssl/core_names.h
@@ -159,6 +159,27 @@ extern "C" {
#define OSSL_PKEY_PARAM_DSA_PUB_KEY "pub"
#define OSSL_PKEY_PARAM_DSA_PRIV_KEY "priv"
+/* RSA Keys */
+/*
+ * n, e, d are the usual public and private key components
+ *
+ * rsa-num is the number of factors, including p and q
+ * rsa-factor is used for each factor: p, q, r_i (i = 3, ...)
+ * rsa-exponent is used for each exponent: dP, dQ, d_i (i = 3, ...)
+ * rsa-coefficient is used for each coefficient: qInv, t_i (i = 3, ...)
+ *
+ * The number of rsa-factor items must be equal to the number of rsa-exponent
+ * items, and the number of rsa-coefficients must be one less.
+ * (the base i for the coefficients is 2, not 1, at least as implied by
+ * RFC 8017)
+ */
+#define OSSL_PKEY_PARAM_RSA_N "n"
+#define OSSL_PKEY_PARAM_RSA_E "e"
+#define OSSL_PKEY_PARAM_RSA_D "d"
+#define OSSL_PKEY_PARAM_RSA_FACTOR "rsa-factor"
+#define OSSL_PKEY_PARAM_RSA_EXPONENT "rsa-exponent"
+#define OSSL_PKEY_PARAM_RSA_COEFFICIENT "rsa-coefficient"
+
/* Key Exchange parameters */
#define OSSL_EXCHANGE_PARAM_PAD "pad" /* uint */