summaryrefslogtreecommitdiffstats
path: root/include/crypto/internal
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2015-06-16 10:31:01 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2015-06-17 17:03:53 +0800
commitcfc2bb32b31371d6bffc6bf2da3548f20ad48c83 (patch)
tree2231b8e6cd97e74078db3560303a30a4d270e9a9 /include/crypto/internal
parent3c339ab83fc09d9d91fb7e8b4a60e8ddc91de417 (diff)
downloadop-kernel-dev-cfc2bb32b31371d6bffc6bf2da3548f20ad48c83.zip
op-kernel-dev-cfc2bb32b31371d6bffc6bf2da3548f20ad48c83.tar.gz
crypto: rsa - add a new rsa generic implementation
Add a new rsa generic SW implementation. This implements only cryptographic primitives. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Added select on ASN1. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/internal')
-rw-r--r--include/crypto/internal/rsa.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/crypto/internal/rsa.h b/include/crypto/internal/rsa.h
new file mode 100644
index 0000000..a8c8636
--- /dev/null
+++ b/include/crypto/internal/rsa.h
@@ -0,0 +1,27 @@
+/*
+ * RSA internal helpers
+ *
+ * Copyright (c) 2015, Intel Corporation
+ * Authors: Tadeusz Struk <tadeusz.struk@intel.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ */
+#ifndef _RSA_HELPER_
+#define _RSA_HELPER_
+#include <linux/mpi.h>
+
+struct rsa_key {
+ MPI n;
+ MPI e;
+ MPI d;
+};
+
+int rsa_parse_key(struct rsa_key *rsa_key, const void *key,
+ unsigned int key_len);
+
+void rsa_free_key(struct rsa_key *rsa_key);
+#endif
OpenPOWER on IntegriCloud